« Radiant Barrier and iButtons... | Sample Script - WOL or Wake On Lan »

Random notes on Scripting for PowerShell

Output all Exchange cluster resources:
Get-Wmiobject -query "Select * from ExchangeClusterResource" -namespace root\CIMV2\Applications/Exchange -computer ExchangeServer


Output all Exchange cluster resources:
Get-Wmiobject -query "Select * from ExchangeQueue" -namespace root\CIMV2\Applications/Exchange -computer ExchangeServer

Get the 10 largest MB's on a server:
Get-Wmiobject -namespace root\MicrosoftExchangeV2 -class Exchange_Mailbox -computer ExchangeServer | sort -desc size | select storename,storagegroupname,name,mailboxdisplayname,size,totalitems -first 10


Get-Wmiobject -namespace root\CIMV2\Applications\Exchange -computer paexhs02 -class ExchangeServerState

Get-Wmiobject -namespace root\MicrosoftExchangeV2 -class Exchange_Server -computer paexhs02


See the Microsoft Exchange 2003 SDK WMI Provider documentation here.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)