Get-SCSpfTenant

Gets one or more tenant objects.

Syntax

Get-SCSpfTenant -ID <Guid[]> [<CommonParameters>]
Get-SCSpfTenant -Issuer <Issuer> [<CommonParameters>]
Get-SCSpfTenant -Name <String[]> [<CommonParameters>]
Get-SCSpfTenant -Role <Role> [<CommonParameters>]
Get-SCSpfTenant -Stamp <Stamp> [<CommonParameters>]

Description

The Get-SCSPFTenant cmdlet gets one or more tenant objects from Service Provider Foundation. To create a tenant, use the New-SCSPFTenant cmdlet.

Examples

Example 1: Get all tenants

PS C:\>Get-SCSPFTenant | Format-Table -Property ID, Name

This command displays the IDs and names of existing tenants.

Example 2: Get a tenant by ID

PS C:\>$Tenant = Get-SCSPFTenant -ID e5310370-ab2d-4d51-8336-176999c9cc1e

This command gets a tenant by its ID.

Example 3: Get the tenant associated with a trusted issuer

PS C:\>$TrustedIssuer = Get-SCSPFTrustedIssuer -Name "Contoso"
PS C:\> $Tenant = Get-SCSPFTenant -Issuer $TrustedIssuer

The first command gets a trusted issuer.

The second command gets the tenant associated with a trusted issuer.

Example 4: Get a tenant by name

PS C:\>$ContosoTenant = Get-SCSPFTenant -Name "Contoso"

This command gets a tenant by its name.

Example 5: Get the tenants associated with an offer

PS C:\>Get-SCSPFOffer -Name "Contoso" | Get-SCSPFTenant

This command gets a tenant associated with an offer. To do this, it first gets the specified offer, and then passes the offer to the Get-SCSPFTenant cmdlet by using the pipeline operator.

Example 6: Get the tenant associated with a tenant user role

PS C:\>$SupervisorRole = Get-SCSPFTenantUserRole -ID e6f9f901-2883-4478-a64e-00c58a423516
PS C:\> $Tenants = Get-SCSPFTenant -Role $SupervisorRole

The first command gets a tenant user role.

The second command gets the tenants associated with the tenant user role.

Example 7: Get the tenants associated with a stamp

PS C:\>$ContosoStamp = Get-SCSPFStamp -Name "Contoso"
PS C:\> $Tenants = Get-SCSPFTenant -Stamp $ContosoStamp

The first command gets a stamp.

The second command gets the tenants associated with the stamp.

Parameters

-ID

Specifies one or more GUIDs for a specific object.

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

Specifies an object from a trusted issuer. To obtain a trusted issuer, use the Get-SCSPFTrustedIssuer cmdlet.

Type:Issuer
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

Specifies the name of one or more tenants.

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

Specifies a tenant user role for which this cmdlet returns associated tenants. To obtain a tenant user role, use the Get-SCSPFTenantUserRole cmdlet.

Type:Role
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Stamp

Specifies a stamp for which this cmdlet returns associated tenants. To obtain a stamp, use the Get-SCSPFStamp cmdlet.

Type:Stamp
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False