powershell script and user rights

PowerShell script exchange

Re: powershell script and user rights

Veeam Logoby v.Eremin » Mon Apr 15, 2013 12:03 pm

Additionally, can you grant necessary permissions to the account under which Veeam Services are run and see whether the provided scripts work?

Thanks.
v.Eremin
Veeam Software
 
Posts: 13281
Liked: 970 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: powershell script and user rights

Veeam Logoby Andy611 » Mon Apr 15, 2013 1:47 pm

This is for sure problem with rights, but I dont know why, becouse if I manualy copy to share folder everything is ok, service is running under the same admin as its setup for shared folder. Another solution is to setup more local repositories for example D:\backup\vmserver01, D:\backup\vmserver02 and run backup with working script without shared folder.
Andy611
Influencer
 
Posts: 14
Liked: never
Joined: Tue Apr 09, 2013 9:46 am
Full Name: Andrej Hlubocky

Re: powershell script and user rights

Veeam Logoby nshurupova » Fri Sep 09, 2016 3:25 pm

No matter what I tried, I couldn't get the script to write to the share. My workaround is - in the loop for each VM

1) write backup locally
2) move to the share
3) remove backup from local destination.

Works great this way under the scheduled task - no issues with permissions.
nshurupova
Lurker
 
Posts: 1
Liked: never
Joined: Fri Sep 09, 2016 3:20 pm
Full Name: Nataliya

Re: powershell script and user rights

Veeam Logoby v.Eremin » Mon Sep 12, 2016 11:01 am

Some of the solutions such as granting sufficient permissions to computer account, etc. have been discussed in the adjacent thread; might be worth reviewing. Thanks.
v.Eremin
Veeam Software
 
Posts: 13281
Liked: 970 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: powershell script and user rights

Veeam Logoby sbp » Wed Dec 21, 2016 9:30 am

I've tried everything in this thread and a lot more - without succes. Trying to save backup to a share.

Even creating a network share on the same server I'm running the backup from with full rights - nothing works.
Only backing up to c:\ works - that is really strange.

Of course the solution nshurupova suggests will work, but it is not very elegant, and will take up a lot of space.

I using Windows 2012 R2 servers and Veeam Free 9.5. From the console everything works fine - only powershell is the problem.

Do you have any new suggestions, about how to solve this?

The script I'm currently using.

Add-PSSnapin VeeamPSSnapIn

$username = "domain\username"
$PlainPassword = "password"
$SecurePassword = $PlainPassword | ConvertTo-SecureString -AsPlainText -Force
$Path = "\\hyperv04\veeamtest"
$cred = new-object System.Management.Automation.PSCredential -argumentlist $username, $SecurePassword
New-PSDrive –Name B -PSProvider FileSystem -Root $Path -Credential $Cred
$Folder = “B:\”

$VM = Find-VBRHvEntity -Name VM -Server localhost
Start-VBRZip -folder $Folder -Entity $VM
sbp
Lurker
 
Posts: 1
Liked: never
Joined: Wed Dec 21, 2016 8:56 am
Full Name: Søren Bo Petersen

Re: powershell script and user rights

Veeam Logoby v.Eremin » Wed Dec 21, 2016 7:04 pm

Honestly, I'm not aware of any other solutions besides providing sufficient privileges for both backup service and computer accounts. Thanks.
v.Eremin
Veeam Software
 
Posts: 13281
Liked: 970 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Previous

Return to PowerShell



Who is online

Users browsing this forum: No registered users and 3 guests