Export (0) Print
Expand All
Expand Minimize

Add-UserToUserRole

Add-UserToUserRole

Adds the specified user to an Operations Manager role.

Syntax

Parameter Set: Empty
Add-UserToUserRole [-User] <String[]> [-UserRole] <MonitoringUserRole> [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

Adds the specified user to an Operations Manager role.

Parameters

-User<String[]>

Specifies the user to add to the role.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-UserRole<MonitoringUserRole>

Specifies the role to add the user.


Aliases

none

Required?

true

Position?

2

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

none

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

none

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

Notes

  • For more information, type "Get-Help Add-UserToUserRole -detailed". For technical information, type "Get-Help Add-UserToUserRole -full".
    When specifying multiple values for a parameter, use commas to separate the values. For example, "<parameter-name> <value1>, <value2>".

Examples

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

This example uses the Get-UserRole cmdlet to return the role with the name 'OperationsManagerAuthors', and then uses
the Add-UserToUserRole cmdlet to add the user 'contoso\author' to the OperationsManagerAuthors role.


C:\PS>$role = Get-UserRole | where {$_.Name -eq 'OperationsManagerAuthors'}Add-UserToUserRole -user:'contoso\author' -UserRole:$role

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft