Update-SCSMRunAsAccount

Updates RunAs account credentials.

Syntax

Update-SCSMRunAsAccount [-RunAsAccount] <UserAccount[]> [-PassThru] [-Confirm] [-WhatIf] [<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

-PassThru

Specifies the output object that represents the RunAs account to update. This output object can be passed to other cmdlets.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters: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.

Type:UserAccount[]
Required:True
Position:1
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
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
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

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.