Recently we ran into a nightly job that wasn’t running properly. It was scheduled to run as the local system, and it looked like the machine account had the rights necessary to move a couple files around. Since it was failing, we needed to determine what part was failing.
Since the job had changed machines, the #1 suspect was permissions. These looked OK, but we needed to test the job as the local system account, and wanted to do it interactively so we could diagnose any issues.
However, you can’t use runas to fire up a cmd prompt as the local system. However, as this TechNet article points out, you can do it with PsExec.
PSEXEC -i -s -d CMD
If you want to double check, run WHOAMI /USER
Update: You can do the same thing to open up PowerShell or the PowerShell ISE.
psexec -i -s Powershell.exe
psexec -i -s Powershell_ise.exe