Archive for September, 2016

Getting Automatic Services That Are Stopped With PowerShell

September 29th, 2016 by and tagged , ,

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 »

Starting a PowerShell window as a Domain Admin

September 26th, 2016 by and tagged , , ,

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 | No Comments »

Param() Tricks

September 25th, 2016 by and tagged , , , ,

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 | No Comments »

Starting PowerShell Automatically – Revisited

September 11th, 2016 by and tagged ,

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 | No Comments »

Active Directory — Unlocking a User Account with PowerShell

September 9th, 2016 by and tagged , , , , , ,

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 | No Comments »

Testing for Location on a Laptop

September 4th, 2016 by and tagged , ,

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 | No Comments »

Mapping Drives Revisited

September 4th, 2016 by and tagged , , , ,

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 »