Set-RmsSvcAccount
Sets the service account for an AD RMS cluster.
Syntax
Set-RmsSvcAccount
[-Credential] <PSCredential>
[-Force]
[-PassThru]
[-Path] <String[]>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Set-RmsSvcAccount cmdlet sets the service account of an Active Directory Rights Management Services (AD RMS) cluster.
To specify the service account, set the Credential parameter to the service account credentials, and then set the Path parameter to <PSDrive>:\
where <PSDrive>
is the AD RMS provider drive ID.
Examples
Example 1: Modify the service account
PS C:\> Set-RmsSvcAccount -Path "."
This command changes the AD RMS service account. Because the Credential parameter is not used, the Set-RmsSvcAccount cmdlet prompts for the user name and password of the new service account.
Example 2: Modify the service account with specified credentials
PS C:\> Set-RmsSvcAccount -Path "." -Force -PassThru -Credential ITDOMAIN\adrmssvc
This command changes the AD RMS service account. Because the Credential parameter specifies the domain and user name of the account, the Set-RmsSvcAccount cmdlet prompts for the password of the new service account.
Example 3: Get credentials to use to modify a service account
PS C:\> $userAccount = Get-Credential ITDOMAIN\adrmssvc
PS C:\> Set-RmsSvcAccount -Path "." -Force -PassThru -Credential $userAccount
This command uses the Get-Credential cmdlet to prompt for the password for the ITDOMAIN\adrmsvc account and then stores the account credentials securely in a variable, which is then passed to the Set-RmsSvcAccount cmdlet.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Credential
Specifies a user name and password as a PSCredential object.
Type: | PSCredential |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Force
Overrides restrictions that prevent the command from succeeding if the restrictions do not compromise security.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Path
Specifies a provider drive and path or relative path on the current drive. Use a dot (.) to specify the current location. This parameter does not accept wildcards and has no default value.
Type: | String[] |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
PSCredential