Update-SCSMRunAsAccount

Update-SCSMRunAsAccount

Updates RunAs account credentials.

Syntax

Parameter Set: Default
Update-SCSMRunAsAccount [-RunAsAccount] <UserAccount[]> [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed 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.

Parameters

-PassThru

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RunAsAccount<UserAccount[]>

Specifies the object that represents the RunAs account. It contains the RunAs account name and the credentials that are associated with that account.

Aliases

none

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.

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.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • 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

The output type is the type of the objects that the cmdlet emits.

  • None.

    This cmdlet does not generate any output.

Examples

Example 1: Changes a RunAs account password

These commands set the RunAs account password according to the supplied credential object.

PS C:\>$Credential = Get-Credential
PS C:\>$Account = Get-SCSMRunAsAccount –UserName "Administrator"
PS C:\>$Account.Password = $Credential.Password
PS C:\>$Account | Update-SCSMRunAsAccount

Get-SCSMRunAsAccount

New-SCSMRunAsAccount

Remove-SCSMRunAsAccount

Get-Credential