Share via


New-SCSPFTenantUserRole

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 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.

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