PowerShell script exchange
Post Reply
c0t0d0s0
Novice
Posts: 5
Liked: never
Joined: Sep 15, 2015 1:14 pm
Full Name: Michael Westman
Contact:

Specify user account with Start-VBRZip

Post by c0t0d0s0 »

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?
veremin
Product Manager
Posts: 20282
Liked: 2257 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Specify user account with Start-VBRZip

Post by veremin » 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.
stardreams
Novice
Posts: 3
Liked: 1 time
Joined: Sep 18, 2015 10:03 am
Full Name: stardreams
Contact:

Re: Specify user account with Start-VBRZip

Post by stardreams »

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.
veremin
Product Manager
Posts: 20282
Liked: 2257 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Specify user account with Start-VBRZip

Post by veremin »

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?
stardreams
Novice
Posts: 3
Liked: 1 time
Joined: Sep 18, 2015 10:03 am
Full Name: stardreams
Contact:

Re: Specify user account with Start-VBRZip

Post by stardreams »

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: Sep 18, 2015 10:03 am
Full Name: stardreams
Contact:

Re: Specify user account with Start-VBRZip

Post by stardreams » 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).
veremin
Product Manager
Posts: 20282
Liked: 2257 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Specify user account with Start-VBRZip

Post by veremin »

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.
rolandorg
Lurker
Posts: 1
Liked: never
Joined: Aug 23, 2017 2:35 pm
Full Name: ROLANDO RAMIREZ G
Contact:

Re: Specify user account with Start-VBRZip

Post by rolandorg »

It´s been almost 2 years since requests for shares with authentication were issued. Any plans to implement it ?

+1 on using iSCSI as a workaround if your NAS equipment supports it.

Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests