New-SCSMUserRole
New-SCSMUserRole
Creates a new 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 new 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 is running. The user account that is defined 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 to use when connecting to the server on which the System Center Data Access service is running. The provided user account must have access to that server.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-Description<String>
Describes the new 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 new 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 will be available to the users in this user role. Forms that are not specified will not be available to users in this role. Specify None so no templates are available, and specify All so all templates are available.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Group<EnterpriseManagementObject[]>
Specifies the groups that will be 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 will not be available to members in this role. Specify All to allow access to all groups. If you do not specify any value, no groups will be available.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-PassThru
Specifies the output object that represents the new user role. 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 |
-Queue<EnterpriseManagementObject[]>
Specifies the queues that will be 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 will not be available to members in this user role. Specify All to allow access to all queues. If you do not specify any value, no queues will be 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[]>
Available 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 will be members of the new 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. Allowed values are ActivityImplementers, Administrators, AdvancedOperators, Authors, ChangeInitiators, ChangeManagers, EndUsers, IncidentResolvers, ProblemAnalysts, and 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 will be available to members of this user role, to scope access to only specific views. Views that are not specified and will not be available to members in this role. Specify All to allow access to all views. If you do not specify any value, no views will be 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 --------------------------
This command creates a new user role which has access to all management packs, queues, groups, tasks, views, and templates. The members of the new user role are 'Domain Admins'.
PS C:\>$RoleArguments = @{
>> UserRoleType = "ActivityImplementer"
>> DisplayName = "new role"
>> User = "WOODGROVE\Domain Admins"
>> }
PS C:\>New-SCSMUserRole @RoleArguments
-------------------------- EXAMPLE 2 --------------------------
This command creates a new read-only operator role which has access only to forms and views. The only member in the new role is Morgan Weir.
PS C:\>$RoleArguments = @{
>> UserRoleType = "ReadOnlyOperator"
>> DisplayName = "restricted role"
>> Queue = @()
>> Group = @()
>> Task = @()
>> User = "WOODGROVE\Morgan Weir"
>> }
PS C:\>New-SCSMUserRole @RoleArguments