January 21st, 2013

PowerTip: Find Out From Whence a Command Comes

Doctor Scripto
Scripter

Summary: Find out information about where a Windows PowerShell command comes from by looking at the module information.

Hey, Scripting Guy! Question I need to find out who authored a cmdlet. How do I go about finding out this information?

Hey, Scripting Guy! Answer The first thing you need to do is to find the module that supplies the cmdlet. You can use the Get-Command cmdlet to do this. Next, you need to use the Get-Module cmdlet to obtain the author or company information from the module. These commands appear here by using the gcm alias for Get-Command and using the Get-WsusUpdate cmdlet as an example.

PS C:\> Get-Module (gcm Get-WsusUpdate).modulename | select author, company*, version

Author                       CompanyName                 Version

——                       ———–                 ——-

Microsoft Corporation        Microsoft Corporation       1.0.0.0

 

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.