Vladimir EreminThis is a guest post by Vladimir Eremin, a product manager at Veeam. Vladimir is very active on the Veeam Forums, Twitter and in Spiceworks. One of Vladimir’s skills is PowerShell and he walks through this process here in this guest blog post. If you have any question on the PowerShell parts mentioned in this post, use the Veeam Forums to discuss. You an also download the sample script here for VMware and the sample script here for Hyper-V and discuss this topic in the Veeam Forums.

Our Veeam Backup Free Edition has been the most popular free Veeam tool, mostly thanks to its VeeamZIP functionality: ability to perform interactive full backups of unlimited amount of VMs. However, VeeamZIP has always had one small yet irritating limitation – the inability to schedule performing regular backups. Indeed, due to the fact that VeeamZIP can only be triggered interactively, there is simply no means in UI to schedule it like regular backup jobs. If you have been down this path, you will be happy to know that as of Update 2, this is no longer the case! In areas like the Veeam forums, our engagement on Twitter and other areas; we have recognized the concern and decided to address it by making Start-VBRZip PowerShell cmdlet available in Free Edition.

4-April 2016 Note: Update your PowerShell to version 3.0 at least prior to using this script, as we’ve discovered number of odd issues while working with PowerShell 2.0.

How it works

As noted earlier, the main functionality Veeam Backup Free Edition is ability to perform VeeamZIP backups of your VMs (and, of course, to recover VMs, guest files and application items from those backups). VeeamZIP always produces a full backup file (.vbk) that acts as an independent restore point. Free Edition allows you to store the backup file on a backup repository, on a local folder or on a network share.

When you perform backup with VeeamZIP, you can start the backup process for selected VM immediately. This type of backup requires minimal settings, and as such is extremely easy to trigger manually.

image

With Update 2, you can now write a simple PowerShell script (here for VMware and here for Hyper-V) that starts VeeamZIP activity for a selected VM, and sets whatever schedule you want for it via Windows Scheduler. We have even created the following example script for you that will not only trigger VeeamZIP backups of the required VMs, but will also email you a nicely formatted report with backup results!

Script parameters

The script is able to perform ad-hoc backup of selected VMs residing on both standalone host or cluster, or vCenter server. Before executing script, you need to provide three mandatory parameters: names of VMs to backup, host those VMs are located at, and directory where backup files should be stored. Note, this script was updated on 5/18 due to feedback.

 

##################################################################

#                   User Defined Variables

##################################################################

 

# Names of VMs to backup separated by comma (Mandatory). For instance, $VMNames = “VM1”,”VM2”

$VMNames = ""

 

# Name of vCenter or standalone host VMs to backup reside on (Mandatory)

$HostName = ""

 

# Directory that VM backups should go to (Mandatory; for instance, C:\Backup)

$Directory = ""

Optionally, you can change compression level and desired retention, disable VMware quiescence, enable encryption or even notification settings:

# Desired compression level (Optional; Possible values: 0 - None, 4 - Dedupe-friendly, 5 - Optimal, 6 - High, 9 - Extreme)

$CompressionLevel = "5"

# Quiesce VM when taking snapshot (Optional; VMware Tools or Hyper-V Integration Components are required for this in the guest OS; Possible values: $True/$False)

$EnableQuiescence = $True

# Protect resulting backup with encryption key (Optional; $True/$False)

$EnableEncryption = $False

# Encryption Key (Optional; path to a secure string)

$EncryptionKey = ""

# Retention settings (Optional; by default, VeeamZIP files are not removed and kept in the specified location for an indefinite period of time.

# Possible values: Never, Tonight, TomorrowNight, In3days, In1Week, In2Weeks, In1Month)

$Retention = "Never"

If you like to get an email report once the backup is completed, you should additionally fill out the following notification settings.

##################################################################

# Notification Settings

##################################################################

# Enable notification (Optional)

$EnableNotification = $True

# Email SMTP server

$SMTPServer = ""

# Email FROM

$EmailFrom = ""

# Email TO

$EmailTo = ""

# Email subject

$EmailSubject = ""

The resulting email report will look like this:

 

Name Start Time End Time Result Details
CentOS-tiny_2015-03-26T180459 3/26/2015 6:04:59 PM 3/26/2015 6:07:17 PM Warning Processing finished with warnings at 3/26/2015 6:07:13 PM Cannot use VMware Tools quiescence because VMware Tools are not found.
CentOS-tiny_replica_2015-03-26T180720 3/26/2015 6:07:20 PM 3/26/2015 6:11:20 PM Success Processing finished at 3/26/2015 6:11:18 PM

All of the abovementioned settings can be configured by setting certain variables to the corresponding values. For instance, to enable encryption, you should set $True (Boolean) value to $EnableEncryption variable, and provide the encryption key (see the next chapter). Additionally, if you want the backup files to be deleted after two weeks, you should set “In2Weeks” (string) value to $Retention variable, etc. There is no need to remember what each and every variable does and what values are acceptable – for your convenience, the example script include a short description for each variable.

Encryption

Getting back to encryption, data security is a critical part of the backup strategy. Backup data must be protected from unauthorized access, especially when a sensitive VM data is backed up to an offsite location or archived to tapes. To keep your data safe, you can encrypt your VeeamZIP backups. As noted above, this requires choosing a file containing the encryption password.

Of course, you could provide the password to a script as a plain text string. However, regular strings are insecure (to the say the least), since they are stored in memory as plain text. As a result, most PowerShell cmdlets will simply not accept passwords in this form.

A secure string is a better option. This type is like the usual string, but its content is encrypted in memory. It uses reversible encryption so the password can be decrypted when needed, but only by the principal that encrypted it. To create a secure string you need to open the PS console, and type the following two lines. When executed, the code will ask you to prompt a password and, then, save it as a secure string into a file:

$SecurePassword = Read-Host -Prompt "Enter password" -AsSecureString

$SecurePassword | ConvertFrom-SecureString > “Directory where secure string should be stored; C:\SecureString.txt, for instance”

After that, specify the path to the newly-created file in the main script:

# Protect resulting backup with encryption key (Optional; $True/$False)

$EnableEncryption = $True

# Encryption Key (Optional; path to a secure string)

$EncryptionKey = "C:\SecureString.txt"

 

Scheduling the script

