New-SCSpfTenantUserRole

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

Syntax

New-SCSpfTenantUserRole [-Confirm] -Name <String[]> -Tenant <Tenant> [-WhatIf] [<CommonParameters>]

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 New-SCSPFTenant cmdlet automatically creates the tenant administrator user role when it creates the tenant.

Examples

Example 1: Create a tenant user role

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

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

The second command gets a tenant.

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

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the name of one or more tenant user roles.

Type:String[]
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Tenant

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

Type:Tenant
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False