11-22-2016 12:32 AM
Hi All
I am trying to create Selection for BackupJobDefinition like this:
$ExcludeDisksList = @("I:")
$ExcludePathsList = @("C:\Test1","C:\Test2")
$FileSystemSelection = $ExcludePathsList | % {$_} | New-BEFileSystemSelection -Recurse -Exclude -PathIsDirectory
$FileSystemSelection += Get-WmiObject Win32_Volume |? { $_.DriveType -eq 3 -and $_.DriveLetter -ne $null -and $ExcludeDisksList.Contains($_.DriveLetter) -ne $true } |%{ "$($_.DriveLetter)\" } | New-BEFileSystemSelection
$ServerName = $AgentServer.ToString().Split('.')[0]
New-BEBackupDefinition -BackupJobDefault BackupToDisk -SystemStateSelection Include -FileSystemSelection $FileSystemSelection...
And after creating the job folders that I want to exclude are still selected on list. Does anybody have an idea how to do it properly ? Thanks
12-01-2016 08:59 AM - edited 12-01-2016 09:01 AM
You can get the Command reference help file from:
https://www.veritas.com/support/en_US/article.000004567
Have you tried to directly just manually create a job with excluded folders from BEMCLI without passing varibles?
From the command reference the example to exclude a directory looks like this:
New-BEFileSystemSelection Help
These commands submit a one-time backup that backs up all of the data on the local computer with the exception of the C:\Windows directory.