October 26th, 2015

PowerTip: Use PowerShell Get-Command to Show Syntax

Doctor Scripto
Scripter

Summary: Use the Windows PowerShell Get-Command cmdlet to show syntax of cmdlets.

Hey, Scripting Guy! Question How can I use Windows PowerShell to explore the allowed syntax for a specific cmdlet?

Hey, Scripting Guy! Answer Use the Get-Command cmdlet, and use the –syntax switch, for example:

Get-Command Get-WinEvent -Syntax

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.