New-SCSPFTenantUserRole

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

Syntax

New-SCSPFTenantUserRole
   -Tenant <Tenant>
   -Name <String[]>
   [-WhatIf]
   [-Confirm]
   [<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:System.Management.Automation.SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies the name of one or more tenant user roles.

Type:System.String[]
Position:Named
Default value:None
Required:True
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:Microsoft.SystemCenter.Foundation.SPFData.Types.Tenant
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

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

Type:System.Management.Automation.SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

System.Object