Update-SCSMRunAsAccount
Updates RunAs account credentials.
Syntax
Default (Default)
Update-SCSMRunAsAccount
[-PassThru]
[-RunAsAccount] <UserAccount[]>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Update-SCSMRunAsAccount cmdlet updates the credentials that are associated with a RunAs account. Use this cmdlet to change the stored credentials for a RunAs account when that account's user name or password changes. Passwords are securely stored so that impersonation can take place for workflows and other operations.
Examples
Example 1: Changes a RunAs account password
PS C:\>$Credential = Get-Credential
PS C:\>$Account = Get-SCSMRunAsAccount -UserName "Administrator"
PS C:\>$Account.Password = $Credential.Password
PS C:\>$Account | Update-SCSMRunAsAccount
These commands set the RunAs account password according to the supplied credential object.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: | System.Management.Automation.SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Aliases: | cf |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-PassThru
Specifies the output object that represents the RunAs account to update. This output object can be passed to other cmdlets.
Parameter properties
Type: | System.Management.Automation.SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-RunAsAccount
Specifies the object that represents the RunAs account. It contains the RunAs account name and the credentials that are associated with that account.
Parameter properties
Type: | Microsoft.EnterpriseManagement.Core.SdkUtilities.Security.UserAccount[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 1 |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: | System.Management.Automation.SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Aliases: | wi |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
Microsoft.EnterpriseManagement.Core.SdkUtilities.Security.UserAccount
You can pipe a RunAs account object to the RunAsAccount parameter of the Update-SCSMRunAsAccount cmdlet, for example, the object that is returned by the Get-SCRunAsAccount cmdlet.
Outputs
None.
This cmdlet does not generate any output.