Posts tagged with PowerShell v5

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 »

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 »

Shutting Down Running VMs – Revisited

June 4th, 2016 by and tagged , ,

A couple of years ago, I posted a perfectly good snippet for shutting down the running VMs on a machine. But the code there is very much the “old syntax” and not terribly elegant.  For shutting down all the running RODCs, I used: Get-VM -Name *rodc* | Where-Object {$_.State -eq “Running” } | Foreach-Object { […]

Posted in Hyper-V, PowerShell | Comments Off on Shutting Down Running VMs – Revisited

Setting Console Colours

May 30th, 2016 by and tagged , , , ,

As I described in my previous post, I always open both an admin and non-admin PowerShell window when I log on to a computer. To tell the two apart, I set the background colour of the Admin window to dark red, with white text, and the non-admin window to a white background with dark blue […]

Posted in $Profile, Annoyances, Console, PowerShell, Windows 10, Windows Server 2016, WMI | Comments Off on Setting Console Colours