I'm trying to pull SIDs and usernames from the registry on a windows box for use later in a script, so I wrote a bit of powershell to pull those out, trim off the crap and feed them into an array. The ...
Don’t copy and paste the same code over and over again. Instead, create a PowerShell function and save yourself time.