Add-SCOMRunAsProfile
Adds a Run As profile.
Syntax
Default (Default)
Add-SCOMRunAsProfile
-ManagementPack <ManagementPack[]>
[-Name] <String>
[[-DisplayName] <String>]
[[-Description] <String>]
[[-Comment] <String>]
[[-Guid] <Guid>]
[-SCSession <Connection[]>]
[-ComputerName <String[]>]
[-Credential <PSCredential>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Add-SCOMRunAsProfile cmdlet adds a Run As profile. A Run As profile is a group of associated Run As accounts that help manage credentials and their distribution to different computers.
Examples
Example 1: Add a Run As profile to a management pack
PS C:\>$Mp = Get-SCOMManagementPack -Name "*DefaultUser"
PS C:\> Add-SCOMRunAsProfile -Name "Contoso.MonitoringProfile" -ManagementPack $Mp
This example adds a Run As profile to a management pack.
The first command gets the management packs that have names that end with DefaultUser and stores those management packs in the variable named $Mp.
The second command creates the Run As profile named Contoso.MonitoringProfile and adds the management packs stored in $Mp to it.
Parameters
-Comment
Specifies an administrative comment for the profile.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 4 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-ComputerName
Specifies an array of names of computers. The cmdlet establishes temporary connections with management groups for these computers. Valid formats include a NetBIOS name, an IP address, or a fully qualified domain name (FQDN). To specify the local computer, specify the computer name, localhost, or a dot (.).
The computer must run the System Center Data Access service.
If you do not specify this parameter, the default is the computer for the current management group connection.
Parameter properties
Type: | String[] |
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 |
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: | 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 |
-Credential
Specifies the user account under which the management group connection runs.
Specify a PSCredential object, such as one that the Get-Credential cmdlet returns, for this parameter.
For more information about credential objects, type "Get-Help Get-Credential
".
This account must have access to the server that the ComputerName parameter specifies, if that parameter appears.
If you do not specify this parameter, the default is the account for the current user.
Parameter properties
Type: | PSCredential |
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 |
-Description
Specifies a description of the Run As profile. If this parameter is not specified, the default description is the description specified in the DisplayName parameter.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 3 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-DisplayName
Specifies the display name of the Run As profile. If this parameter is not specified, the default display name is the name specified in the Name parameter.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 2 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Guid
Specifies a globally unique identifier (GUID) to identify the Run As profile. If this parameter is not specified, the cmdlet generates a new GUID.
Parameter properties
Type: | Guid |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 4 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-ManagementPack
Specifies an array of ManagementPack objects. The cmdlet saves the RunAs profile in these management packs. To obtain a ManagementPack object, use the Get-SCOMManagementPack cmdlet.
Parameter properties
Type: | ManagementPack[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Name
Specifies the name of the Run As profile.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 1 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-SCSession
Specifies an array of Connection objects. To get Connection objects, use the Get-SCOMManagementGroupConnection cmdlet.
If this parameter does not appear, the cmdlet uses the active persistent connection to a management group.
Use the SCSession parameter to specify a different persistent connection.
You can create a temporary connection to a management group by using the ComputerName and Credential parameters.
For more information, type "Get-Help about_OpsMgr_Connections
".
Parameter properties
Type: | Connection[] |
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 |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: | 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.