October 15th, 2014

PowerTip: Check Status of PowerShell Help Files on Remote Computers

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to check the status of Help file updates on remote computers.

Hey, Scripting Guy! Question How can I easily see if the Windows PowerShell Help files are up-to-date on my remote computers?

Hey, Scripting Guy! Answer Use the Invoke-Command cmdlet, target the remote computers, use Get-Help to look for help,
           and then use the Select-String cmdlet to search for “Cannot find the Help files” in the output.
           Here is an example (this is a single-line command broken at the pipeline character for readability):

Invoke-Command -CN "s1","s2","dc1" -ScriptBlock { get-help help |
Select-String "cannot find the Help files" -Quiet}

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.