Set-RMCollection
From PowerGUI Wiki
Sets properties for a computer collection.
Contents |
Syntax
Set-RMCollection [-Name] <String[]> [-BackupComponents <BackupComponents>] [-Properties <Hashtable>] [-Schedule <Schedule[]>] [-ScheduleCredential <PSCredential>] [-AgentCredentialEnabled [<Boolean>]] [-AgentCredential <PSCredential>] [-RetentionPolicyEnabled [<Boolean>]] [-RetentionPolicyCount <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-RMCollection [-InputObject] <ComputerCollection[]> [-BackupComponents <BackupComponents>] [-Properties <Hashtable>] [-Schedule <Schedule[]>] [-ScheduleCredential <PSCredential>] [-AgentCredentialEnabled [<Boolean>]] [-AgentCredential <PSCredential>] [-RetentionPolicyEnabled [<Boolean>]] [-RetentionPolicyCount <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>]
Detailed Description
Sets properties for the Recovery Manager computer collection you specify.
Related Commands
Parameters
| Name | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|
| Name | Specifies the name of the computer collection whose properties you want to set. | true | true (ByValue, ByPropertyName) | |
| BackupComponents | Use this parameter to specify the names of the System State components you want to back up. | false | false | |
| Properties | Allows you to modify many properties of a computer collection at a time by using an associative array or hash table in this parameter. For more information, see the Windows PowerShell help topic on associative arrays (hash tables). To open the topic, at the PoweShell command prompt enter the following:
help about_associative_array | false | false | |
| Schedule | Causes the computer collection you specify to use the backup creation schedule you set by using the New-RMSchedule cmdlet. | false | false | |
| ScheduleCredential | Specifies the user account under which the scheduled backup creation task will be run. This account must have sufficient permissions to back up the computer collection you specify. | false | false | |
| AgentCredentialEnabled | Specifies to use a particular account to access Backup Agent installed on the DCs in the computer collection and locations where backup files for the computer collection will be saved. To specify the credentials for the account, use the AgentCredential parameter. | false | false | |
| AgentCredential | Specifies the credentials for the account you want to use to access Backup Agent installed on the DCs in the computer collection and locations where backup files for the computer collection will be saved. TO enable using the account whose credentials you supply in this parameter, use the AgentCredentialEnabled parameter. | false | false | |
| RetentionPolicyEnabled | Specifies to delete obsolete backups for particular computer collection. To set the number of latest backups you want to keep for each DC in the computer collection, use the RetentionPolicyCount parameter. | false | false | |
| RetentionPolicyCount | Specifies the number of latest backups you want to keep for each DC in the computer collection. To enable the deletion of obsolete backups, use the RetentionPolicyEnabled parameter. | false | false | |
| WhatIf | Describes what would happen if you executed the command without actually executing the command. | false | false | |
| Confirm | Prompts for a confirmation before executing the command. | false | false | |
| InputObject | Renames the computer collection represented by the specified collection objects. Specify the name of the variable that contains the objects or type a command or expression that gets the objects. | true | true (ByValue) |
Examples
Example 1
Set-RMCollection –Name Collection1 –BackupComponents ActiveDirectory,Registry,GroupMembership,ForestRecoveryMetadata
This command sets properties for the computer collection named Collection1.
The command specifies the components to be backed up on all DCs in the computer collection. These components are:
- Active Directory - System registry - Group membership information from all global catalogs in all domains within the Active Directory forest - Forest Recovery metadata
Note: If Forest Recovery metadata is included in a backup, the backup can be used by Recovery Manager Forest Edition for recovering the Active Directory forest.
Example 2
Set-RMCollection * -RetentionPolicyEnabled $false
This command disables all backup retention policies for all existing computer collections.
Example 3
$c = Get-RMCollection | Where-Object { $_.AgentCredentialEnabled –eq $true }
C:\PS>$cred = Get-Credential
C:\PS>Set-RMCollection –InputObject $c –AgentCredential $cred
The first command in this example gets objects representing the computer collections whose properties are set to access Backup Agent and backup files with a specific user account. Then the command saves the computer collection objects in the $c variable.
The second command prompts you to enter credentials for a user account and then saves the entered credentials in the $cred variable.
The third command modifies properties of the computer collection objects saved in the $c variable to access Backup Agent and backup files with the credentials saved in the $cred variable.
