Specify user account with Start-VBRZip

PowerShell script exchange

Specify user account with Start-VBRZip

Veeam Logoby c0t0d0s0 » Tue Sep 15, 2015 1:18 pm

I am using the backup script posted by Vladimir Eremin to use Veeam Free Edition. The only problem is that I'm backing up to a UNC path that requires authentication. I can do this through the GUI, but I cannot figure out how to specify the user account through PowerShell.

Any help?
c0t0d0s0
Novice
 
Posts: 4
Liked: never
Joined: Tue Sep 15, 2015 1:14 pm
Full Name: Michael Westman

Re: Specify user account with Start-VBRZip

Veeam Logoby v.Eremin » Tue Sep 15, 2015 2:44 pm 1 person likes this post

What happens if you try to map it via New-PSDrive? Also, don't forget to make sure that the given computer account has write permission on a given share. Thanks.
v.Eremin
Veeam Software
 
Posts: 13255
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Specify user account with Start-VBRZip

Veeam Logoby stardreams » Fri Sep 18, 2015 10:28 am

Hi, guys.
I've got the same problem that TS.
Our company try to use Veeam B&R 8 to backup our Hyper-V VM.
We use Linux Centos 7 SMB as a backup repository (over Gigabit Ethernet).
With GUI all works perfect (locally or using SMB Linux share), Veeam recognizes/saves all network/local credentials/shares.
But if try to launch v.Eremin''s powershell script (from here http://www.veeam.com/blog/veeam-backup- ... shell.html) to start my backup onto our smb resource - I've got errors (access to registry denied or smth. like that) or nothing (script is simply stops with no errors).
Locally that script is working fine (manually started or scheduled).
New-PSDrive method also works fine and network drive is connected... I'm even created windows's user with identically login/pass as it is on smb-share and tried to run that script with smb-like account - the same situation. The host windows-server/veeam gui - also working with that share fine. Windows error log doesn't contain any errors to this problem.

Please, help to solve this trouble. Will appreciate...thanks a lot.
stardreams
Novice
 
Posts: 3
Liked: 1 time
Joined: Fri Sep 18, 2015 10:03 am
Full Name: stardreams

Re: Specify user account with Start-VBRZip

Veeam Logoby v.Eremin » Fri Sep 18, 2015 11:04 am

Under which account you're running this script? It's capable of writing to the said share? For instance, if you add a drive via New-PSDrive, will you be able to, say, copy a file (Copy-Item) to it within a PS session? If you execute the script manually not through Windows Scheduler, will you get the same error? What about computer account and its permissions?
v.Eremin
Veeam Software
 
Posts: 13255
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Specify user account with Start-VBRZip

Veeam Logoby stardreams » Fri Sep 18, 2015 11:34 am

Under which account you're running this script?

hostname\Admin-group acc.

It's capable of writing to the said share?

yes

For instance, if you add a drive via New-PSDrive, will you be able to, say, copy a file (Copy-Item) to it within a PS session?

yes, checked after your comments (even within powershell script editor when I write down network path, it gives me tips/suggestion about folders on that path)

If you execute the script manually not through Windows Scheduler, will you get the same error?

windows scheduler doesn't show any errors, just keeps running and running endless (w/o any info/errors) until I stop it manually and then it show "completed succesfully" in results column, but it didn't even begin copying or smth. like that
yes, I'v got the same error

What about computer account and its permissions?

How do I check it (HV server/SMB Linux server are not in the domain, they're separate machines)?
Or what do you mean?

Thanks for comments...
stardreams
Novice
 
Posts: 3
Liked: 1 time
Joined: Fri Sep 18, 2015 10:03 am
Full Name: stardreams

Re: Specify user account with Start-VBRZip

Veeam Logoby stardreams » Fri Sep 25, 2015 6:27 am 1 person likes this post

Good time of the day to all.
Maybe it will be usefull for someone trying to resolve that problem with powershell scripts.
That ps scripts worked for me only when I decided to use iscsi target (NAS connected Raid-hdds) instead of smb shares, and scheduled scripts in Windows Scheduler, running task with the admin privileges (because if I run the scripts directly via right-click "Run with powershell" - I've got the same error).
This works fine on separate hosts (not in domain).
stardreams
Novice
 
Posts: 3
Liked: 1 time
Joined: Fri Sep 18, 2015 10:03 am
Full Name: stardreams

Re: Specify user account with Start-VBRZip

Veeam Logoby v.Eremin » Mon Sep 28, 2015 12:14 pm

I don't have Linux-based shares at hand that are also not part of domain, so, can't check how the given problem can be solved.

Anyway, glad to hear that you were able to find a solution working for you.

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


Return to PowerShell



Who is online

Users browsing this forum: edirschedl, quazer and 5 guests