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
56 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 39

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 35

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

Join & Write a Comment

Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
In this video we show how to create an Address List in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Organization >> Ad…
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 from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now