September 18th, 2013

PowerTip: Use PowerShell and WSMan to Obtain Service Info

Doctor Scripto
Scripter

Summary: Use Windows PowerShell and WSMan to obtain service information about WinRM.

Hey, Scripting Guy! Question How can I use Windows PowerShell 3.0 with WSMan to query service information?

Hey, Scripting Guy! Answer Use the Get-WsmanInstance cmdlet and specify a resource URI.

This example obtains information about the WinRM service on a remote computer named DC1:

get-wsmaninstance wmicimv2/win32_service -selectorset @{name=”winrm”} -computer dc1

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.