Before you schedule the script, be sure to try starting it manually to ensure that it performs as expected.

The easiest way to schedule the script to perform periodic backup automatically is to use Windows Task Scheduler. Simply go to the Task Scheduler tool, and create a new basic task:

image

Assign a name and a description for it, so that you can easily remember what this task does.

The next page is the Task Trigger. It is pretty basic, and self-explanatory. The available options are quite flexible (everything from running backups several times a day or once a month is possible), so set there whatever values that address your RPO requirements. Most people use daily backups:

image

Set the start time for the task for the off hours. In this example, the task runs every evening at 22:00 PM beginning on April 22, 2015.

image

On the subsequent Action page, specify that you want the scheduled task to Start a program, and then click Next.

clip_image002

On the Start a Program pane, you place the following command into Program/script:

Powershell –file “Path to Veeamzip.ps1 file”

clip_image004

That’s it! But we may want to open the task once it is created to make a couple of additional changes. To do so, select the Open the Properties dialog for this task when I click Finish:

clip_image006

Since the task is to be run on a server, where a user might not be logged when the task takes place, it is worth to enable the task to run regardless of whether or not the user is logged on by associating the user’s credentials with the task.

clip_image008

Once you’re done, right-click the job and select Run to ensure that the task completes properly:

clip_image009

PowerShell gives the users what they have always wanted from Veeam Backup Free Edition!

Now that you are armed with this new awesome capability, you now should be able to achieve the long-awaited goal – do scheduled backups with the use of Veeam Backup Free Edition, which provides far more backup and recovery features than script-based free backup solution alternatives.

Check out these other cool resources:

GD Star Rating
loading...
Veeam Backup Free Edition: Now with PowerShell!, 4.7 out of 5 based on 21 ratings

