Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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
?
67 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 41

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 38

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
As much as Microsoft wants to kill off PST file support, just as they tried to do with public folders, there are still times when it is useful or downright necessary to export Exchange mailboxes to PST files. Thankfully, it is still possible to e…
This video discusses moving either the default database or any database to a new volume.
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

610 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