Link to home
Start Free TrialLog in
Avatar of sdcr
sdcr

asked on

Running batch file to install SCCM client on remote machines

I am trying to manually install the SCCM client on remote machines (can't do it through the SCCM console, I've tried). I've made the batch file listed below; it runs fine under the local administrator account, but does not run when a normal user is logged in. I've tried running this remotely through the command line using psexec, but am not having luck with it either.

It would be nice to be able to run this batch file remotely, silently, so I don't have to log off any users, etc. Best case is that I can run it through psexec using a .txt file with all of the computers that need it.

Maybe a .vbs file would work better?

I am open to any ideas on how to execute this process.

Thanks!
net use o: \\servername password /user:domain\username
start /min O:\CLIENT\ccmsetup.exe /useronly /mp:"sccmserver" /downloadtimeout:30 SMSSITECODE="A02" SMSCACHEDIR=C:\WINDOWS\system32\CCM\Temp SMSCACHESIZE=2048

Open in new window

Avatar of netcmh
netcmh
Flag of United States of America image

You're running this as a batch file executed by psexec on a remote computer with the admin creds, right?
Then, in the section of task scheduler I also check the box "Run with highest privileges", though I don't know whether that would be necessary in your case.
Sorry, posted in the wrong question. Moderators: please delete
Avatar of sdcr
sdcr

ASKER

I am dropping the batch file on the local machine, then using psexec to execute it. I've tried using the local administrator account and my domain account which is in group that is local admin on the computer.
psexec \\remotemachine -u localadminaccount -p adminpw c:\sccm.bat

Open in new window

psexec extracts and copies psexesvc.exe to Admin$ on the target machine and launches it there.
This can only be done having admin privileges on the target machine.

Another place to check: "the logon as a batch job" right

what about:

psexec \\remotemachine -u domain\adminusername -p adminpw c:\sccm.bat
ASKER CERTIFIED SOLUTION
Avatar of netcmh
netcmh
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial