Now Available:

Featured Resource:

line

Newsletter

Email Address:


line

Ask the Expert

Have a question for our resident expert? Email your questions to Greg.

« WSUS 3.0 SP1 to add Role and Server Manager Support to Server 2008 | Main | Realtime Windows Server Opinion Question #15: Do you have formalized IT change control processes in your organization? If so, what do you like or dislike about them? If not, do you think they would be valuable to implement? »

Don Jones’ Favorite PowerShell Cmdlets, Part 1 of 10: Get-Command

Here’s the beginning of a ten-part series on my favorite Windows PowerShell cmdlets, where I hope to help you not only discover a new cmdlet or two, but to also discover new functionality in cmdlets that you may already know about. And, don’t laugh, but my favorite cmdlet is definitely Get-Command. It’s the lynchpin behind PowerShell’s self-discovery capabilities, meaning it’s your true friend for discovering PowerShell’s capabilities. For example, if you’re wondering what PowerShell can do with services, just ask Get-Command:

Get-Command *service*

You might start to notice PowerShell’s cmdlet naming, where a common and consistent verbs like Set are used to give you a clue about what the cmdlet does. Wondering what PowerShell can Set (change) besides services?

Click past the fold for more…

Gcm -verb Set

Gcm, by the way, is an alias for Get-Command, making it easier and quicker to type. What about event logs?

Gcm -noun EventLog

Get-Command should be your first stop when you’re wondering, “can PowerShell do _(fill in the blank)_?” Of course, keep in mind that Get-Command can only help with cmdlets that are installed on your system; if you’re browsing for other cmdlets, check out the Cmdlet Directory on www.PowerShellCommunity.org.

Don Jones is the Lead Scripting Guru for SAPIEN Technologies and a Windows PowerShell MVP. He’s the co-author of Windows PowerShell: TFM, 2nd Edition and is the Windows PowerShell columnist for TechNet Magazine. Don is also the Director for the new centralized, independent PowerShell online community: www.PowerShellCommunity.org.

Get your hands on the full Don Jones Favorite Cmdlets Series at this address:
http://www.realtime-windowsserver.com/type/mt-search.cgi?tag=don%20jones%20favorite%20cmdlets&blog_id=1

TrackBack

TrackBack URL for this entry:
http://www.realtime-windowsserver.com/type/mt-tb.cgi/506

Post a comment

(All comments are approved by site leader before appearing here. Thanks for commenting!)

line

Greg Shields' Bio:

Greg Shields, is an independent author, instructor, and IT consultant based in Denver, Colorado, and a co-founder of Concentrated Technology. With nearly 15 years of experience in information technology, Greg has developed extensive experience in systems administration, engineering, and architecture specializing in Microsoft systems management, remote application, and virtualization technologies. Greg is a Contributing Editor for Redmond Magazine, MCPmag.com, and Virtualization Review Magazine and is the author of five books, including Windows Server 2008:  What’s New / What’s Changed. Greg is also a highly sought-after instructor and speaker, speaking regularly at conferences like TechMentor Events, and producing computer-based training curriculum for CBT Nuggets.  Greg is a recipient of Microsoft "Most Valuable Professional" award with a specialization in Windows Terminal Services.