PowerShell script exchange
Post Reply
Nail.Mukhametshin
Enthusiast
Posts: 51
Liked: 3 times
Joined: May 05, 2016 1:15 pm
Full Name: Наиль Мухаметшин
Location: Russia, Moscow
Contact:

Use Set-VBRBackupRepository to uncheck properties

Post by Nail.Mukhametshin »

Hi there!

I had this code to enable UsePerVMFile checkbox:

Code: Select all

PS C:\Windows\system32> Get-VBRBackupRepository -Name "Backup Repository" | ft Name,SplitStoragesPerVm -AutoSize

Name                    SplitStoragesPerVm
----                    ------------------
003 - Backup Repository              False


PS C:\Windows\system32> Get-VBRBackupRepository -Name "Backup Repository" | Set-VBRBackupRepository -UsePerVMFile


Info                           : Veeam.Backup.Model.CBackupRepositoryInfo
Id                             : 94cd3482-2d49-4882-88c2-74d0ef98100a
Name                           : Backup Repository
HostId                         : ac34e388-4875-4440-bd5a-25e971778972
MountHostId                    : 6745a759-2205-4cd2-b172-8ec8f7e60ef8
Description                    : Backup Repository
CreationTime                   : 11.10.2018 14:54:37
Path                           : D:\Backup
FullPath                       : D:|Backup
FriendlyPath                   : D:\Backup
ShareCredsId                   : 00000000-0000-0000-0000-000000000000
Type                           : WinLocal
Status                         : Ordinal
Group                          : BackupRepository
UseNfsOnMountHost              : False
VersionOfCreation              : 9.5.0.1922
IsReadOnly                     : False
IsTemporary                    : False
TypeDisplay                    : Windows
IsRotatedDriveRepository       : False
EndPointCryptoKeyId            : 00000000-0000-0000-0000-000000000000
Options                        : Veeam.Backup.Model.CDomBackupRepositoryOptions
HasBackupChainLengthLimitation : False
IsSanSnapshotOnly              : False
IsDedupStorage                 : False
SplitStoragesPerVm             : True
But how I can to uncheck it?

Code: Select all

PS C:\Windows\system32> Get-VBRBackupRepository -Name "Backup Repository" | Set-VBRBackupRepository -UsePerVMFile $false
Set-VBRBackupRepository : A positional parameter cannot be found that accepts argument 'False'.
At line:1 char:59
+ ... Backup Repository" | Set-VBRBackupRepository -UsePerVMFile $false
+                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Set-VBRBackupRepository], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Veeam.Backup.PowerShell.Cmdlets.SetVBRBackupRepository
Nail Mukhametshin | System Engineer | R&D Services Infrastructure Development | Kaspersky Lab
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Use Set-VBRBackupRepository to uncheck properties

Post by oleg.feoktistov » 1 person likes this post

Hi Nail,

In this case you need to separate a switch parameter from its boolean value with a colon:

Code: Select all

Get-VBRBackupRepository -Name "Backup Repository" | Set-VBRBackupRepository -UsePerVMFile:$false
Thanks,
Oleg
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 12 guests