I need to run an exe remotely using psexec

I want to run CCMClean.exe from a server on a remote PC, I need to remove SCCM from the PC and remove the CCM folders under Windows. If someone has a script (Powershell or VB) or even a bat file that would be great.

Just in case I was not clear. CCMClean is on a server  \\servername\client\ccmclean.exe  
And I want to run that on a remote PC to remove SCCM.
LVL 19
Edward PamiasTeam Lead RRS DeskAsked:
Who is Participating?
 
ITSysTechSenior Systems AdministratorCommented:
C:\psexec.exe \\10.1.70.71 -u domainname\administrator -p 12345 -d -e -i \\10.1.12.20\ccmclean.exe

10.1.70.71 = remote server you want to have this work on
10.1.12.20 = location were the file is most likely a shared folder

-d      Don't wait for process to terminate (non-interactive).
-e      Does not load the specified account’s profile.
-i      Run the program so that it interacts with the desktop of the specified session on the remote system. If no session is specified the process runs in the console session.

Referance
0
 
Edward PamiasTeam Lead RRS DeskAuthor Commented:
this is good. Thanks!
0
 
ITSysTechSenior Systems AdministratorCommented:
Your welcome. :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.