?
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
Medium Priority
?
65 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
[X]
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
4 Comments
 
LVL 40

Accepted Solution

by:
footech earned 1000 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 37

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 1000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
There are times when we need to generate a report on the inbox rules, where users have set up forwarding externally in their mailbox. In this article, I will be sharing a script I wrote to generate the report in CSV format.
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Suggested Courses
Course of the Month11 days, 20 hours left to enroll

752 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