View posts related to category:

    Veeam Availability Suite — Download free 30-day trial

    • Greg Zartman

      There is an error in this script for defining multiple VMs to backup. Here is the line:

      # Names of VMs to backup separated by semicolon (Mandatory)
      $VMNames = “”

      This should instead read:

      # Names of VMs to backup. Define each VM with quotes and separate each quoted VM name with a comma.(Mandatory)
      $VMNames = “”

      Example: $VMNames = “VM1”, “VM2”, “VM3”

      GD Star Rating
      loading...
    • Rick Vanover

      Hey Greg – thanks for that, Vladimir just sent me a new script – I’m uploading it now.

      GD Star Rating
      loading...
    • Manuel

      Hi to everybody!

      I’m trying to execute the script on Windows 7 x64 “server” with Veeam Backup & Replication Update 2 installed.

      I receive this error:

      Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version 2.
      At C:VeeamZIPVeeamZIP.ps1:69 char:5
      + Asnp <<<< VeeamPSSnapin
      + CategoryInfo : InvalidArgument: (VeeamPSSnapin:String) [Add-PSSnapin], PSArgumentException
      + FullyQualifiedErrorId :

      AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand
      The term 'Get-VBRServer' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
      At C:VeeamZIPVeeamZIP.ps1:71 char:24
      + $Server = Get-VBRServer <<<< -name $HostName
      + CategoryInfo : ObjectNotFound: (Get-VBRServer:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException

      The term 'Find-VBRViEntity' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
      At C:VeeamZIPVeeamZIP.ps1:76 char:25
      + $VM = Find-VBRViEntity <<<< -Name $VMName -Server $Server
      + CategoryInfo : ObjectNotFound: (Find-VBRViEntity:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException

      The term 'Add-VBREncryptionKey' is not recognized as the name of a cmdlet, function, script file, or operable program.
      Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
      At C:VeeamZIPVeeamZIP.ps1:80 char:42
      + $EncryptionKey = Add-VBREncryptionKey <<<< -Password (cat $EncryptionKey | ConvertTo-SecureString)
      + CategoryInfo : ObjectNotFound: (Add-VBREncryptionKey:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException

      The term 'Start-VBRZip' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
      At C:VeeamZIPVeeamZIP.ps1:81 char:31
      + $ZIPSession = Start-VBRZip <<<< -Entity $VM -Folder $Directory -Compression $CompressionLevel -DisableQuiesce:(!
      $EnableQuiescence) -AutoDelete $Retention -EncryptionKey $EncryptionKey
      + CategoryInfo : ObjectNotFound: (Start-VBRZip:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException

      Any idea of the reason why?
      Thanks a lot.

      GD Star Rating
      loading...
      • Vladimir Eremin

        Are you positive VB&R snap-in has been installed and registered on the given machine? You can double check it via Get-PSSnapin commandlet.

        GD Star Rating
        loading...
        • Aleks

          Hi,
          how i can install this snap-in?

          GD Star Rating
          loading...
          • Vladimir Eremin

            VB&R wizard lists components it’s going to install. Among those there will be a corresponding PS snap-in that you need to select. Thanks.

            GD Star Rating
            loading...
    • Manuel

      Update.
      I made some fixes and adjustment to Powershell Addins, regedit and some others things.
      Now, I’m stop here:

      Start-VBRZip : License is not installed.
      At C:VeeamZIPStartZip.ps1:24 char:5
      + Start-VBRZip -Entity $vmentity -Folder $destination -Compression $Compressio …
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : NotSpecified: (:) [Start-VBRZip], CLicenseNotInstalledException
      + FullyQualifiedErrorId: Veeam.Backup.LicenseLib.CLicenseNotInstalledException,Veeam.Backup.PowerShell.Commands.Backup.StartVBRZip

      GD Star Rating
      loading...
    • http://blackenedistheend.over-blog.com/ Aurélien

      Hello, thanks for this script.
      It’s working well with a local folder but when I try to backup a VM on a share ($Directory = “\server.domshare$”) I have the following error :
      Error: Accès refusé. Error code: 5
      Cannot create folder. Folder path: [\server.domshare$].
      –tr:FC: Failed to create directory. Directory path: [\server.domshare$].
      –tr:Failed to call DoRpc. CmdName: [FcCreateDir].
      Accès refusé. Error code: 5
      Cannot create folder. Folder path: [\server.domshare$].
      ———————
      I launch Veeam B&R (so the Powershell console) with an domain admin account and in the Powershell console I can access to the share with “cd” command. Veeam B&R is installed on my french Windows 8.1 computer.

      GD Star Rating
      loading...
    • Manuel

      Salut Aurélien,

      have you tried to set a network unit instead to use the entire network path?
      I mean, on the Veeam server you can create, for example, a V: (or another letter) connected to \server.domshare$, and using this V: on the script.
      This work for me, but I receive another error (Start-VBRZip : License is not installed.).

      GD Star Rating
      loading...
      • Ryan Lee

        Hi Manuel – I am having the same issue. Please see the post above yours. Thanks.

        GD Star Rating
        loading...
        • Vladimir Eremin

          Most likely, you haven’t installed Update 2 that makes the said commandlets available in free version.

          GD Star Rating
          loading...
          • Ryan Lee

            Hi Vladimir, thanks for the reply. I was on Update 2 (8.0.0.2021) when I had the issue. I updated to Update 2a (8.0.0.2029) and can now back up. Thanks again for the script!

            GD Star Rating
            loading...
    • Manuel

      Aurélien, now I’ve same your issue, so the solution I proposed to you, doesn’t works.

      GD Star Rating
      loading...
    • Ryan Lee

      Manuel, what did you do to solve your license issue? I am getting the same (Start-VBRZip : License is not installed.) error. I completely reinstalled using a new database and still get this message. Thanks.

      GD Star Rating
      loading...
    • Martin

      Hi, script is working fine for me, but I get the “Start-VBRZip : License is not installed”
      Any solution? Im using version 8.0.0.817

      GD Star Rating
      loading...
      • Martin

        Okay, I thought I had the latest update.

        To solve it, go to Veeam official website at: http://www.veeam.com/kb2024
        and download the update.

        Release note: PowerShell Support in Free Edition. Start-VBRZip cmdlet is now enabled in Veeam Backup™ Free Edition, allowing users to schedule periodic VeeamZIP™ backups using external task schedulers, such as Windows Task Scheduler. This should make Veeam Backup Free Edition a viable alternative to ghettoVCB and other similar script-based free backup solutions.

        GD Star Rating
        loading...
    • Pete

      Hi, Is there anyway the notification can be dumped into a log file instead?

      GD Star Rating
      loading...
      • Vladimir Eremin

        You should use Out-File or similar commandlets.

        https://technet.microsoft.com/en-us/library/hh849882.aspx

        GD Star Rating
        loading...
        • Pete

          Thank you Vladimir I figured that out shortly after posting and got it working using the Out-File command.

          GD Star Rating
          loading...
    • Max

      I’m running Veeam FREE Edition with Update 2b on Windows 2012R2 and I getting the following error when trying to run the script. Any ideas?

      Find-VBRViEntity : Cannot validate argument on parameter ‘Server’. The argument is null. Provide a valid value for the
      argument, and then try running the command again.
      At C:VeeamZIP.ps1:76 char:48
      + $VM = Find-VBRViEntity -Name $VMName -Server $Server
      + ~~~~~~~
      + CategoryInfo : InvalidData: (:) [Find-VBRViEntity], ParameterBindingValidationException
      + FullyQualifiedErrorId : ParameterArgumentValidationError,Veeam.Backup.PowerShell.Command.FindVBRViEntity

      Get-Content : Cannot bind argument to parameter ‘Path’ because it is an empty string.
      At C:VeeamZIP.ps1:80 char:58
      + $EncryptionKey = Add-VBREncryptionKey -Password (cat $EncryptionKey | Conver …
      + ~~~~~~~~~~~~~~
      + CategoryInfo : InvalidData: (:) [Get-Content], ParameterBindingValidationException
      + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.GetC
      ontentCommand

      Start-VBRZip : Cannot validate argument on parameter ‘Entity’. The argument is null. Provide a valid value for the
      argument, and then try running the command again.
      At C:VeeamZIP.ps1:81 char:40
      + $ZIPSession = Start-VBRZip -Entity $VM -Folder $Directory -Compression $Comp …
      + ~~~
      + CategoryInfo : InvalidData: (:) [Start-VBRZip], ParameterBindingValidationException
      + FullyQualifiedErrorId : ParameterArgumentValidationError,Veeam.Backup.PowerShell.Commands.Backup.StartVBRZip

      You cannot call a method on a null-valued expression.
      At C:VeeamZIP.ps1:91 char:5
      + $TaskSessions = $ZIPSession.GetTaskSessions().logger.getlog().updatedrecords
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : InvalidOperation: (:) [], RuntimeException
      + FullyQualifiedErrorId : InvokeMethodOnNull

      GD Star Rating
      loading...
      • Max

        I got it to work, I forgot to set the Encryption to false and now it’s working flawlessly!! thanks so much for the script!

        GD Star Rating
        loading...
    • An Nguyen

      Thank to this great post, I have tried to convert it to multi-threading version. Seems that it works charm. I will add some comments and remove debug commands then upload it shortly. AN

      GD Star Rating
      loading...
    • An Nguyen

      Thank to this great post, I have tried to convert it to multi-threading version. Seems that it works charm. I will add some comments and remove debug commands then upload it shortly. AN

      GD Star Rating
      loading...
      • Brian Legg

        Did you ever upload your updated script?

        GD Star Rating
        loading...
    • Nathan

      Hello guys! It’s not working for me. I’m getting the following error:
      Coud you help me?

      Find-VBRViEntity : Unable to cast object of type ‘Veeam.Backup.Core.Infrastructure.CHvHostItem’ to type

      ‘Veeam.Backup.Core.Infrastructure.IViItem’.

      At C:UsersAdministratorDesktopVeeamZIP (updated).ps1:76 char:9

      + $VM = Find-VBRViEntity -Name $VMName -Server $Server

      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      + CategoryInfo : NotSpecified: (:) [Find-VBRViEntity], InvalidCastException

      + FullyQualifiedErrorId : System.InvalidCastException,Veeam.Backup.PowerShell.Command.FindVBRViEntity

      Start-VBRZip : Cannot validate argument on parameter ‘Entity’. The argument is null. Supply a non-null argument and try the command

      again.

      At C:UsersAdministratorDesktopVeeamZIP (updated).ps1:86 char:40

      + $ZIPSession = Start-VBRZip -Entity $VM -Folder $Directory -Compression $Comp …

      + ~~~

      + CategoryInfo : InvalidData: (:) [Start-VBRZip], ParameterBindingValidationException

      + FullyQualifiedErrorId : ParameterArgumentValidationError,Veeam.Backup.PowerShell.Commands.Backup.StartVBRZip

      You cannot call a method on a null-valued expression.

      At C:UsersAdministratorDesktopVeeamZIP (updated).ps1:91 char:5

      + $TaskSessions = $ZIPSession.GetTaskSessions().logger.getlog().updatedrecords

      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      + CategoryInfo : InvalidOperation: (:) [], RuntimeException

      + FullyQualifiedErrorId : InvokeMethodOnNull

      Exception calling “Send” with “1” argument(s): “Failure sending mail.”

      At C:UsersAdministratorDesktopVeeamZIP (updated).ps1:113 char:1

      + $SMTP.Send($Message)

      + ~~~~~~~~~~~~~~~~~~~~

      + CategoryInfo : NotSpecified: (:) [], MethodInvocationException

      + FullyQualifiedErrorId : SmtpException

      GD Star Rating
      loading...
      • Geoffrey Wahonya

        I am getting the same error as Nathan. Any assistance would be great!

        GD Star Rating
        loading...
        • Vladimir Eremin

          It seems guys that you have Hyper-V deployements and meanwhile are trying to leverage VMware version of the script. Kindly, download and put into use the proper version (Hyper-V).

          GD Star Rating
          loading...
    • Bruno

      Hi! Thank you very much! It’s running perfectly!

      But the Hyperv script is wrong!!
      To work with Hyper-V you need to change “$VM = Find-VBRViEntity -Name $VMName -Server $Server” for “$VM = Find-VBRHvEntity -Name $VMName -Server $Server”

      Cheers!!

      GD Star Rating
      loading...
    • Matteo Simonelli

      Hi!!!

      First of all thank you very much for the script, it’s really useful!!

      It works fine for me if I launch it manually, but it does not if I schedule it within the task scheduler.
      I have installed the update 2b of Veeam Free and I have also installed the snapin.

      It’s difficult to debug it, because I get an empty email and so I have no idea where the issue is.
      I have also tried to print all the instruction in the script (to resolve the variable name and check what the script does in each step) but the file I get is empty too!!

      Do you have any ideas? The script run on a windows server 2012

      Thanks in advance for any help

      Ciao
      Matteo

      GD Star Rating
      loading...
      • Vladimir Eremin

        What happens if you execute script manually under the very same account? Or run it with the highest privileges?

        GD Star Rating
        loading...
        • Matteo Simonelli

          Hi Vladimir,

          thank you for you answer and sorry if I answwer so late!!!

          if I lauch it manually it works correctly and it creates the backup in the path set up in the script.
          I run it with the domain admin’s account

          Matteo

          GD Star Rating
          loading...
          • Vladimir Eremin

            Hard to say. Just for testing purpose – what happens if you select “Run with the highest privileges” option, will it help or not?

            GD Star Rating
            loading...
    • fpmeu Admin

      Hi all,
      when I run the ps1 script in Powershell I get errors:

      PS D:> .VeeamZIP.ps1
      Add-PSSnapin : Cannot add Windows PowerShell snap-in VeeamPSSnapin because it is already added. Verify the name of the
      snap-in and try again.
      At D:VeeamZIP.ps1:69 char:5
      + Asnp <<<< VeeamPSSnapin
      + CategoryInfo : InvalidArgument: (VeeamPSSnapin:String) [Add-PSSnapin], PSArgumentException
      + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand

      You cannot call a method on a null-valued expression.
      At D:VeeamZIP.ps1:91 char:64
      + $TaskSessions = $ZIPSession.GetTaskSessions().logger.getlog <<<< ().updatedrecords
      + CategoryInfo : InvalidOperation: (getlog:String) [], RuntimeException
      + FullyQualifiedErrorId : InvokeMethodOnNull

      Could someone please tell me what´s wrong?
      I have backup file created in the path I defined in the script but I am affraid it could be corrupted somehow because of the error

      Many thanks in advance

      GD Star Rating
      loading...
      • fpmeu Admin

        maybe just use Poswrshell 3.0 instead of 2.0?

        GD Star Rating
        loading...
    • fpmeu Admin

      I run script and it looks like this in powershell console:
      PS D:> .VeeamZIP.ps1
      qlproxy4-amd64
      PS D:>

      in VeeamZIP.ps1 I have:
      $VMNames = “Nagios”;”qlproxy4-amd64″

      and in destination folder I can see oly backup of Nagios (also email notification contains only Nagios successful row). I do not understand why output in Poweshell console is qlproxy4-amd64. I also can not get the syntax for multiple VM to backup whitin one script. I am usinf quites for each name as well as semicolon (;) as separator (no spaces)

      Anybody with an idea?

      Many thanks in advance

      GD Star Rating
      loading...
      • fpmeu Admin

        problem seems to be solved.In script is written that semicolon is VM separator but it is not true and comma is.

        GD Star Rating
        loading...
        • Vladimir Eremin

          Yep, the description provided in the script is slightly wrong. The description provided in a blog post is right, though.

          # Names of VMs to backup separated by comma (Mandatory). For instance, $VMNames = “VM1”,”VM2”

          GD Star Rating
          loading...
    • fpmeu Admin

      Hi there,
      is there an option how to send notification email to more than one email address (so define more email addresses in the script)

      Thanks

      GD Star Rating
      loading...
      • Vladimir Eremin

        You should create a loop, within which more than one letter will be generated and sent.

        GD Star Rating
        loading...
        • CNealon

          Hi Vladimir, Can you explain on how to create this type of loop?

          GD Star Rating
          loading...
    • john3voltas

      Hello.
      Thanks to Rick who wrote this post and to Vladimir who wrote this script in the first place.
      I have tested the script, had similar issues to the ones already posted here and now I can say that it works fine for me.
      Just one question: this blog states that the script was updated on 5/18 but the one that I downloaded just right now states that it’s from 3/24 and it is has tiny bits that are different from the ones that are shown above.
      So, where exactly can I download the latest version?
      Thanks in advance

      GD Star Rating
      loading...
      • Vladimir Eremin

        Links have got mixed up slightly. The latest version for VMware can be downloaded: Download sample script for Hyper-V -> Open archive -> VeeamZIP (updated).ps1. We will fix the links soon, sorry for inconvenience.

        GD Star Rating
        loading...
        • Vladimir Eremin

          Links are fixed now. Check: Download sample script for VMware [Updated Sept 2015].

          GD Star Rating
          loading...
          • john3voltas

            Hi Vladimir. Thank you very much. 🙂

            GD Star Rating
            loading...
            • Vladimir Eremin

              Does the issue persist? I double checked everything at the time I wrote the last answer and links seemed to be ok. Can you try to refresh page, using ctrl+F5 combination.

              GD Star Rating
              loading...
          • john3voltas

            Well..that’s odd. The VMware script still looks a bit different from the snippet of the blog post and it still mentions a semi-colon between VM names instead of a coma…
            Besides it still says it’s from March instead of May?
            Could you please re-check it, Vladimir?

            Thanks in advance. 🙂

            GD Star Rating
            loading...
    • James Myers

      I was getting access denied message when trying to write to an external USB device. I tried a few things but eventually got working by opening services.msc and changing the VEEAM Backup Service to log on as domain admin account and not local system

      GD Star Rating
      loading...
    • Fando

      Hi
      Having an issue getting the script working for VMware, getting the following error
      Find-VBRViEntity : Cannot validate argument on parameter ‘Server’. The argument is null. Supply a non-null argument and try
      the command again.
      At C:VeeamNewVeeamZIP.ps1:76 char:48
      + $VM = Find-VBRViEntity -Name $VMName -Server $Server

      Stuck and not sure how to resolve this issue, any help would be great!!

      GD Star Rating
      loading...
      • Fando

        I have the script working but backing up to a local drive. I need the backup to output the file to a UNC path but this doesn’t seem to work. Is this possible?

        GD Star Rating
        loading...
        • Vladimir Eremin

          As mentioned below, check whether a computer account has write permissions on a share. Also, take a look at account specified for VB&R service (it might need to replaced with one having appropriate permissions).

          GD Star Rating
          loading...
      • Chora

        The $Hostname value has to match exactly the name given in VeeamZIP when you added the server (Under Infrastructure).
        So if you entered a fully qualified name when adding the server in VeeamZIP (e.g. server.domain.com) then this is the value you have to give to the $Hostname variable.
        Hope this clarifies the domain or not domain in the script.

        GD Star Rating
        loading...
      • Boštjan Cvelbar

        After upgrading it to powershell version 4, solved the issue

        GD Star Rating
        loading...
    • Rob D

      Hi
      I have been trying to make the Hyper-V script (VeeamZIP (HV – updated)) run with the free version of the software and have had no luck. I still receive the message:
      “Start-VBRZip : Veeam Backup Free Edition does not allow VeeamZIP of multiple VMs. Specify a single VM, or install a paid product license.”
      I had upgraded to version 2b and just recently removed and re-installed up to version 2b.
      Any help will be greatly appreciated.

      GD Star Rating
      loading...
      • Vladimir Eremin

        Seems like you’re trying to make VeeamZIP of multiple VMs at a time, which is prohibited in free version of software.

        GD Star Rating
        loading...
        • Rob D

          I guess I’m missing something. I had assumed that running the above script with the mentoned free version would work. I did only supply the script with one VM name though.

          GD Star Rating
          loading...
      • Rob D

        Today I was able to install the “non-R2” VMM client on the Veeam hosts and was able to backup a VM using the same script, just not a R2 VMM server with the R2 VMM client. Wierd.

        GD Star Rating
        loading...
    • Bruce

      Hi,

      I have installed “VeeamPSSnapin” via http://www.veeam.com/kb1489

      When I run the ps1 in windows 2012 standard, it is shown “Asnp : The Windows PowerShell snap-in ‘VeeamPSSnapin’ is not installed on this computer.”

      PS: The powershell is version 3.

      Please advise me how to work it out.

      Thank you in advance.

      GD Star Rating
      loading...
    • Martin Meduna

      Hi I am absolutly confused. This article is about veeam free edition. Why I receive error “Start-VBRZip : License is not installed.” and everybody on other forums explain that powershell is in paid version only…

      GD Star Rating
      loading...
    • CNealon

      Hi,

      FIrst of all let me thank you for this script. Works great. Only one issue I am having is changing the email notification addresses. I have altered the script but it does not seem to change the email addresses. Still uses the addresses that were in the script from first run.

      Any ideas?

      GD Star Rating
      loading...
      • Vladimir Eremin

        Have you tried to change variables in “# Notification Settings” section and try to run the script manually just to see whether the changed settings apply properly?

        GD Star Rating
        loading...
        • CNealon

          Yes, as for some reason they seem to be remaining the old way as if it does not take the variable a second time

          GD Star Rating
          loading...
    • Nick

      HELOO!!!Thank you!!!Can you help me? When i do back up in programm (no powershell) a can use CREDENTIAL for back up to LAN. Can i use it parameter in PowerSHELL?THANK YOU!!!

      GD Star Rating
      loading...
      • Vladimir Eremin

        Already answered in the corresponding thread on community forums. Kindly, take a look.

        GD Star Rating
        loading...
    • Stefano

      Hi,
      I have testing this solution with hyperv scritp.
      It work fine but the destination file is alway empty. In powershell there is not any errors…
      Any Ideas?

      GD Star Rating
      loading...
      • Andy Roadman

        Been having the same issue….

        GD Star Rating
        loading...
    • Andy Roadman

      What are the parameters for using the SMTP settings. Most require some sort of SSL usage and my work email wont allow it. was going to use my gmail to send it back to my work email. Any other suggestions?

      GD Star Rating
      loading...
    • Andy Roadman

      I have come up on another issue. I noted out the Encryption and Messaging components of the script to get past the errors, but when i run the script manually nothing happens except the command prompt opening for a few seconds. no new backups are created. any thoughts?

      GD Star Rating
      loading...
      • Andy Roadman

        figured this out. forgot to set some of the parameters to False.. Duh!!

        GD Star Rating
        loading...
    • moku

      Thank you for this. Been looking for a free solution that will solve all my needs and with this veeam is perfect…but just one question and I apologize if its obvious or already been answered but

      how do i use this to restore?

      I’ve made a backup using the script, but Im not sure how to use it once I have it because it doesnt show in Veeam…

      Thanks in advance.

      GD Star Rating
      loading...
      • moku

        Found the answer, and yes it is pretty simple.

        You have to import the backup into Veeam.

        Home -> Import Backup

        enter where you stored in and Wahlah!

        GD Star Rating
        loading...
    • disqus_N3A8ZSDA0Z

      I am trying to run this on over servers that are on a local network and back them up the a NAS. i can back them up fine to their local machine but when it attempts to backup to the NAs i get the following error:

      Error: The network name cannot be found.

      Cannot create folder. Folder path: [\*************VM_Backups].

      –tr:FC: Failed to create directory. Directory path: [\*************VM_Backups].

      –tr:Failed to call DoRpc. CmdName: [FcCreateDir].

      The network name cannot be found.

      Cannot create folder. Folder path: [\*************VM_Backups].

      GD Star Rating
      loading...
      • moku

        I had the same problem.

        The workaround I eventually got to work was to share the folder I wanted to save to and set the permissions on that folder to everyone, yeah I know not ideal but it worked.

        So my Directory path looks like \TargetMachineVM_Backups

        may not be what your looking for but hopefully it can lead you to what you need. And please post if you find something else that works for you.

        GD Star Rating
        loading...
    • Andy Roadman

      Thanks for the script. Very helpful.

      Can you elaborate or provide and example of the email notification setting?

      The servers/network I am setting this up for does not use exchange and so I was trying to use my Gmail account.

      using;
      smtp.gmail.com
      email TO and FROM is my email address @gmail.com
      added SMTPPort = “587”

      Cant seem to get this figured out.

      Thanks

      GD Star Rating
      loading...
    • CNealon

      Hi,
      Is there any way to get the summary also included in the email notifications?

      GD Star Rating
      loading...
      • Vladimir Eremin

        What information you think is missing in the resulting email? Duration, processing rate and bottleneck?

        GD Star Rating
        loading...
    • K Navatha

      Good article with excellent idea! I appreciate your post.Regards Sarkari Result

      GD Star Rating
      loading...
    • Charles

      Hello…when running the PowerShell script in Windows PowerShell ISE, I’ve noticed the following errors:

      cat : Cannot find drive. A drive with the name ‘ID’ does not exist.
      At C:VeeamZIPVeeamZIP.ps1:80 char:54
      + $EncryptionKey = Add-VBREncryptionKey -Password (cat $EncryptionKey | Conver …
      + ~~~~~~~~~~~~~~~~~~
      + CategoryInfo : ObjectNotFound: (ID:String) [Get-Content], DriveNotFoundException
      + FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.GetContentCommand

      Add-VBREncryptionKey : Cannot validate argument on parameter ‘Password’. The argument is null. Provide a valid value for the argument, and then
      try running the command again.
      At C:VeeamZIPVeeamZIP.ps1:80 char:53
      + $EncryptionKey = Add-VBREncryptionKey -Password (cat $EncryptionKey | Conver …
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : InvalidData: (:) [Add-VBREncryptionKey], ParameterBindingValidationException
      + FullyQualifiedErrorId : ParameterArgumentValidationError,Veeam.Backup.PowerShell.Command.AddVBREncryptionKey

      I have encryption enabled. I’m testing this but it seems to only happen if I have more than four VMs to backup in $VMnames. The email I receive after the job finishes says that the backups were successful. However, if I try a restore, nothing I enter for the encryption key prompt is accepted. So basically the restore is useless. Any ideas? Thanks

      GD Star Rating
      loading...
    • snarf attack

      I wanted a script that would backup all the Hyper-V hosts in my infrastructure, automatically enumerate the VMs on the host and backup all of them, except for a couple machines I don’t care about. I built on this one, and this is my end result:

      http://pastebin.com/tB8GnCbX

      GD Star Rating
      loading...
    • Timur Usmanov

      Hi. Thank you for you post. I’m trying to run VeeamZIP (VI – updated) script but has following error:

      Find-VBRViEntity : Cannot validate argument on parameter ‘Server’. The argument is null. Provide a valid value for the

      argument, and then try running the command again.

      At C:UsersAdministratordesktopVeeamZIP-VI-updatedVeeamZIP (VI – updated).ps1:76 char:48

      + $VM = Find-VBRViEntity -Name $VMName -Server $Server

      + ~~~~~~~

      + CategoryInfo : InvalidData: (:) [Find-VBRViEntity], ParameterBindingValidationException

      + FullyQualifiedErrorId : ParameterArgumentValidationError,Veeam.Backup.PowerShell.Command.FindVBRViEntity

      Start-VBRZip : Cannot validate argument on parameter ‘Entity’. The argument is null. Provide a valid value for the

      argument, and then try running the command again.

      At C:UsersAdministratordesktopVeeamZIP-VI-updatedVeeamZIP (VI – updated).ps1:86 char:40

      + $ZIPSession = Start-VBRZip -Entity $VM -Folder $Directory -Compression $Comp …

      + ~~~

      + CategoryInfo : InvalidData: (:) [Start-VBRZip], ParameterBindingValidationException

      + FullyQualifiedErrorId : ParameterArgumentValidationError,Veeam.Backup.PowerShell.Commands.Backup.StartVBRZip

      You cannot call a method on a null-valued expression.

      At C:UsersAdministratordesktopVeeamZIP-VI-updatedVeeamZIP (VI – updated).ps1:91 char:5

      + $TaskSessions = $ZIPSession.GetTaskSessions().logger.getlog().updatedrecords

      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      + CategoryInfo : InvalidOperation: (:) [], RuntimeException

      I checked the comments below but no one solution helped me… Could you please help me? Thank you.

      GD Star Rating
      loading...
    • Sijmen Denecker

      Hi, Vladimir.

      First of all let me say im loving the new functionality and the script.

      I must say this news came as a real joy. You know i was even using scheduled backups with Version 7 ? I did this with VMWare PowerCLI and 3 tasks per VM. First i make a snapshot with the powercli, then use the veeam scheduled file copy, then remove the snapshot with powercli. It was a real pain as the backups didnt always complete in the calculated time, even with margins. Also Veeamzip is faster then file copy.
      But we are buying the full blow version of Veeam next year for sure.

      Anywayz, i got a small question about this script.

      I want to backup mutiple VM’s with one ps1 script.

      But when i write $VMNames = “WGN09″;”WGN10” it only backups the first VM ? 🙁

      If i write $VMNames = “WGN09;WGN10” i get an error message. 🙁 (because the foreach only runs once with the full value)

      So what is the correct syntax please ?

      (Another nice addition is Start-Transcript -Path “C:xxx.log” to get some logging)

      Kind Regards,

      Sijmen

      GD Star Rating
      loading...
      • Sijmen Denecker

        Anyone ? Please ?

        GD Star Rating
        loading...
      • Sijmen Denecker

        I found the answer myself in some other post in the Veeam forums. Altought the script states “Names of VMs to backup separated by semicolon (Mandatory)” it only works after using normal commas.

        So now i have $VMNames = “WGN09″,”WGN10” and its working.

        GD Star Rating
        loading...
    • Larmire

      How would I authenticate to my SMTP server?

      GD Star Rating
      loading...
    • Alexander

      I have the same question as Larmire. How would I authenticate to my SMTP server?

      GD Star Rating
      loading...
    • Nilz

      Can anyone tell me how I (as an personal/home user), with ~5-10 VM’s in hyper-v, should achieve a “good” backup-strategy?
      Free is good, but the problem with veeam-zip (even tho I now can automate it), always creates a full backup…..
      Without incremental backup, I get ~50 gigs of files -every- time i run this….
      So… what to do? Let’s say I want 1 backup per day, thats 350 gigs of files to store offsite per week….

      So, what have I missed? Is it impossible to use veeamzip in a continuous way? No incremental support?
      Full-veeam has everything I want, but it’s impossible to pay up as a home user / enthusiast… There does not seem to be any “personal” / “home” licenses?

      GD Star Rating
      loading...
      • Rick Vanover

        Hi Nilz: For personal/home, you should look at the NFR license for labs. It’s made for those situations and it is a fully functional version of Veeam Availability Suite, so you’ll have the proper scheduler and incremental backups.

        http://go.veeam.com/free-nfr-veeam-availability-suite

        GD Star Rating
        loading...
    • Shawn Griffin

      I’d be interested in this working, but i have not seen anyone address this issue? or if its because Hyper-V over VMware….

      Find-VBRViEntity : Cannot validate argument on parameter ‘Server’. The argument is null. Provide a valid value for the

      argument, and then try running the command again.

      At C:VeeamZIP.ps1:76 char:48

      + $VM = Find-VBRViEntity -Name $VMName -Server $Server

      GD Star Rating
      loading...
    • Shawn Griffin

      EDIT: I got this working shortly after posting.
      Find-VBRViEntity : Cannot validate argument on parameter ‘Server’. The argument is null
      for me this translated to can’t find my hyper-v host because i was using the fqdn. (I found in a different post someone else had this. Removed the domain to make it just servername and started working immediately.

      GD Star Rating
      loading...
      • Rick Vanover

        Cheers, Shawn – thanks for sharing.

        GD Star Rating
        loading...
    • Shawn Griffin

      So tried this on a second hyper-V and hitting a snag. Error=
      Start-VBRZip -Entity $VM -Folder $Directory cannot validate argument on ‘Entity’ argument is null What is $VM that is coming back as null?

      GD Star Rating
      loading...
    • Janne Saarinen

      Hi, does this script (for HyperV) work with new version 9 too?

      GD Star Rating
      loading...
      • Rick Vanover

        Not positive – but that is motivation for me to update the post!

        GD Star Rating
        loading...
    • Boštjan Cvelbar

      I recieve this error:
      Find-VBRHvEntity : Unable to find assembly ‘Veeam.Backup.HVLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bfd684
      de2276783a’.
      At C:scriptsBackup-Virtual-Machines-On-HypervOBIWAN.ps1:78 char:25
      + $VM = Find-VBRHVEntity <<<< -Name $VMName -Server $Server
      + CategoryInfo : NotSpecified: (:) [Find-VBRHvEntity], SerializationException
      + FullyQualifiedErrorId : System.Runtime.Serialization.SerializationException,Veeam.Backup.PowerShell.Command.Find
      VBRHvEntity

      Start-VBRZip : Cannot validate argument on parameter 'Entity'. The argument is null. Supply a non-null argument and try
      the command again.
      At C:scriptsBackup-Virtual-Machines-On-HypervOBIWAN.ps1:88 char:39
      + $ZIPSession = Start-VBRZip -Entity <<<< $VM -Folder $Directory -Compression $CompressionLevel -DisableQuiesce:(!
      $EnableQuiescence) -AutoDelete $Retention
      + CategoryInfo : InvalidData: (:) [Start-VBRZip], ParameterBindingValidationException
      + FullyQualifiedErrorId : ParameterArgumentValidationError,Veeam.Backup.PowerShell.Commands.Backup.StartVBRZip

      i am able to make backup thru GUI, but not thru PowerShell script after upgrading veeam backup and replication from 8 to version 9.
      PLEASE HELP

      GD Star Rating
      loading...
      • Rick Vanover

        Hi Bostjan: I’d share this in the PowerShell Forum at forums.veeam.com…

        GD Star Rating
        loading...
    • Aizudin AY

      For email with notifications with authentication, I am using this & it is currently working as expected. You’ll need to edit the lower portion of the script..

      If ($EnableNotification)
      {
      $Message = New-Object System.Net.Mail.MailMessage $EmailFrom, $EmailTo
      $Message.Subject = $EmailSubject
      $Message.IsBodyHTML = $True
      $Message.Body = $MesssagyBody | ConvertTo-Html -head $style | Out-String
      $SMTP = New-Object Net.Mail.SmtpClient($SMTPServer)
      $SMTP.Port = 587
      $SMTP.Credentials = New-Object System.Net.NetworkCredential(“username@domain.com”, “yourPasswordHere”);
      $SMTP.EnableSsl = $True;
      $SMTP.Send($Message)
      }

      GD Star Rating
      loading...
    • Doug B

      Script works when email is disabled but when I enable email it generates a series of errors starting with this


      New-Object : Exception calling “.ctor” with “2” argument(s): “Value cannot be null.
      Parameter name: from”

      At C:Usersadministrator.xxxDocumentsveeamzip.ps1:109 char:12
      + $Message = New-Object System.Net.Mail.MailMessage $EmailFrom, $EmailTo
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationEx
      ception
      + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.
      Commands.NewObjectCommand

      The property ‘Subject’ cannot be found on this object. Verify that the property
      exists and can be set.

      Any tips or help would be great

      GD Star Rating
      loading...
      • Polina Vasileva

        ?approve

        Polina Vasilyeva
        writer | Veeam Software polina.vasilyeva@veeam.com

        GD Star Rating
        loading...
      • Vladimir Eremin

        You don’t seem to provide the required variables with needed values. Thus, value cannot be null error.

        GD Star Rating
        loading...
    • Mikael

      Im getting this message in the details coloumn in the email after finished backup and was wondering if this if the correct output or if something is wrong? Success: Creating snapshot Microsoft Software Shadow Copy provider 1.0 (mode: Crash consistent)

      Would be great if anyone can confirm this is correct so i can sleep comfortably !

      GD Star Rating
      loading...
      • Vladimir Eremin

        Confirmed. The said message just means that crash consistent snapshot (the same as it would be after a power outage) has been taken on the given VM.

        GD Star Rating
        loading...
    • https://www.techandme.se Daniel Hansson

      Hi, thanks for a great script! I’m new to Powershell and get this:

      ############################
      Get-Content : Cannot bind argument to parameter ‘Path’ because it is an empty string.
      At C:UsersDanielDocumentsVeeamZIP.ps1:80 char:58
      + … ptionKey = Add-VBREncryptionKey -Password (cat $EncryptionKey | Conve …
      + ~~~~~~~~~~~~~~
      + CategoryInfo : InvalidData: (:) [Get-Content], ParameterBindingValidationException
      + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.
      ontentCommand

      Start-VBRZip : Cannot bind parameter ‘EncryptionKey’. Cannot convert the “” value of type “System.String”
      m.Backup.PowerShell.Types.PSCryptoKey”.
      At C:UsersDanielDocumentsVeeamZIP.ps1:81 char:169
      + … nableQuiescence) -AutoDelete $Retention -EncryptionKey $EncryptionKey
      + ~~~~~~~~~~~~~~
      + CategoryInfo : InvalidArgument: (:) [Start-VBRZip], ParameterBindingException
      + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Veeam.Backup.PowerShell.Commands.Backup.Star

      You cannot call a method on a null-valued expression.
      At C:UsersDanielDocumentsVeeamZIP.ps1:91 char:5
      + $TaskSessions = $ZIPSession.GetTaskSessions().logger.getlog().upd …
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo : InvalidOperation: (:) [], RuntimeException
      + FullyQualifiedErrorId : InvokeMethodOnNull

      ############################

      What seems to be the issue here? I’m great with Linux CLI, but this is Greek to me.

      Thank you in advance!

      GD Star Rating
      loading...
      • https://www.techandme.se Daniel Hansson

        Solved it by setting Encryption to $False

        GD Star Rating
        loading...
    • https://www.techandme.se Daniel Hansson

      I have an issue regarding sending the Veeam backup files to a NAS in the same subnet in Powershell. I have mounted the NAS in Windows (on the PC that has Veeam installed, 192.168.1.110) as a Network Drive, and I can login and view the files if I use the standard File Explorer, but with Powershell I can’t write to that NAS directory. The DIR I use for storing backups is “veeam” on the NAS, like this:

      $Directory = “\192.168.1.115veeam”

      It works if I do it from the GUI, but with Powershell it fails. I think it’s becuase it needs permission (the share is password protected and I can’t change that) in form of login credentials. I also tried to give “Guest” full access on the NAS, but no luck there either. In Linux it would be easy, just create a password file or something and then use that credentials, but in Powershell I don’t have a clue. I tried a few things already though, keep reading.

      When I do “Get-PSDrive” in Powershell, the Network Drive shows up as “Q” which is Q: on my Windows system that is assigned to the Network Drive in Windows.

      I have also tried to remove Q: as a Network Drive and remount it within Powershell (don’t know if that would make a difference, but I was thinking that Powershell maybe caches the password in a different way than if I do it in Windows GUI?) with this command:

      New-PSDrive -Name Q -PSprovider Filesystem -Root \192.168.1.115veeam -Credential VEEAM_NAS -Persist

      But it fails as it says “Multiple connections to a server or shared resource by the same user, using more than one user name are not allowed. Disconnect all previous connections to the server or shared resource and try again” and can’t create a new PSDrive. Because of this I tried to remove all the Shared Storages with “net use * /delete” but it says that “The list is empty” aka no Shared Storages. So it shouldn’t be a problem to create a new drive, but it is.

      I have also tried to change IP on the NAS so that Windows would think it’s a new Storage, but that didn’t work either. I also checked all the shared resources in services.msc but nothing was shared there either. I have also tried to flush DNS and renew DHCP, but no luck. So in other words, it says that I have shared resources but I don’t.

      And yes, I rebooted both the NAS and the Windows machines several times.

      I’m stuck! As I see it there are a couple of options that I haven’t tried yet:

      1. Re-format the Windows PC (192.168.1.110) to clean up everything and start over
      2. Maybe Veeam uses the same credentials as in Windows(?), and therefore change the NAS user to the same user as in Windows, also with the same password ofc.

      The NAS is a QNAP 269 Pro Turbo, and the Windows Machine is Windows 10 Pro clean install.

      Should I enter some additional $Variable to the script to get this working, or do you have some other suggestion? Please help!

      GD Star Rating
      loading...
    • Boštjan Cvelbar

      How to make script send you notification only in case where backup did not succeded. Currently script sends reports in both cases (sucess & failure).

      GD Star Rating
      loading...
      • Vladimir Eremin

        You will have to check whether there is at least one failed or warning status in the task sessions and form and send email, only in case of positive answer.

        GD Star Rating
        loading...
    • CNealon

      Is it possible to have selective notifications from the script? On warning and failure. So we only get the mails if there is an issue.

      GD Star Rating
      loading...
    Rick Vanover
    Author: Rick Vanover
    Rick Vanover (MVP, vExpert, Cisco Champion) is the director of Technical Product Marketing & Evangelism for Veeam Software based in Columbus, Ohio. Rick’s IT experience includes system administration and IT management; with virtualization being the central theme of his career recently.
    Follow Rick on Twitter... 

    Published: May 11, 2015