The “Hey, Scripting Guys!” blog has been retired. There are many useful posts in this blog, so we keep the blog here for historical reference. However, some information might be very outdated and many of the links might not work anymore.
New PowerShell content is being posted to the PowerShell Community blog where members of the community can create posts by submitting content in the GitHub repository.
Summary: Learn how to see the most recent error in Windows PowerShell.
(image) I ran a script that fails. How can I use Windows PowerShell to find the most recent error?
(image) Use $error, and to see the most recent error, look at error 0:
$error[0]
(image...
Summary: Microsoft Scripting Guy, Ed Wilson, talks about using Try, Catch, Finally blocks to catch Windows PowerShell errors related to reading the registry.
(image) Hey, Scripting Guy! Yesterday you posted Update or Add Registry Key Value with PowerShell. Would it be easy to use Try, Catch, Finally blocks to know if I need to create the...
Summary: Use Windows PowerShell to read a registry key property value.
(image) How can I use Windows PowerShell to read a registry key property value so I can find the version of a particular software package?
(image) Use the Get-ItemProperty cmdlet, for example:
Get-ItemProperty -Path HKCU:\Software\ScriptingGuys\Scripts...
Summary: Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to update or add a registry key value.
(image) Hey, Scripting Guy! I am having a problem trying to update the registry. I am using the New-ItemProperty cmdlet, but it fails if the registry key does not exist. I added the –Force parameter, but it still...
Summary: Learn how to use Windows PowerShell to get a file hash.
(image) How can I use Windows PowerShell to get a hash of a file?
(image) Use the Get-FileHash cmdlet, for example:
(Get-FileHash C:\fso\myfile.txt).hash
(image...