September 29th, 2016 by Charlie Russel and tagged PowerShell, Services, WMI
One of the first things I check when I am troubleshooting a system is whether all the services that should be running, are. I could just open up services.msc, click on the “Startup Type” column to sort by the startup type, and scroll down through the Automatic services to see which ones aren’t running. But […]
Posted in Network Administration, PowerShell, WMI | 2 Comments »
September 26th, 2016 by Charlie Russel and tagged Active Directory, PowerShell v5, RunAs, Start-Process
If you run as a limited user on your own desktop, as you should, it’s useful to keep a separate PowerShell window open as the Domain Administrator. I give that window a nice dark red background so I know instantly that I’m in a powerful window and to be appropriately careful. But how can I […]
Posted in Active Directory, Annoyances, Network Administration, PowerShell | Comments Off on Starting a PowerShell window as a Domain Admin
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 11th, 2016 by Charlie Russel and tagged $Profile, PowerShell v5
A few months ago, I posted a quick blog on how I set PowerShell to start automatically when I log in. Well, it occurred to me that I should extend that to show you how I set the console window parameters so that my PowerShell windows are the right size and font, since on all […]
Posted in $Profile, Annoyances, PowerShell | Comments Off on Starting PowerShell Automatically – Revisited
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
September 4th, 2016 by Charlie Russel and tagged $Profile, Map Drives, PowerShell
On my laptops, I have a different set of drive maps when I’m at home, or on the road. At home, I map to various local domain resources, but when I’m on the road, those resources aren’t available and I need to create “local” maps to versions that I can sync up to those domain […]
Posted in $Profile, PowerShell, Survival Guide | Comments Off on Testing for Location on a Laptop
September 4th, 2016 by Charlie Russel and tagged $Profile, Map Drives, net use, PowerShell v5, PSDrive
In my old drive mapping post, I was forced to do some fairly ugly stuff because I had to call the old net use command. Yech. Eventually, we got New-PSDrive, and that helped, but in PowerShell v5 (Windows 10’s version), we get New-SmbMapping and it actually works. (New-SmbMapping was added earlier, but there were issues. Those […]
Posted in $Profile, net commands, PowerShell, Survival Guide | 4 Comments »