Starting Elevated PowerShell Windows

There are a few commands I have to run from Elevated PowerShell windows (such as suspending Bitlocker prior to patching).  It’s not that hard to right-click on my pinned-to-taskbar PowerShell icon and select “Run as Administrator”, but I wanted to see if I could avoid that.  I can, somewhat.  This throws up the UAC prompt…

0

I Should Have Done This Years Ago (New-Shortcut, Revisited)

In spite of having this blog, sometimes I rewrite a function because I forgot I wrote it already.  Case in point, New-Shortcut.  It was one of my earlier entries in this blog: http://blogs.msdn.com/b/timid/archive/2009/09/06/powershell-for-non-n00bs-symlinks.aspx However, the “I should have done this years ago” refers to something else – the fact that I should auto-populate shortcuts for…

0

PowerShell for Non-N00bs: Symlinks

Here’s how to create a shortcut in PowerShell.  Actually, it’s how to create a shortcut with COM in PowerShell function New-ShortCut {     param (         [string]$target = $null,         [string]$name = $target,         [string]$parent = (Get-Location).ToString(),         [string]$iconLocation,         [switch]$help     );     if ($help -or !$target) { @” New-Shortcut -target <string> -name <string>…

0