August 24th, 2014

PowerTip: Find Cmdlets that Need TimeSpan Object

Doctor Scripto
Scripter

Summary: Use Get-Command to find cmdlets that need a TimeSpan object for input.

Hey, Scripting Guy! Question How can I use Windows PowerShell to find which cmdlets will accept a TimeSpan object for input?

Hey, Scripting Guy! Answer Use the ParameterType parameter from the Get-Command cmdlet, for example:

Get-Command -ParameterType timespan

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.