New-SCSPFTenantUserRole

Applies To: System Center 2012 R2 Orchestrator

New-SCSPFTenantUserRole

Creates an association between a tenant and one or more self-service user roles.

Syntax

Parameter Set: Default
New-SCSPFTenantUserRole -Name <String[]> -Tenant <Tenant> [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The New-SCSPFTenantUserRole cmdlet creates an association between a tenant and one or more self-service user roles in Service Provider Foundation. The self-service roles must already have been created in Virtual Machine Manager (VMM), or by using the New-SCUserRole cmdlet in the "virtualmachinemanager" Windows PowerShell module.

You cannot use this cmdlet to create an association with a tenant administrator user role. The tenant administrator user role is created automatically when the tenant is created by the New-SCSPFTenant cmdlet.

Parameters

-Name<String[]>

Specifies the name of one or more tenant user roles.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Tenant<Tenant>

Specifies a tenant object to associate with the new tenant user role. To obtain a tenant, use the Get-SCSPFTenant cmdlet.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

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.

Outputs

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

Examples

1: Create a tenant user role.

The first command defines an array of self-service user roles.

The second command gets a tenant.

The third command creates the tenant user role for the tenant with its individual self-service user roles.

PS C:\> $roles = "Assistant", "Admin", "Developer"
PS C:\> $tnnt = Get-SCSPFTenant -Name "Contoso"
PS C:\> New-SCSPFTenantUserRole -Name $roles -Tenant $tnnt

Get-SCSPFTenantUserRole

Remove-SCSPFTenantUserRole