I searched for an easy way to run a script after backup on a remote System and want to share my ideas and findings with you.
Because the backup admin has no rights and control of the remote system and the admin do not want to make changes on the System, we used the Windows Task Scheduler and start it from remote.
Situation:
- No VMware Tools on the remote VM
- Remote VM not in a Active Directory
- Not possible whyever to change things on the System (open remote powershell stuff)
- Admin on remote VM uses Windows Task Scheduler for other things.
So we did the following:
Remote System:
Added a new task to the windows task scheduler.
- run the task Scheduler to check if everything is working.
B&R Server:
Logon with User that B&R Service runs.
Save the Username and Password for the remote System in the windows Default Password store.- Run:
Code: Select all
rundll32.exe keymgr.dll, KRShowKeyMgr
Add the Name of the remote Server or IP address (which you will use later in the script) and Username (servername\username) and Password.
- Open task scheduler and connect to the remote System. Test if you can run the task remotely.
- Create a Folder for your scripts with rights for the user who run the B&R Service (c:\scripts)
- Add a textfile rename it to younameit.cmd (check if filetype is shown in windows explorer so that you not end up with a younameit.cmd.txt)
- Edit the cmd and add
Code: Select all
schtasks /run /S remotenameorip /TN nameoftask