You should change this line:gotxi wrote:I cancelled at this point, every VM fails the same.
Code: Select all
$ZIPSession = Start-VBRZip -Entity $VMName ...
Code: Select all
$ZIPSession = Start-VBRZip -Entity $VM ...
Thanks.
You should change this line:gotxi wrote:I cancelled at this point, every VM fails the same.
Code: Select all
$ZIPSession = Start-VBRZip -Entity $VMName ...
Code: Select all
$ZIPSession = Start-VBRZip -Entity $VM ...
Code: Select all
Processing finished with errors at 07/10/2015 11:15:55 Task failed. Failed to expand object 2012R2HATHOR. Error: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Code: Select all
Backup job: 2012R2HATHOR_2015-10-07T141815 (Full)
Error
1 of 1 VMs processed
miércoles, 7 de octubre de 2015 14:18:15
Success 0 Start time 14:18:15 Total size 0,0 KB Backup size 0,0 KB
Warning 0 End time 14:18:21 Data read 0,0 KB Dedupe 1,0x
Error 1 Duration 0:00:06 Transferred 0,0 KB Compression 1,0x
Details
Name Status Start time End time Size Read Transferred Duration Details
2012R2HATHOR Error 14:18:21 14:18:21 0,0 KB 0,0 KB 0,0 KB 0:00:00 Task failed. Failed to expand object 2012R2HATHOR. Error: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Code: Select all
Backup job: 2012R2HATHOR_2015-10-07T154726 (Full)
Error
1 of 1 VMs processed
miércoles, 7 de octubre de 2015 15:47:26
Success 0 Start time 15:47:26 Total size 0,0 KB Backup size 0,0 KB Error: The system cannot find the path specified. Failed to create or open file [Z:\Backup_2012R2HATHOR_2015-10-07T154726.vbk].
Warning 0 End time 15:51:16 Data read 0,0 KB Dedupe 1,0x
Error 1 Duration 0:03:50 Transferred 0,0 KB Compression 1,0x
Details
Name Status Start time End time Size Read Transferred Duration Details
2012R2HATHOR Error 15:51:04 15:51:16 0,0 KB 0,0 KB 0,0 KB 0:00:11 Job has failed. See logs for details.
Code: Select all
Get-VBRServer : Aangevraagde registertoegang is niet toegestaan.
At C:\Users\Veeam\Desktop\Emeubel.ps1:71 char:11
+ $Server = Get-VBRServer -name $HostName
+ ~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], SecurityException
+ FullyQualifiedErrorId : System.Security.SecurityException
Find-VBRViEntity : Aangevraagde registertoegang is niet toegestaan.
At C:\Users\Veeam\Desktop\Emeubel.ps1:76 char:9
+ $VM = Find-VBRViEntity -Name $VMName -Server $Server
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], SecurityException
+ FullyQualifiedErrorId : System.Security.SecurityException
Start-VBRZip : Aangevraagde registertoegang is niet toegestaan.
At C:\Users\Veeam\Desktop\Emeubel.ps1:86 char:19
+ $ZIPSession = Start-VBRZip -Entity $VM -Folder $Directory -Compression $Comp ...
+ ~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], SecurityException
+ FullyQualifiedErrorId : System.Security.SecurityException
Nevermind, i followed this post and changed my mapped drive to the full path and now it works. Thanks anyway!gotxi wrote:I deleted and readded my credentials and now the GUI works again, but when launched via powershell, now throws me this:
Code: Select all
The system cannot find the path specified. Failed to create or open file [Z:\Backup_2012R2HATHOR_2015-10-07T154726.vbk
I think the cause is account lacking required permissions, try to either run a script as an administrator or create self-elevating script. Thanks.Laszlo wrote:After update 2 I get this error regarding registry access, I think it is fairly simple to fix but I do not know which keys are affected:
Code: Select all
##################################################################
# User Defined Variables
##################################################################
# Names of VMs to backup separated by comma (Mandatory). For instance, $VMNames = “VM1”,”VM2”
$VMNames = "CGw--26909-(TestResellerGSARTZcopy)"
# Name of vCenter or standalone host VMs to backup reside on (Mandatory)
$HostName = "vmware"
# Directory that VM backups should go to (Mandatory; for instance, C:\Backup)
$Directory = "c:\backup"
# 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 are required; Possible values: $True/$False)
$EnableQuiescence = $True
# Protect resulting backup with encryption key (Optional; $True/$False)
$EnableEncryption = $True
# 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 = "TomorrowNight"
##################################################################
# Notification Settings
##################################################################
# Enable notification (Optional)
$EnableNotification = $True
# Email SMTP server
$SMTPServer = ""
# Email FROM
$EmailFrom = ""
# Email TO
$EmailTo = ""
# Email subject
$EmailSubject = ""
##################################################################
# Email formatting
##################################################################
$style = "<style>BODY{font-family: Arial; font-size: 10pt;}"
$style = $style + "TABLE{border: 1px solid black; border-collapse: collapse;}"
$style = $style + "TH{border: 1px solid black; background: #dddddd; padding: 5px; }"
$style = $style + "TD{border: 1px solid black; padding: 5px; }"
$style = $style + "</style>"
##################################################################
# End User Defined Variables
##################################################################
#################### DO NOT MODIFY PAST THIS LINE ################
Asnp VeeamPSSnapin
$Server = Get-VBRServer -name $HostName
$MesssagyBody = @()
foreach ($VMName in $VMNames)
{
$VM = Find-VBRViEntity -Name $VMName -Server $Server
If ($EnableEncryption)
{
$EncryptionKey = Add-VBREncryptionKey -Password (cat $EncryptionKey | ConvertTo-SecureString)
$ZIPSession = Start-VBRZip -Entity $VM -Folder $Directory -Compression $CompressionLevel -DisableQuiesce:(!$EnableQuiescence) -AutoDelete $Retention -EncryptionKey $EncryptionKey
}
Else
{
$ZIPSession = Start-VBRZip -Entity $VM -Folder $Directory -Compression $CompressionLevel -DisableQuiesce:(!$EnableQuiescence) -AutoDelete $Retention
}
If ($EnableNotification)
{
$TaskSessions = $ZIPSession.GetTaskSessions().logger.getlog().updatedrecords
$FailedSessions = $TaskSessions | where {$_.status -eq "EWarning" -or $_.Status -eq "EFailed"}
if ($FailedSessions -ne $Null)
{
$MesssagyBody = $MesssagyBody + ($ZIPSession | Select-Object @{n="Name";e={($_.name).Substring(0, $_.name.LastIndexOf("("))}} ,@{n="Start Time";e={$_.CreationTime}},@{n="End Time";e={$_.EndTime}},Result,@{n="Details";e={$FailedSessions.Title}})
}
Else
{
$MesssagyBody = $MesssagyBody + ($ZIPSession | Select-Object @{n="Name";e={($_.name).Substring(0, $_.name.LastIndexOf("("))}} ,@{n="Start Time";e={$_.CreationTime}},@{n="End Time";e={$_.EndTime}},Result,@{n="Details";e={($TaskSessions | sort creationtime -Descending | select -first 1).Title}})
}
}
}
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.Send($Message)
}
Code: Select all
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:\Users\Administrator\Desktop\VeeamZIP (updated).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:\Users\Administrator\Desktop\VeeamZIP (updated).ps1:80 char:58
+ $EncryptionKey = Add-VBREncryptionKey -Password (cat $EncryptionKey | Conver ...
+ ~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Get-Content], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.GetContentCommand
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:\Users\Administrator\Desktop\VeeamZIP (updated).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:\Users\Administrator\Desktop\VeeamZIP (updated).ps1:91 char:5
+ $TaskSessions = $ZIPSession.GetTaskSessions().logger.getlog().updatedrecords
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
New-Object : Exception calling ".ctor" with "2" argument(s): "The parameter 'from' cannot be an empty string.
Parameter name: from"
At C:\Users\Administrator\Desktop\VeeamZIP (updated).ps1:108 char:12
+ $Message = New-Object System.Net.Mail.MailMessage $EmailFrom, $EmailTo
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException
+ FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
The property 'Subject' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\Administrator\Desktop\VeeamZIP (updated).ps1:109 char:1
+ $Message.Subject = $EmailSubject
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
The property 'IsBodyHTML' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\Administrator\Desktop\VeeamZIP (updated).ps1:110 char:1
+ $Message.IsBodyHTML = $True
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
The property 'Body' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\Administrator\Desktop\VeeamZIP (updated).ps1:111 char:1
+ $message.Body = $MesssagyBody | ConvertTo-Html -head $style | Out-String
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
Exception calling "Send" with "1" argument(s): "Value cannot be null.
Parameter name: message"
At C:\Users\Administrator\Desktop\VeeamZIP (updated).ps1:113 char:1
+ $SMTP.Send($Message)
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ArgumentNullException
Code: Select all
$HostName = "vmware"
Get-VBRServer -name $HostName
Code: Select all
Start-VBRZip : License is not installed.
At C:\Users\Administrator\Desktop\VeeamZIP (updated).ps1:86 char:19
+ $ZIPSession = Start-VBRZip -Entity $VM -Folder $Directory -Compression $Comp ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Start-VBRZip], CLicenseNotInstalledException
+ FullyQualifiedErrorId : Veeam.Backup.LicenseLib.CLicenseNotInstalledException,Veeam.Backup.PowerShell.Commands.Backup.StartVBRZip
You cannot call a method on a null-valued expression.
At C:\Users\Administrator\Desktop\VeeamZIP (updated).ps1:91 char:5
+ $TaskSessions = $ZIPSession.GetTaskSessions().logger.getlog().updatedrecords
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
New-Object : Exception calling ".ctor" with "2" argument(s): "The parameter 'from' cannot be an empty string.
Parameter name: from"
At C:\Users\Administrator\Desktop\VeeamZIP (updated).ps1:108 char:12
+ $Message = New-Object System.Net.Mail.MailMessage $EmailFrom, $EmailTo
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException
+ FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
The property 'Subject' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\Administrator\Desktop\VeeamZIP (updated).ps1:109 char:1
+ $Message.Subject = $EmailSubject
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
The property 'IsBodyHTML' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\Administrator\Desktop\VeeamZIP (updated).ps1:110 char:1
+ $Message.IsBodyHTML = $True
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
The property 'Body' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\Administrator\Desktop\VeeamZIP (updated).ps1:111 char:1
+ $message.Body = $MesssagyBody | ConvertTo-Html -head $style | Out-String
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
Exception calling "Send" with "1" argument(s): "Value cannot be null.
Parameter name: message"
At C:\Users\Administrator\Desktop\VeeamZIP (updated).ps1:113 char:1
+ $SMTP.Send($Message)
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ArgumentNullException
I reinstalled it just in case and now I skipped the previous error, but I have a new one.v.Eremin wrote:Are you positive that Update 2 is installed and that you've followed the appropriate order?
Code: Select all
New-Object : Exception calling ".ctor" with "2" argument(s): "The parameter 'from' cannot be an empty string.
Parameter name: from"
At C:\Users\Administrator\Desktop\VeeamZIP (updated).ps1:108 char:12
+ $Message = New-Object System.Net.Mail.MailMessage $EmailFrom, $EmailTo
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException
+ FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
The property 'Subject' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\Administrator\Desktop\VeeamZIP (updated).ps1:109 char:1
+ $Message.Subject = $EmailSubject
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
The property 'IsBodyHTML' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\Administrator\Desktop\VeeamZIP (updated).ps1:110 char:1
+ $Message.IsBodyHTML = $True
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
The property 'Body' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\Administrator\Desktop\VeeamZIP (updated).ps1:111 char:1
+ $message.Body = $MesssagyBody | ConvertTo-Html -head $style | Out-String
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
Exception calling "Send" with "1" argument(s): "Value cannot be null.
Parameter name: message"
At C:\Users\Administrator\Desktop\VeeamZIP (updated).ps1:113 char:1
+ $SMTP.Send($Message)
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ArgumentNullException
Code: Select all
# Email SMTP server
$SMTPServer = ""
# Email FROM
$EmailFrom = ""
# Email TO
$EmailTo = ""
# Email subject
$EmailSubject = ""
Code: Select all
"the task is currently running (0x413101). On the event viewer I am getting the following errors
DistributedCOM
The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID
{228826AF-02E1-4226-A9E0-99A855E455A6}
and APPID
{2FD08A73-D1F1-43EB-B888-24C2496F95FD}
to the user OPSVDI03\Administrator SID (S-1-5-21-3488395209-2549419410-3413837551-500) from address LocalHost (Using LRPC) running in the application container Unavailable SID (Unavailable). This security permission can be modified using the Component Services administrative tool.
it works finev.Eremin wrote:What happens if you run this script manually, using administrator account?
I am running the task using the same user I am running the ps1 script. I changed all service accounts of VB&R to the same user, but no luck...v.Eremin wrote:Then, it seems that account used to run scheduled task lacks required permissions. Also, it might be worth checking under which account VB&R service is executed. Thanks.
the problems is the exact one that you describe, I have tried running with highest privileges but it wont work. I have tried changing the script to "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe –file “c:\veaam.ps1”" it wont work either.v.Eremin wrote:You mean if you execute the very same task manually, using the said account, everything will be ok, but when you run via Task Scheduler, it doesn't seem to work, right? If so, can you enable "Run with the highest privileges" option in the Task properties and see whether it helps or not? Thanks.
Code: Select all
The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID
{228826AF-02E1-4226-A9E0-99A855E455A6}
and APPID
{2FD08A73-D1F1-43EB-B888-24C2496F95FD}
to the user OPSVDI03\Administrator SID (S-1-5-21-3488395209-2549419410-3413837551-500) from address LocalHost (Using LRPC) running in the application container Unavailable SID (Unavailable). This security permission can be modified using the Component Services administrative tool.
During product installation make sure to install VB&R PS snap-in. Afterwards, you should add it to current PS session, using Add-PSSnapin:I have grabbed the script, but it seems powershell isn't aware of the get-VBRzip command. Where do I get that to import it into powershell? I am currently running powershell 4.0.
Code: Select all
Asnp VeeamPSSnapin
Users browsing this forum: No registered users and 18 guests