Export (0) Print
Expand All

Set-SCSMRunAsAccount

Set-SCSMRunAsAccount

Sets the credentials to be associated with a RunAs account.

Syntax

Parameter Set: Name
Set-SCSMRunAsAccount [-RunAsProfileName] <String[]> [-RunAsAccountCredential] <PSCredential> [-ComputerName <String> ] [-Credential <PSCredential> ] [-PassThru] [ <CommonParameters>]

Parameter Set: RunAsAccount
Set-SCSMRunAsAccount [-RunAsAccount] <ManagementPackSecureReference[]> [-RunAsAccountCredential] <PSCredential> [-ComputerName <String> ] [-Credential <PSCredential> ] [-PassThru] [ <CommonParameters>]




Detailed Description

Sets the credentials for a RunAs account. This cmdlet allows you to change the stored credentials for a RunAs account when that account's user name or password changes. Passwords are securely stored in Service Manager so that impersonation can take place for workflows and other operations.

Parameters

-ComputerName<String>

Specifies the name of the computer on which the Service Manager SDK Service is running. The default value is "localhost". The user account that is defined in the Credential parameter must have access rights to the specified computer.


Aliases

none

Required?

false

Position?

named

Default Value

localhost

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Credential<PSCredential>

Specifies the credentials to use when you connect to the server on which the Service Manager SDK Service is running. The provided user account must have access to that server. The default value for this parameter is the user account of the current context.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PassThru

Passes an object representing the RunAs account object to the pipeline. By default, this cmdlet does not return any output.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RunAsAccount<ManagementPackSecureReference[]>

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


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-RunAsAccountCredential<PSCredential>

Specifies the new credential that will be bound to the RunAs account.


Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RunAsProfileName<String[]>

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters

Inputs

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

  • RunAsAccount Object

    The input for this cmdlet is a RunAs account object, such as the object that is returned by the Get-SCSMRunAsAccount cmdlet.


Outputs

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

  • None.


Examples

-------------------------- EXAMPLE 1 --------------------------

Description

-----------

This command sets the RunAs account credentials for the "Domain Admin" account to the credentials that are specified by the Credential parameter.


C:\PS>$Credential = Get-CredentialGet-SCSMRunAsAccount -RunAsProfileName "Domain Admin" | Set-SCSMRunAsAccount -RunAsAccountCredential $Credential

-------------------------- EXAMPLE 2 --------------------------

Description

-----------

This command sets the RunAs account credential to the supplied credential object and pipes the RunAs account object as a result.


C:\PS>$credential = Get-CredentialGet-SCSMRunAsAccount -RunAsProfileName "Domain Admin" | Set-SCSMRunAsAccount -RunAsAccountCredential $credential -passthruRunAsProfileName                                  UserName----------------                                  ----------Domain Admin                                      WOODGROVE\Administrator

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft