Partager via


New-SCSMRunAsAccount

New-SCSMRunAsAccount

Creates a RunAs account.

Syntax

Parameter Set: Default
New-SCSMRunAsAccount [-ManagementPack] <ManagementPack> -DisplayName <String> -Domain <String> -Password <SecureString> -UserName <String> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-Description <String> ] [-PassThru] [-SCSession <Connection[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The New-SCRunAsAccount cmdlet creates a RunAs account.

Parameters

-ComputerName<String[]>

Specifies a computer with which to establish a connection. The computer must be running the System Center Data Access service. The default value is the computer for the current management group connection.

Valid formats include a NetBIOS name, an IP address, or a fully qualified domain name (FQDN). To specify the local computer, type the computer name, "localhost", or a dot (.).

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Credential<PSCredential>

Specifies a user account under which the management group connection will run. The account must have access to the server that is specified in the ComputerName parameter, if the server is specified.

The default value is the current user. You can enter a PSCredential object that is returned by the Get-Credential cmdlet.

Aliases

none

Required?

false

Position?

named

Default Value

Current user context

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Description<String>

Specifies the description of the RunAs account.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DisplayName<String>

Specifies the display name of the RunAs account.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Domain<String>

Specifies the domain of the user for the RunAs account.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ManagementPack<ManagementPack>

Specifies the management pack in which the RunAs account will be stored. You can provide a ManagementPack object that is returned by the Get-SCSMManagementPack cmdlet.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PassThru

Specifies the output object that represents the RunAs account. 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

-Password<SecureString>

Specifies the password to be used with the RunAs account. Use Read-Host -assecurestring to provide the password.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SCSession<Connection[]>

Specifies a connection to a management server. The default value is the current management group connection.

You can enter a management group connection object that is returned by the Get-SCSMManagementGroupConnection cmdlet.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-UserName<String>

Specifies the user name to associate with the RunAs account.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

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.

  • You cannot pipe input to this cmdlet.

Outputs

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

  • This cmdlet does not generate any output.

Examples

Example 1: Create a RunAs account

This command in this example creates a RunAs account.

PS C:\>$Arguments = @{
>> ManagementPack = Get-SCManagementPack -DisplayName Default*
>> Password = Read-Host –AsSecureString "Password" 
>> UserName = "Administrator"
>> Domain = "CONTOSO"
>> DisplayName = "Patti Fuller"
>> Description = "Patti Fuller"
>> }
PS C:\>New-SCRunAsAccount @Arguments
PS C:\>Get-SCRunAsAccount -DisplayName "Patti Fuller"

 

Get-SCSMRunAsAccount

Remove-SCSMRunAsAccount

Update-SCSMRunAsAccount

Get-SCSMManagementGroupConnection

Get-SCSMManagementPack