How to change the scheduled tasks "Run As:" from Local System to a nominated domain user account.
Here is a script below that is to be run on a remote machine that has network connectivity and sufficient local administrator rights to make the remote connection.
This script will only run locally on a Windows 2003 or Windows XP system. However it can remotely target Windows 2000 machines as well. The variables at the top : SERVER, USERNAME, DOMAIN, PASSWORD need to be set as appropiate to target the remote machine.
rem ------------------------------------------------ rem This will change the scheduled tasks on a rem remote DS to from LocalSystem to a specified rem domain user. rem
rem Note: This command can only be run from a Windows rem XP or Windows 2003 rem system. It can however target Windows 2000 rem server machines rem though. rem
rem ------------------------------------------------ Rem
--- Set the variables -------------------------
set SERVER=MD1 set USERNAME=administrator set DOMAIN=VMWARE set PASSWORD=password Rem
--- Stop the managesoft services -------------
sc \%SERVER% stop ndGlobalLA sc \%SERVER% stop ndGlobalLauncher sc \%SERVER% stop ndinit rem
--- Stop the scheduled tasks --------------------
schtasks /s %SERVER% /TN "Process ManageSoft distribution jobs" /End schtasks /s %SERVER% /TN "Process ManageSoft Remote Execution Actions" /End schtasks /s %SERVER% /TN "Upload ManageSoft logs and inventories" /End rem
--- Change the account details -------------------
schtasks /s %SERVER% /Change /TN "Process ManageSoft distribution jobs" /ru %DOMAIN%\%USERNAME% /rp %PASSWORD% schtasks /s %SERVER% /Change /TN "Process ManageSoft Remote Execution Actions" /ru %DOMAIN%\%USERNAME% /rp %PASSWORD% schtasks /s %SERVER% /Change /TN "Upload ManageSoft logs and inventories" /ru %DOMAIN%\%USERNAME% /rp %PASSWORD% rem
--- Start the managesoft services -------------
sc \%SERVER% start ndGlobalLA sc \%SERVER% start ndGlobalLauncher sc \%SERVER% start ndinit
=============================================
Comments