Поделиться через


New-SCSMUserRole

New-SCSMUserRole

Creates a user role in Service Manager.

Syntax

Parameter Set: Default
New-SCSMUserRole [-UserRoleType] <UserRoleTypeEnum> -DisplayName <String> [-Class <ManagementPackClass[]> ] [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-Description <String> ] [-FormTemplate <ManagementPackObjectTemplate[]> ] [-Group <EnterpriseManagementObject[]> ] [-PassThru] [-Queue <EnterpriseManagementObject[]> ] [-SCSession <Connection[]> ] [-Task <ManagementPackConsoleTask[]> ] [-User <String[]> ] [-View <ManagementPackView[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The New-SCSMUserRole cmdlet creates a user role in Service Manager.

Parameters

-Class<ManagementPackClass[]>

Specifies the instances of management pack classes to which the user role has access. This is only applicable to the Author role.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ComputerName<String[]>

Specifies the name of the computer on which the System Center Data Access service runs. The user account that is specified in the Credential parameter must have access rights to the specified computer.

Aliases

none

Required?

false

Position?

named

Default Value

localhost

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Credential<PSCredential>

Specifies the credentials that this cmdlet uses to connect to the server on which the System Center Data Access service runs. The specified user account must have access rights to that server.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Description<String>

Specifies a description for the user role.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DisplayName<String>

Specifies the name of the user role.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-FormTemplate<ManagementPackObjectTemplate[]>

Specifies the form templates that are available to the users in this user role. Forms that are not specified are not available to users in this role. Specify None to make no templates available. Specify All to make all templates available.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Group<EnterpriseManagementObject[]>

Specifies the groups that are available to members of this user role, to scope access to only specific groups of configuration items. Configuration items in groups that are not specified are not available to members in this role. Specify All to allow access to all groups. If you do not specify any value, no groups are available.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PassThru

Indicates that this cmdlet returns the user role that it creates. You can pass this object to other cmdlets.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Queue<EnterpriseManagementObject[]>

Specifies the queues that are available to members of this user role, to scope access to only specific queues of work items. Work items in queues that are not specified are not available to members in this user role. Specify All to allow access to all queues. If you do not specify any value, no queues are available.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SCSession<Connection[]>

Specifies an object that represents a session to a Service Manager management server.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Task<ManagementPackConsoleTask[]>

Specifies a management pack console task. Specify this parameter only if the ManagementPack property is not $Null. The value All means that all elements are accessible, and the value None means that no elements are accessible.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-User<String[]>

Specifies the users that are members of the user role.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-UserRoleType<UserRoleTypeEnum>

Specifies the type of user role to create. Valid values are:

-- ActivityImplementers
-- Administrators
-- AdvancedOperators
-- Authors
-- ChangeInitiators
-- ChangeManagers
-- EndUsers
-- IncidentResolvers
-- ProblemAnalysts
-- ReadOnlyOperators
-- Workflows

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-View<ManagementPackView[]>

Specifies the views that are available to members of this user role, to scope access to only specific views. Views that are not specified are not available to members in this role. Specify All to allow access to all views. If you do not specify any value, no views are available.

Aliases

none

Required?

false

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.

  • None.

    You cannot pipe input to this cmdlet.

Outputs

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

  • None.

    This cmdlet does not generate any output.

Examples

Example 1: Create a user role with all access

This command creates a user role which has access to all management packs, queues, groups, tasks, views, and templates. The members of the user role are Domain Admins.

PS C:\>New-SCSMUserRole -UserRoleType ActivityImplementer -DisplayName "Role for implementers" -User "WOODGROVE\Domain Admins"

Example 2: Create a read-only role for forms and views

This command creates a read-only operator role which has access only to forms and views. The only member in the new role is Patti Fuller.

PS C:\>New-SCSMUserRole -UserRoleType ReadOnlyOperator -DisplayName "restricted role" -Group @() -Queue @() -Task @() -User "WOODGROVE\Patti Fuller"

Get-SCSMUserRole

Remove-SCSMUserRole

Update-SCSMUserRole