-
- Enthusiast
- Posts: 39
- Liked: 4 times
- Joined: Apr 08, 2016 6:20 am
- Contact:
Pre-Job Script
Hi everyone
I'm trying to run a pre-job script to remote shutdown a virtual machine inside the domain before backing it up but it just won't work.
The .bat-file I've created looks like this:
shutdown.exe -m \\[computername] -s -f -t 1
If I run the script manually with the domain-admin-account it works fine so it seems that Backup & Replication does not have the rights to shutdown the remote-computer. Anyone knows how I can give it the rights so the script will be executed at the target machine?
Thanks
I'm trying to run a pre-job script to remote shutdown a virtual machine inside the domain before backing it up but it just won't work.
The .bat-file I've created looks like this:
shutdown.exe -m \\[computername] -s -f -t 1
If I run the script manually with the domain-admin-account it works fine so it seems that Backup & Replication does not have the rights to shutdown the remote-computer. Anyone knows how I can give it the rights so the script will be executed at the target machine?
Thanks
-
- Product Manager
- Posts: 20450
- Liked: 2318 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Pre-Job Script
What happens if you execute manually the very same script again, but this time under Veeam service account? Thanks.
-
- Enthusiast
- Posts: 39
- Liked: 4 times
- Joined: Apr 08, 2016 6:20 am
- Contact:
Re: Pre-Job Script
The veeam service account? You mean the user with whom I log in to manage backup & replication? It's a memeber of the domain admin group and it works fine this way.
-
- Product Manager
- Posts: 20450
- Liked: 2318 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Pre-Job Script
Nope, the one under which Veeam-related services are running.
-
- Enthusiast
- Posts: 39
- Liked: 4 times
- Joined: Apr 08, 2016 6:20 am
- Contact:
Re: Pre-Job Script
Oh, now I got you. When I try to run it with the local system account (that's the "user" the veeam backup service is running on) it says "permission denied" in the command prompt.
-
- Product Manager
- Posts: 20450
- Liked: 2318 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Pre-Job Script
Account lacks required permissions - this is the reason why automatically executed pre-job script fails. Thanks.
-
- Enthusiast
- Posts: 39
- Liked: 4 times
- Joined: Apr 08, 2016 6:20 am
- Contact:
Re: Pre-Job Script
Do you know how I can give the "System" the rights to execute that batch file successfully?
Or is it better to run the Veeam-Service as a user that has these rights?
Or is it better to run the Veeam-Service as a user that has these rights?
-
- Product Manager
- Posts: 20450
- Liked: 2318 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Pre-Job Script
This. Thanks.Or is it better to run the Veeam-Service as a user that has these rights?
-
- Enthusiast
- Posts: 39
- Liked: 4 times
- Joined: Apr 08, 2016 6:20 am
- Contact:
Re: Pre-Job Script
ok, i did it and it works now. thank you.
-
- Product Manager
- Posts: 20450
- Liked: 2318 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Pre-Job Script
Pre/Post job scripts are executed under account specified for Veeam-specific services. Thus, everything started to work, as soon as you granted it required permissions.
Glad to hear that you're up and running now.
Thanks.
Glad to hear that you're up and running now.
Thanks.
Who is online
Users browsing this forum: Bing [Bot], Semrush [Bot] and 29 guests