Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How can I do a query in powershell to see what a current setting is before I make changes?

Posted on 2015-01-27
4
59 Views
Last Modified: 2015-02-03
I'm not very well aquainted with PowerShell, but there are commandlets that I'd like to use for Exchange. Before I make changes, I'd like to do a query just to see what some settings are at. Is there a universal way to do this in powershell? For example, the same command can give me the status of what a setting is, either "default", or "yes", or "no"?

Thanks in Advance
0
Comment
Question by:mmahelpdesk
4 Comments
 
LVL 40

Accepted Solution

by:
footech earned 250 total points
ID: 40573195
Not universal, but in general in PowerShell for each cmdlet that performs a specific action (or deals with a group of settings), that cmdlet has a "Set-" prefix, and there is usually a matching cmdlet with a "Get-" prefix to retrieve current settings.
0
 
LVL 36

Expert Comment

by:Mahesh
ID: 40573235
you can end command with -whatif switch which can tell you what options are there for yes \ no

Also you can get existing setting by piping to get full list, format list

You can check command for all parameters and examples with
Get-Help cmdlet -examples
OR
Get-Help cmdlet -Full
0
 
LVL 53

Assisted Solution

by:Will Szymkowski
Will Szymkowski earned 250 total points
ID: 40573256
Most common commands to get user data are below...

Active Directory
Get-ADUser -Identity <samacountname> -Properties * | fl

Open in new window

The above code will list all of the properties in a list format for a specific user

Exchange
Get-Mailbox -Identity <alias> | fl 

Open in new window

The above code shows default mailbox properties

Get-CASMailbox -Identity <alias> | fl

Open in new window

The above code will show specific CAS services that are enabled on a users mailbox

Get-MailboxStatistics -Identity <alias> | fl

Open in new window

The above code will get detailed information about the users mailbox like Size/Item Count/etc

Will.
0
 
LVL 1

Author Closing Comment

by:mmahelpdesk
ID: 40587209
Awesome, this is exactly what I needed. Thanks!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
This article describes my battle tested process for setting up delegation. I use this process anywhere that I need to setup delegation. In the article I will show how it applies to Active Directory
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question