PowerShell script exchange
Post Reply
$username
Veeam ProPartner
Posts: 67
Liked: 6 times
Joined: Dec 09, 2014 4:28 pm
Full Name: Gary Busey
Contact:

Issue with adding VM to jobs and setting VSS variables

Post by $username »

Hi there,

So I am not new to Powershell but I am new to Veeams Powershell and hoping someone can help me figure out what I am missing.

I have a script I am writing that builds a VM from start to finish, it's almost complete with one last thing, having it auto add VMs to jobs and set VSS options based on user inputs.

So far getting the VM into the job is easy enough but once there I may want a specific VM to not use application aware processing at all and be set to copy only but also in that same job have a VM that uses VSS and truncates logs.

I have been testing with it and it doesn't appear to be applying the settings to the job globally but I would also like to know if there is a way to get the VSS settings to apply at an object level within the job?

Example being

Code: Select all

Set-VBRJobVssOptions -Job "$backupjob" -Options $options
Doesn't change any of the VSS options

Code: Select all

GuestFSExcludeOptions      : Veeam.Backup.Model.CGuestFSExcludeOptions
VssSnapshotOptions         : Enabled: [True], IgnoreErrors: [True], IsCopyOnly: [True]
WinGuestFSIndexingOptions  : Type: [None]
LinGuestFSIndexingOptions  : Type: [None]
SqlBackupOptions           : TransactionLogsProcessing: [TruncateOnlyOnSuccessJob], BackupLogsFrequencyMin: [15], UseDbBackupRetention: [True], RetainDays: [15], ProxyAutoSelect: [True]
OracleBackupOptions        : BackupLogsEnabled: [False], BackupLogsFrequencyMin: [15], UseDbBackupRetention: [True], RetainDays: [15], ArchivedLogsTruncation: [Disabled], ArchivedLogsMaxAgeHours: [24], 
                             ArchivedLogsMaxSizeMb: [10240], SysdbaCredsId: [00000000-0000-0000-0000-000000000000], ProxyAutoSelect: [True]
GuestScriptsOptions        : Veeam.Backup.Model.CGuestScriptsOptions
ExchangeBackupOptions      : TransactionLogsProcessing: [TruncateOnlyOnSuccessJob]
WinCredsId                 : 00000000-0000-0000-0000-000000000000
LinCredsId                 : 00000000-0000-0000-0000-000000000000
GuestProxyAutoDetect       : True
Enabled                    : True
IgnoreErrors               : True
AreWinCredsSet             : False
AreLinCredsSet             : False
GuestFSIndexingType        : None
IncludedIndexingFolders    : {}
ExcludedIndexingFolders    : {}
LinGuestFSIndexingType     : None
LinIncludedIndexingFolders : {}
LinExcludedIndexingFolders : {}
IsFirstUsage               : True
m_isFirstUsage             : True
Is what is contained in $options

But if I review app processing in the GUI it doesn't change the state of VSS under the General tab despite the output reflecting

Code: Select all

GuestFSExcludeOptions      : Veeam.Backup.Model.CGuestFSExcludeOptions
VssSnapshotOptions         : Enabled: [True], IgnoreErrors: [True], IsCopyOnly: [True]
WinGuestFSIndexingOptions  : Type: [None]
LinGuestFSIndexingOptions  : Type: [None]
SqlBackupOptions           : TransactionLogsProcessing: [TruncateOnlyOnSuccessJob], BackupLogsFrequencyMin: [15], UseDbBackupRetention: [True], RetainDays: [15], ProxyAutoSelect: [True]
OracleBackupOptions        : BackupLogsEnabled: [False], BackupLogsFrequencyMin: [15], UseDbBackupRetention: [True], RetainDays: [15], ArchivedLogsTruncation: [Disabled], ArchivedLogsMaxAgeHours: [24], 
                             ArchivedLogsMaxSizeMb: [10240], SysdbaCredsId: [00000000-0000-0000-0000-000000000000], ProxyAutoSelect: [True]
GuestScriptsOptions        : Veeam.Backup.Model.CGuestScriptsOptions
ExchangeBackupOptions      : TransactionLogsProcessing: [TruncateOnlyOnSuccessJob]
WinCredsId                 : 00000000-0000-0000-0000-000000000000
LinCredsId                 : 00000000-0000-0000-0000-000000000000
GuestProxyAutoDetect       : True
Enabled                    : True
IgnoreErrors               : True
AreWinCredsSet             : False
AreLinCredsSet             : False
GuestFSIndexingType        : None
IncludedIndexingFolders    : {}
ExcludedIndexingFolders    : {}
LinGuestFSIndexingType     : None
LinIncludedIndexingFolders : {}
LinExcludedIndexingFolders : {}
IsFirstUsage               : True
m_isFirstUsage             : True
But again, the above command sets it at a job basis, any way to do it at the VM object level?
tdewin
Veeam Software
Posts: 1818
Liked: 655 times
Joined: Mar 02, 2012 1:40 pm
Full Name: Timothy Dewin
Contact:

Re: Issue with adding VM to jobs and setting VSS variables

Post by tdewin »

Yes, you can use the get-vbrjobobjectvssoptions instead (job object could be a VM but also a container like a resource pool)
https://helpcenter.veeam.com/docs/backu ... tml?ver=95
https://helpcenter.veeam.com/docs/backu ... tml?ver=95
$username
Veeam ProPartner
Posts: 67
Liked: 6 times
Joined: Dec 09, 2014 4:28 pm
Full Name: Gary Busey
Contact:

Re: Issue with adding VM to jobs and setting VSS variables

Post by $username »

Oh great, not sure how I missed that one.

Thanks Timothy!
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests