Jump to content

Recommended Posts

Posted

I'm assuming this has to be on a remote computer as you could just use runas if it's on the local machine.

 

The syntax is:

 

psexec \\computername command

 

Switches (that I've used anyway):

 

-accepteula (I always sling this in just in case, so you don't get any annoying prompts)

-d (don't wait for the remote process to terminate)

-i (run the process interactively such that it appears on the screen)

-s (run the process as LocalSystem)

-x (run the process on the WinLogon desktop - requires additional customisation to work properly)

 

You can combine switches like this:

 

psexec \\computername -accepteula -dis command

 

So this will run the command as LocalSystem, it can interact with the desktop and PsExec on your end won't wait for it to complete before terminating (useful if iterating through a list of computers, where the command is guaranteed to succeed, in e.g. a batch script).

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...