To view Exchange Administrators with powershell we can use the get-exchangeadministrator commandlet. This will tell me the current exchange administrator groups in the domain. Example below is: [PS] C:\Windows\system32>get-exchangeadministrator | format-list Identity : EXCHANGELAB.LOCAL/Users/Administrator Scope : Organization wide Role : OrgAdmin Identity : EXCHANGELAB.LOCAL/Microsoft Exchange Security Groups/Exchange Organi zation Administrators Scope : Organization wide …
Category: Scripting
Retrieve information about an Exchange 2007 Server
If you want to retrieve information about an exchange server you can use the GET-EXCHANGESERVER commandlet. This will retrieve information like the computer name, OU location, site name etc etc. The syntax of the command is: SYNTAX Get-ExchangeServer [-Identity <ServerIdParameter>] [-DomainController <Fqdn >] [-Status <SwitchParameter>] [<CommonParameters>] Get-ExchangeServer -Domain <Fqdn> [-DomainController <Fqdn>] [-Status …
Retrieve time zone information through Powershell
For this we can use get-wmiobject to query WMI: get-wmiobject -class win32_timezone | format-list Bias : 0 SettingID : Caption : (GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London
Managing AD with Powershell
Windows Server 2008 R2 gives us the ability to manage Active Directory with Powershell. Here is a really nice poster for all the powershell commandlets for AD downloaded from here: http://blogs.msdn.com/adpowershell/archive/2009/03/05/active-directory-powershell-overview.aspx
Script Gallery on TechNet
Microsoft have released a script gallery on TechNet. This is a repository of various scripts and user submitted scripts. There is also a custom script search engine. Check it out! http://gallery.technet.microsoft.com/scriptcenter/en-us/
IP Information Powershell script
If you want an easy Powershell script to recieve IP Information for some workstations then this nice and simple powershell script should work nicely. It takes input from a file containing a list of the hosts and displays it in a nice output format $ComputerName = @{l="ComputerName";e={$_.__Server}} get-wmiobject -query "Select * FROM Win32_NetworkAdapterConfiguration WHERE IpEnabled=’TRUE’" …