/build/static/layout/Breadcrumb_cap_w.png

[PS] Runing a script as SYSTEM user

HI

In PowerShell for Windows 7, how can I do to run a ps1 script as SYSTEM user?

THANKS

BYE

0 Comments   [ + ] Show comments

Answers (3)

Posted by: anonymous_9363 13 years ago
Red Belt
0
As with any other scipting language there's nothing special about PowerShell that would allow it to run as the System user. If there was, there would be a teensy-weensy security hole, don't you think?
Posted by: AngelD 13 years ago
Red Belt
0
You need to run the powershell in a console started as the system account.

Launch cmd.exe with "Run as administrator"
In the launched cmd.exe execute "psexec.exe -s cmd.exe" (get it from sysinternals.com)
Now execute your powershell (or what ever command you like) which should be executed under the system account
Posted by: anonymous_9363 13 years ago
Red Belt
0
Re-reading the thread and your reply, Kim, I just remembered the old trick of how to run stuff as System without third-party tools, namely to execute a command prompt using the Task Scheduler, AT.EXE, something like:

AT hh:mm /interactive CMD
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