November 13th, 2016 by Charlie Russel and tagged Array, List, Param, Parameters, PowerShell
I got an interesting question in a comment today on my old post onĀ Getting the Free Disk Space of Remote Computers. While I answered the comment in the original post, it brought up something that’s not well understood, so I thought I’d take a moment to give a fuller answer here, where it will be […]
Posted in PowerShell | Comments Off on Using a list as a default parameter value
September 25th, 2016 by Charlie Russel and tagged $myInvocation, Hyper-V, Param, Parameters, PowerShell v5
One of the new features of PowerShell v5 is support for creating hard links, symbolic links and junctions. This is long overdue, and much appreciated. Before, I’d been forced to the workaround of using “cmd /c mklink” to create links, and I’m always glad to find a way to get rid of any vestige of […]
Posted in Hyper-V, PowerShell | Comments Off on Param() Tricks
September 9th, 2016 by Charlie Russel and tagged Active Directory, AD DS, Credential, Param, Parameters, PowerShell, PSCredential
As any SysAdmin knows, users periodically lock themselves out of their accounts, usually because they forgot a password or somehow mistyped it too many times. And after all, if it failed once, why not keep trying it? Unlocking that account is NOT something you do with Set-ADUser, unfortunately, because the PowerShell ActiveDirectory module has a […]
Posted in Active Directory, PowerShell, PSCredential | Comments Off on Active Directory — Unlocking a User Account with PowerShell