exports/Set-CVVMGroup.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ---------------------------------------------------------------------------------- <# .Synopsis Updates the VM Group .Description Updates the VM Group .Example PS C:\> {{ Add code here }} {{ Add output here }} .Example PS C:\> {{ Add code here }} {{ Add output here }} .Inputs Commvault.Powershell.Models.ICommvaultPowerShellIdentity .Outputs Commvault.Powershell.Models.IGenericResp .Outputs Commvault.Powershell.Models.IGetVMGroupResp .Notes COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. ACCESSNODE <IIdName[]>: . [Id <Int64?>]: [Name <String>]: APPLICATIONVALIDATION <IVMAppValidation>: vmAppValidation [BackupDestinationId <Int64?>]: [BackupDestinationName <String>]: [CopyId <Int64?>]: Id of the source copy [CopyIsActive <Boolean?>]: Is this an active backup destination? [CopyIsSnapCopy <Boolean?>]: Is this a snap copy? [CopyName <String>]: Name of the source copy [CopyPrecedence <Int64?>]: Order of backup destination copy created in storage policy. Primary copy will be used as default copy. [CredentialsName <String>]: username to access the network path [CredentialsPassword <String>]: password to access the network path [KeepValidatedVMSRunning <Boolean?>]: If true then validated VMs will be available until expiration time set on the recovery target [MaximumNoOfThreads <Int64?>]: Number of backup Validation Threads [RecoveryTargetId <Int64?>]: [RecoveryTargetName <String>]: [SavedCredentialsId <Int64?>]: [SavedCredentialsName <String>]: [ScheduleDescription <String>]: Description for validation schedule [ScheduleId <Int64?>]: [ScheduleIsScheduleEnabled <Boolean?>]: True if application validation schedule is enabled [ScheduleTaskId <Int64?>]: Job Id for the application validation task. 0 if schedule is disabled [UnixArguments <String>]: Arguments for the script [UnixIsDisabled <Boolean?>]: Is the script disabled [UnixIsLocal <Boolean?>]: True if the script is local [UnixPath <String>]: Path for the validation script [UnixUncCredentialsName <String>]: username to access the network path [UnixUncCredentialsPassword <String>]: password to access the network path [UnixUncSavedCredentialsId <Int64?>]: [UnixUncSavedCredentialsName <String>]: [UseSourceVMEsxToMount <Boolean?>]: Use Source VM ESX To Mount [ValidateVMBackups <Boolean?>]: True if VM Backup validation is enabled [WindowArguments <String>]: Arguments for the script [WindowIsDisabled <Boolean?>]: Is the script disabled [WindowIsLocal <Boolean?>]: True if the script is local [WindowPath <String>]: Path for the validation script [WindowsUncCredentialsName <String>]: username to access the network path [WindowsUncCredentialsPassword <String>]: password to access the network path [WindowsUncSavedCredentialsId <Int64?>]: [WindowsUncSavedCredentialsName <String>]: CONTENTRULEGROUPS <IRuleGroupContent[]>: . [MatchRule <String>]: Enum which specifies the whether to match all rules or any of the rules [Rules <IRuleContent[]>]: [Condition <String>]: Operation type for VM rules/filters [DisplayName <String>]: The display name of the entity to be added [Guid <String>]: GUID of the entity to be added as content [Name <String>]: name of the VM to be added as content [Type <String>]: [Value <String>]: value for the few type of VM Content like powerstate CONTENTVIRTUALMACHINES <IVirtualMachinecontent[]>: . [ExistingCredentialId <Int64?>]: [ExistingCredentialName <String>]: [GuestCredentialAssocId <Int64?>]: Credential association ID given to link entity with credential id. [GuestCredentialsPassword <String>]: [GuestCredentialsUserName <String>]: [Guid <String>]: GUID of the VM to be added as content [Name <String>]: name of the VM to be added as content [Type <String>]: DISKFILTERRULES <IVMDiskFilter[]>: . [Condition <String>]: Operation type for VM rules/filters [FilterType <String>]: [Name <String>]: The string to be filtered [Overwrite <Boolean?>]: True if disk filter in vmgroup has to be overwritten, by default it will append the content [VMGuid <String>]: VM Guid of the Virtual Machine whose disk has to be filtered . This is optional. if not given, all disks of name and type from all Vms added in content will be filtered [VMName <String>]: VM Name of the Virtual Machine whose disk has to be filtered . This is optional. if not given, all disks of name and type from all Vms added in content will be filtered [Value <String>]: The value string to be filtered, in case of disk tag , value of tag to be filtered FILTERRULEGROUPS <IRuleGroupContent[]>: . [MatchRule <String>]: Enum which specifies the whether to match all rules or any of the rules [Rules <IRuleContent[]>]: [Condition <String>]: Operation type for VM rules/filters [DisplayName <String>]: The display name of the entity to be added [Guid <String>]: GUID of the entity to be added as content [Name <String>]: name of the VM to be added as content [Type <String>]: [Value <String>]: value for the few type of VM Content like powerstate FILTERVIRTUALMACHINES <IVirtualMachinecontent[]>: . [ExistingCredentialId <Int64?>]: [ExistingCredentialName <String>]: [GuestCredentialAssocId <Int64?>]: Credential association ID given to link entity with credential id. [GuestCredentialsPassword <String>]: [GuestCredentialsUserName <String>]: [Guid <String>]: GUID of the VM to be added as content [Name <String>]: name of the VM to be added as content [Type <String>]: INPUTOBJECT <ICommvaultPowerShellIdentity>: Identity Parameter [AccessPathId <Int64?>]: Id of the mount path whose access path has to be deleted [AgentId <Int64?>]: Id of the agent to be modified [AppGuid <String>]: GUID of the Application to get details [AppId <Int64?>]: Commvault exchange app id [ApplicationGroupId <Int64?>]: applicationGroupId is the ID of the Kubernetes application group [ArrayId <Int64?>]: [AssetId <String>]: FQDN of the asset [BackupDestinationId <Int64?>]: Id of the backupDestination to be modified [BackupDestionationId <Int64?>]: [BackupLocationId <Int64?>]: Id of the backup location whose details have to be fetched [BlackoutWindowId <Int64?>]: Id of the Blackout Window whose details have to be fetched [BucketId <Int64?>]: Id of Bucket [ClientId <Int64?>]: [CloudStorageId <Int64?>]: Id of cloud Storage [ClusterId <Int64?>]: [CompanyId <Int64?>]: Id of the Company whose details have to be fetched [CopyId <Int64?>]: [CredentialId <String>]: [CredentialName <String>]: [DomainId <Int64?>]: ID of the AD/LDAP domain [DrOperation <String>]: Name of DR operation. Case insensitive [DriveId <Int64?>]: Id of the Drive of which the drive details has to be displayed [EntityId <Int64?>]: Unique id for the entity [EntityType <String>]: Type of the entity [FailoverGroupId <Int64?>]: Id of the failover group [GlobalSearchEntity <String>]: name of global search entity [HfsShareId <Int64?>]: Id of the HFS Share to fetch its status [HyperScaleStorageId <Int64?>]: Id of hyperscale storage [HypervisorId <Int64?>]: Id of the HYpervisor to get [Id <Int64?>]: [IndexServerClientId <Int64?>]: Pseudo client id of the index server [InstanceId <Int64?>]: Id of the instance to modify [InventoryId <Int64?>]: Inventory id [JobId <Int64?>]: [KmsId <Int64?>]: Id of Key Management Server [LibraryId <Int64?>]: Id of the library to view the data [MediaAgentId <Int64?>]: Id of the Media Agent whose details have to be fetched [MetadataCacheId <Int64?>]: Id of metadata cache [Name <String>]: [NameSpace <String>]: Name of the namespace to browse for content [NodeId <Int64?>]: Id of node [PairId <Int64?>]: [PlanId <Int64?>]: Id of the plan to fetch details [RecoveryTargetId <Int64?>]: id of recovery target [RegionId <Int64?>]: [RegionList <String>]: List of region names/ids to be deleted. If region ids are passed, set isRegionIdList=true [ReplicationGroupId <String>]: [RequestId <Int64?>]: Unique identifier for the request [RoleId <Int64?>]: Role Id [RpsId <String>]: [RuleId <Int64?>]: Id of the rule to update in Plan [ScheduleId <Int64?>]: ID of the DR operation schedule [SchedulePolicyId <Int64?>]: [ServerGroupId <Int64?>]: Id of the serverGroupId whose details have to be fetched [ServerId <Int64?>]: Id of the server to modify [StoragePoolId <Int64?>]: Id of the storage pool whose associated copies have to be fetched [SubclientId <Int64?>]: Id of the subclient to modify [TagId <Int64?>]: Id of the tag to delete [TagValue <String>]: tag value to delete [TopologyId <String>]: [UserGroupId <Int64?>]: Id of the user-group whose details have to be fetched [UserId <Int64?>]: Id of the User whose details have to be fetched [VMGroupId <Int64?>]: Id of the VMgroup to update [VMGuid <String>]: GUID of the Provisioned VM [VMUuid <String>]: The vmUUID can be obtained from GET /virtualMachines UUID property [VendorId <Int64?>]: SECURITYASSOCIATIONS <ISecurityAssoc[]>: . [ExternalUserGroupId <Int64?>]: User Group Id [ExternalUserGroupName <String>]: External Group Name [ExternalUserGroupProviderId <Int64?>]: Provider id [ExternalUserGroupProviderName <String>]: Provider Name [IsCreatorAssociation <Boolean?>]: [PermissionList <IPermissionResp[]>]: [CategoryId <Int64?>]: [CategoryName <String>]: [Exclude <Boolean?>]: Flag to specify if this is included permission or excluded permission. [PermissionId <Int64?>]: [PermissionName <String>]: [Type <String>]: Returns the type of association. [RoleId <Int64?>]: [RoleName <String>]: [UserGroupId <Int64?>]: [UserGroupName <String>]: [UserId <Int64?>]: [UserName <String>]: SETTINGS <IVMGroupSettings>: . [AllowEmptySubclient <Boolean?>]: True if empty subclient is allowed [AutoDetectVMOwner <Boolean?>]: True if auto detect VM Owner enabled [CollectFileDetailsFromSnapshotCopy <Boolean?>]: True if metadata collection is enabled for intellisnap jobs. Only applicable for Indexing v1 [CollectFileDetailsforGranularRecovery <Boolean?>]: True if metadata collection is enabled. Only applicable for Indexing v1 [CredentialsName <String>]: username to access the network path [CredentialsPassword <String>]: password to access the network path [CrossAccountFullCopy <Boolean?>]: True if full copy of amazon snapshot to different amazon account is enabled [CrossAccountShareOnly <Boolean?>]: True if replicate and copy or sharing of amazon snapshot to different amazon account in same or different geographic location is enabled [CustomSnapshotResourceGroup <String>]: Custom snapshot resource group name for Azure [CustomSnapshotTags <IResourceTag[]>]: represents custom tags to be set on snapshots [Name <String>]: represents name of the tag [Value <String>]: represents value of the tag [DatastoreFreespaceCheck <Boolean?>]: True if Datastore Free space check is enabled [DatastoreFreespaceRequired <Int64?>]: precentage of datastore free space check value [DestinationAccountId <Int64?>]: [DestinationAccountName <String>]: [IsApplicationAware <Boolean?>]: Is the VM App Aware [IsVMGroupDiskFiltersIncluded <Boolean?>]: Is VM group disk filters included in VM instance disk filters [JobStartTime <Int64?>]: Start Time for the VM Group Job [NoOfReaders <Int64?>]: Number of readers for backup [RegionalSnapshot <Boolean?>]: True when snapshot storage location is regional [SavedCredentialsId <Int64?>]: [SavedCredentialsName <String>]: [TransportMode <String>]: transport mode based on environment. Values are case sensitive [UseChangedBlockTrackingOnVM <Boolean?>]: True if Changed Block Tracking is enabled [UseVMCheckpointSetting <Boolean?>]: True if use VM CheckPoint setting is enabled [VMBackupType <String>]: .Link https://docs.microsoft.com/en-us/powershell/module/commvaultpowershell/set-cvvmgroup #> function Set-CVVMGroup { [OutputType([Commvault.Powershell.Models.IGetVMGroupResp], [Commvault.Powershell.Models.IGenericResp])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Commvault.Powershell.Category('Path')] [System.Int64] # Id of the VMgroup to update ${VMGroupId}, [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Commvault.Powershell.Category('Path')] [Commvault.Powershell.Models.ICommvaultPowerShellIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] [Commvault.Powershell.Category('Body')] [Commvault.Powershell.Models.IIdName[]] # . # To construct, see NOTES section for ACCESSNODE properties and create a hash table. ${AccessNode}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Management.Automation.SwitchParameter] # true if Backup is enabled ${ActivityControlEnableBackup}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Management.Automation.SwitchParameter] # true if Restore is enabled ${ActivityControlEnableRestore}, [Parameter()] [Commvault.Powershell.Category('Body')] [Commvault.Powershell.Models.IVMAppValidation] # vmAppValidation # To construct, see NOTES section for APPLICATIONVALIDATION properties and create a hash table. ${ApplicationValidation}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # Delayed by n Hrs ${BackupActivityControlOptionDelayTime}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Management.Automation.SwitchParameter] # True if the activity will be enabled after a delay time interval ${BackupActivityControlOptionEnableAfterDelay}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Int64] # . ${BackupActivityControlOptionsTimeZoneId}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # . ${BackupActivityControlOptionsTimeZoneName}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Management.Automation.SwitchParameter] # True if content in vmgroup has to be overwritten, by default it will append the content ${ContentOverwrite}, [Parameter()] [Commvault.Powershell.Category('Body')] [Commvault.Powershell.Models.IRuleGroupContent[]] # . # To construct, see NOTES section for CONTENTRULEGROUPS properties and create a hash table. ${ContentRuleGroups}, [Parameter()] [Commvault.Powershell.Category('Body')] [Commvault.Powershell.Models.IVirtualMachinecontent[]] # . # To construct, see NOTES section for CONTENTVIRTUALMACHINES properties and create a hash table. ${ContentVirtualMachines}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Management.Automation.SwitchParameter] # True if content in vmgroup has to be overwritten, by default it will append the content ${DiskFilterOverwrite}, [Parameter()] [Commvault.Powershell.Category('Body')] [Commvault.Powershell.Models.IVMDiskFilter[]] # . # To construct, see NOTES section for DISKFILTERRULES properties and create a hash table. ${DiskFilterRules}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Management.Automation.SwitchParameter] # True if file indexing needs to be enabled ${EnableFileIndexing}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Management.Automation.SwitchParameter] # True if content in vmgroup has to be overwritten, by default it will append the content ${FilterOverwrite}, [Parameter()] [Commvault.Powershell.Category('Body')] [Commvault.Powershell.Models.IRuleGroupContent[]] # . # To construct, see NOTES section for FILTERRULEGROUPS properties and create a hash table. ${FilterRuleGroups}, [Parameter()] [Commvault.Powershell.Category('Body')] [Commvault.Powershell.Models.IVirtualMachinecontent[]] # . # To construct, see NOTES section for FILTERVIRTUALMACHINES properties and create a hash table. ${FilterVirtualMachines}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # Meditech Listener IP of FQDN name ${MeditechSystemListenerIP}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Int64] # Meditech Listener Port ${MeditechSystemListenerPort}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Int64] # MBF timeout (in seconds) ${MeditechSystemMbFtimeout}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # Meditech system name ${MeditechSystemName}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # subclient name ${NewName}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Int64] # . ${PlanId}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # . ${PlanName}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # Delayed by n Hrs ${RestoreActivityControlOptionDelayTime}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Management.Automation.SwitchParameter] # True if the activity will be enabled after a delay time interval ${RestoreActivityControlOptionEnableAfterDelay}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Int64] # . ${RestoreActivityControlOptionsTimeZoneId}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # . ${RestoreActivityControlOptionsTimeZoneName}, [Parameter()] [Commvault.Powershell.Category('Body')] [Commvault.Powershell.Models.ISecurityAssoc[]] # . # To construct, see NOTES section for SECURITYASSOCIATIONS properties and create a hash table. ${SecurityAssociations}, [Parameter()] [Commvault.Powershell.Category('Body')] [Commvault.Powershell.Models.IVMGroupSettings] # . # To construct, see NOTES section for SETTINGS properties and create a hash table. ${Settings}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Int64] # . ${SnapEngineId}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # . ${SnapEngineName}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Int64] # . ${SnapMountProxyId}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # . ${SnapMountProxyName}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # . ${SnapshotManagementBackupCopyInterface}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Management.Automation.SwitchParameter] # True if hardware snapshot is enabled ${SnapshotManagementEnableHardwareSnapshot}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Management.Automation.SwitchParameter] # True if independent disk option is enabled ${SnapshotManagementIsIndependentDisksEnabled}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Management.Automation.SwitchParameter] # True if raw device maps option is enabled ${SnapshotManagementIsRawDeviceMapsEnabled}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # Name of ESX Host ${SnapshotManagementSnapMountEsxHost}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Management.Automation.SwitchParameter] # True if separate proxy client is used for snap to tape ${SnapshotManagementUseSeparateProxyForSnapToTape}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # Virtual machine application user name ${SnapshotManagementVMApplicationUserName}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.Int64] # . ${StorageId}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # . ${StorageName}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # username to access the network path ${UserAccountName}, [Parameter()] [Commvault.Powershell.Category('Body')] [System.String] # password to access the network path ${UserAccountPassword}, [Parameter(DontShow)] [Commvault.Powershell.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Commvault.Powershell.Category('Runtime')] [Commvault.Powershell.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Commvault.Powershell.Category('Runtime')] [Commvault.Powershell.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Commvault.Powershell.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Commvault.Powershell.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Commvault.Powershell.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ UpdateExpanded = 'CommvaultPowershell.private\Set-CVVMGroup_UpdateExpanded'; UpdateViaIdentityExpanded = 'CommvaultPowershell.private\Set-CVVMGroup_UpdateViaIdentityExpanded'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } |