Start a process as another User in PowerShell

Got asked an interesting question today, and the answer is worth sharing with everyone. If you have the username and password of another user, and want to run a command using their account, how would you do that? Like so:

TimRayburn.net goes #663399Becca

No words can possibly fill the gap left by the loss of a child, so in solidarity with the Meyer family, TimRayburn.net has gone purple.

Speaking at Central Ohio .NET Developers Group

On this coming Thursday, May 22nd, I’ll be speaking to the CODNUG on Entity Framework and the Repository and Specification patterns. I’ll be in town all day Thursday, working from the Improving offices. If you’d like to chat, drop me a line.