Add-SCOMRunAsProfile

Adds a Run As profile.

Syntax

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.

Required Parameters

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

Type:ManagementPack[]
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

Specifies the name of the Run As profile.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Comment

Specifies an administrative comment for the profile.

Type:String
Position:4
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters: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.

Type:String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

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

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

Type:String
Position:3
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters: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.

Type:String
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters: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.

Type:Guid
Position:4
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters: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".

Type:Connection[]
Position:Named
Default value:None
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
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False