Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Remove-SCSMUserRole

Updated: November 1, 2013

Applies To: System Center 2012 - Service Manager, System Center 2012 R2 Service Manager, System Center 2012 SP1 - Service Manager

Remove-SCSMUserRole

Removes a user role from Service Manager.

Syntax

Parameter Set: Default
Remove-SCSMUserRole [-UserRole] <Role[]> [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Remove-SCSMUserRole cmdlet removes a user role from Service Manager. Some user roles are designated as system user roles, and cannot be removed. You can run the following command to display the issystem attribute of all user role objects.

Get-SCSMUserRole|ft DisplayName,{$_.userrole.issystem} -au

If the user role cannot be removed, a non-terminating error will be reported.

Parameters

-UserRole<Role[]>

Specifies the UserRole object from which to remove the user.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

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.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • Microsoft.EnterpriseManagement.ServiceManager.Sdk.UserRoles.Role

    You can pipe a user role to the UserRole parameter of the Remove-SCSMUserRole cmdlet. For example, an object such as that returned by the Get-SCSMUserRole 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 --------------------------

These commands retrieve and then remove the CustomUser user role.


 

PS C:\>Get-SCSMUserRole
DisplayName                                       Description                                       LastModified
----------- ----------- ------------
Change Managers The Service Manager Change Managers user role ... 8/8/2011 7:06:35 PM
Incident Resolvers The Service Manager Incident Resolvers user ro... 8/8/2011 7:06:35 PM
Activity Implementers The Service Manager Activity Implementers user... 8/8/2011 7:06:34 PM
Workflows The Service Manager Workflows user role is cre... 8/8/2011 7:06:35 PM
Administrators The Service Manager Administrators user role i... 8/8/2011 7:06:35 PM
Problem Analysts The Service Manager Problem Analysts user role... 8/8/2011 7:06:35 PM
Advanced Operators The Service Manager Advanced Operators user ro... 8/8/2011 7:06:35 PM
Authors The Service Manager Authors user role is creat... 8/8/2011 7:06:35 PM
-Name "new role" -User "WOODGROVE\Domain A... 8/17/2011 6:34:04 PM
Change Initiators The Service Manager Change Initiators user rol... 8/8/2011 7:06:35 PM
New Role 8/17/2011 6:36:10 PM
Release Managers The Service Manager Release Managers user role... 8/8/2011 7:06:35 PM
Service Request Analyst The Service Manager Service Request Analyst us... 8/8/2011 7:06:35 PM
Read-Only Operators The Service Manager Read-Only Operators user r... 8/8/2011 7:06:35 PM
End Users The Service Manager End Users user role is cre... 8/8/2011 7:06:35 PM
New Role 8/17/2011 6:38:14 PM
PS C:\>Get-SCSMUserRole CustomUser

Name Description LastModified LastModifiedBy
---- ----------- ------------ --------------
CustomUser A Custom user userrole 8/41/2010 6:04:16 PM WOODGROVE\Administrator

 

PS C:\>Get-SCSMUserRole “New Role” | Remove-SCSMUserRole

Related topics

 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.