Expand Minimize
This topic has not yet been rated - Rate this topic

Add-SCOMUserRole

Updated: September 10, 2012

Applies To: System Center 2012 - Operations Manager, System Center 2012 SP1 - Operations Manager

Add-SCOMUserRole

Adds a new user role to the management group.

Syntax

Parameter Set: Operator
Add-SCOMUserRole [-Name] <String> [[-DisplayName] <String> ] [[-Description] <String> ] [[-Users] <String[]> ] -Operator [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-GroupScope <MonitoringObjectGroup[]> ] [-SCSession <Connection[]> ] [-TaskScope <ManagementPackTask[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: AdvancedOperator
Add-SCOMUserRole [-Name] <String> [[-DisplayName] <String> ] [[-Description] <String> ] [[-Users] <String[]> ] -AdvancedOperator [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-GroupScope <MonitoringObjectGroup[]> ] [-SCSession <Connection[]> ] [-TaskScope <ManagementPackTask[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: Author
Add-SCOMUserRole [-Name] <String> [[-DisplayName] <String> ] [[-Description] <String> ] [[-Users] <String[]> ] -Author [-ClassScope <ManagementPackClass[]> ] [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-GroupScope <MonitoringObjectGroup[]> ] [-SCSession <Connection[]> ] [-TaskScope <ManagementPackTask[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ReadOnlyOperator
Add-SCOMUserRole [-Name] <String> [[-DisplayName] <String> ] [[-Description] <String> ] [[-Users] <String[]> ] -ReadOnlyOperator [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-GroupScope <MonitoringObjectGroup[]> ] [-SCSession <Connection[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Add-SCOMUserRole cmdlet adds a new user role to the management group.

Parameters

-AdvancedOperator

Indicates that the new role is an Advanced Operator.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Author

Indicates that the new role is an Author.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-ClassScope<ManagementPackClass[]>

Specifies the classes that an Author role has access to. If this parameter is left unspecified, the role will be scoped to all classes. To indicate that no classes are in scope, specify $null or an empty array @().


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-ComputerName<String[]>

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

Valid formats include a NetBIOS name, an IP address, or a fully qualified domain name. 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. It must have access to the server that is specified in the ComputerName parameter if specified. The default is the current user.

Enter a PSCredential object, such as one that is returned by the Get-Credential cmdlet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Description<String>

Specifies the description of the user role. By default, displayname is used.


Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-DisplayName<String>

Specifies the display name of the user role. By default, name is used.


Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-GroupScope<MonitoringObjectGroup[]>

Specifies the groups that a user role has access to. If this parameter is left unspecified, the role is scoped to all groups. To indicate that no groups are in scope, specify $null or an empty array @().


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of the user role.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Operator

Indicates that the new role is an Operator.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-ReadOnlyOperator

Indicates that the new role is a Read-Only Operator.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-SCSession<Connection[]>

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

Enter a Management group connection object, such as one returned by the Get-SCManagementGroupConnection cmdlet.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-TaskScope<ManagementPackTask[]>

Specifies the tasks that an Author, Operator, or Advanced Operator role has access to. If this parameter is left unspecified, the role is scoped to all tasks. To indicate that no tasks are in scope, specify $null or an empty array @().


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Users<String[]>

A list of user names which are part of this user role.


Aliases

none

Required?

false

Position?

4

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before executing the command.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.


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.

Examples

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

This example adds a new read-only operator user role.


PS C:\>Add-SCOMUserRole -Name 'Script Role' -ReadOnlyOperator

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

The first two commands get all task and group objects that have SQL in their name and store the objects in the $approvedTasks and $approvedGroups variables, respectively.

The last command creates a user role containing the users Kararina and Cesar that is scoped to the tasks and groups stored in $approvedTasks and $approvedGroups.


PS C:\> $approvedTasks = Get-SCOMTask -Name '*SQL*'PS C:\>$approvedGroups = Get-SCOMGroup -DisplayName '*SQL*'PS C:\>Add-SCOMUserRole -Name 'SQL Operator' -Operator -GroupScope $approvedGroups -TaskScope $approvedTasks -User 'contoso\Katarina','contoso\Cesar'
 
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.