Thursday, January 13, 2011

How to run commands as "NT AUTHORITY\SYSTEM" under Windows Server 2008?

I want to execute some commands with SYSTEM privileges on Windows Server 2008. I have Administrator privileges, of course. On the good old version of Windows without all the UAC BS this was as simple as:

at 15:48 /interactive cmd

And after a minute a command prompt would pop up, running as NT AUTHORITY\SYSTEM. But if I do this on Windows 2008 it tells me:

Warning: Due to security enhancements, this task will run at the time expected but not interactively. Use schtasks.exe utility if interactive task is required ('schtasks /?' for details).

I checked schtasks and it looks like that only gives you the ability to run a task interactively as the logged on user, which is not what I want. Of course, I could code and install a service that runs as SYSTEM, but what a hassle! Could anyone suggest an easier way?

I'm so sick of these hoops Microsoft is making me jump through just to do what I want to do on my system.

  • psexec /s [command]

    Richard : To get psexec: (1) download PSTools from http://sysinternals.com (which will redirect into MS), (2) extract contents of ZIP into folder in PATH (or add the folder you use to the PATH).
    From vu1tur
  • If you just want to run a command prompt (or any app) as SYSTEM then use psexec as vu1tur suggests. As for running scheduled tasks interactively, this is surely a matter of opinion, but I've always thought that Windows should not allow scheduled tasks to run interactively as it's such a big security risk. MS have changed the behaviour in W2k8, and I'm on their side this time.

    JR

0 comments:

Post a Comment