Here is a PowerShell tip that I rely on quite a lot. Sometimes I will have an admin task to perform but I can’t think of the exact PowerShell command to use. For example I know I want to perform some calendar administration, but I don’t remember the correct command.
Thanks to Get-Command I can quickly search for commands based on keywords. For example, to find all of the cmdlets with the keyword “calendar” in them:
[PS] C:>Get-Command -Noun *calendar* CommandType Name Definition ----------- ---- ---------- Function Get-CalendarDiagnosticLog ... Function Get-CalendarNotification ... Function Get-CalendarProcessing ... Function Get-MailboxCalendarConfiguration ... Function Get-MailboxCalendarFolder ... Function Set-CalendarNotification ... Function Set-CalendarProcessing ... Function Set-MailboxCalendarConfiguration ... Function Set-MailboxCalendarFolder ... Function Test-CalendarConnectivity ...
You can also search based on the “verb” of the commands, for example to find all commands that start with the “Test” verb:
[PS] C:>Get-Command -Verb "Test" CommandType Name Definition ----------- ---- ---------- Function Test-ActiveSyncConnectivity ... Function Test-AssistantHealth ... Function Test-CalendarConnectivity ... Cmdlet Test-ComputerSecureChannel Test-ComputerSecureChannel [-Repair] [-Server[[-So... Function Test-EcpConnectivity ... Function Test-EdgeSynchronization ... Function Test-ExchangeSearch ... Function Test-FederationTrust ... Function Test-FederationTrustCertificate ... Function Test-ImapConnectivity ... Function Test-IPAllowListProvider ... Function Test-IPBlockListProvider ... Function Test-IRMConfiguration ... Function Test-Mailflow ... Function Test-MAPIConnectivity ... Cmdlet Test-ModuleManifest Test-ModuleManifest [-Path] [-Verbose] ... Function Test-MRSHealth ... Function Test-OrganizationRelationship ... Function Test-OutlookConnectivity ... Function Test-OutlookWebServices ... Function Test-OwaConnectivity ... Cmdlet Test-Path Test-Path [-Path] [-Filter ] ... Function Test-PopConnectivity ... Function Test-PowerShellConnectivity ... Function Test-ReplicationHealth ... Function Test-SenderId ... Function Test-ServiceHealth ... Function Test-SmtpConnectivity ... Function Test-SystemHealth ... Function Test-UMConnectivity ... Function Test-WebServicesConnectivity ... Cmdlet Test-WSMan Test-WSMan [[-ComputerName] ] [-Authenti...
So next time you’re scratching your head trying to think of the name of that PowerShell command, just give Get-Command a go.
It’d be good if Powershell commands provide help like the way CISCO IOS commands do. Anyway, many thanks Paul for showing the easiest way to find the Powershell commands.
Hi Michael,
You mean like Get-Help?
http://technet.microsoft.com/en-us/library/ee176848.aspx