PowerShell script exchange
Post Reply
SkyDiver79
Veeam ProPartner
Posts: 59
Liked: 40 times
Joined: Jan 08, 2013 4:26 pm
Full Name: Falk
Location: Germany
Contact:

Get Immutability Settings

Post by SkyDiver79 »

Hello,
is there a way to read the immutable settings of a repository?

If I use:
Get-VBRbackupRepository -Name *RepoName* | fl

then I only get :
IsImmutabilitySupported : True

but I would have liked to query the days configured.

Thanks
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 669 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Get Immutability Settings

Post by oleg.feoktistov » 1 person likes this post

Hi,

You can find this info applying GetImmutabilitySettings() method on a repository instance:

Code: Select all

$repo = Get-VBRBackupRepository -Name '*RepoName*'
$repo.GetImmutabilitySettings()
Thanks,
Oleg
ronaldw
Novice
Posts: 7
Liked: 1 time
Joined: Oct 01, 2014 11:57 am
Full Name: ronald w
Contact:

Re: Get Immutability Settings

Post by ronaldw »

This doesn't seem to work on a scaleout repository.
How does one obtain these settings on a scaleout repo?

We'd like to monitor if immutability is enabled

Code: Select all

$repo = Get-VBRBackupRepository -scaleout -name "redacted"
$repo
$repo.GetImmutabilitySettings()


PolicyType                    : DataLocality
Extent                        : {Redacted01, Redacted02}
UsePerVMBackupFiles           : True
PerformFullWhenExtentOffline  : False
EnableCapacityTier            : False
OperationalRestorePeriod      : 14
OverridePolicyEnabled         : False
OverrideSpaceThreshold        : 90
OffloadWindowOptions          : 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
                                1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
CapacityExtent                : 
CapacityExtents               : {}
EncryptionEnabled             : False
EncryptionKey                 : 
CapacityTierCopyPolicyEnabled : False
CapacityTierMovePolicyEnabled : True
ArchiveTierEnabled            : False
ArchiveExtent                 : 
ArchivePeriod                 : 90
CostOptimizedArchiveEnabled   : True
ArchiveFullBackupModeEnabled  : False
PluginBackupsOffloadEnabled   : True
CopyAllPluginBackupsEnabled   : True
CopyAllMachineBackupsEnabled  : True
Id                            : 4391eea2-d76f-4c96-8df1-c3e8f9a3a14f
Name                          : redacted
Description                   : redacted

Method invocation failed because [Veeam.Backup.PowerShell.Infos.VBRScaleOutBackupRepository] does not contain a method named 'GetImmutabilitySettings'.
At line:3 char:1
+ $repo.GetImmutabilitySettings()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : MethodNotFound
 

 
david.domask
Veeam Software
Posts: 2123
Liked: 513 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Get Immutability Settings

Post by david.domask »

Hi @ronaldw,

When you add the -Scaleout flag, Get-VBRBackupRepository returns a VBRScaleOutBackupRepository instead of CBackupRepository object.

You need to pull the repositories from the Extent property of the VBRScaleOutBackupRepository object, and then use that method on those objects.
David Domask | Product Management: Principal Analyst
ronaldw
Novice
Posts: 7
Liked: 1 time
Joined: Oct 01, 2014 11:57 am
Full Name: ronald w
Contact:

Re: Get Immutability Settings

Post by ronaldw » 1 person likes this post

Thank you.

If someone ever reads this thread and needs this:
This code works.

Code: Select all

$repo = Get-VBRBackupRepository -scaleout

foreach ($r in $repo.Extent) {
    $r.repository.getimmutabilitysettings()
}
albertwt
Veteran
Posts: 941
Liked: 53 times
Joined: Nov 05, 2009 12:24 pm
Location: Sydney, NSW
Contact:

Re: Get Immutability Settings

Post by albertwt »

Thank you for sharing here @ronaldw
--
/* Veeam software enthusiast user & supporter ! */
Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests