Get-SCSPFTenant

Gets one or more tenant objects.

Syntax

Get-SCSpfTenant []
Get-SCSPFTenant
   -Name <String[]>
   [<CommonParameters>]
Get-SCSPFTenant
   -ID <Guid[]>
   [<CommonParameters>]
Get-SCSPFTenant
   -Role <Role>
   [<CommonParameters>]
Get-SCSPFTenant
   -Stamp <Stamp>
   [<CommonParameters>]
Get-SCSPFTenant
   -Issuer <Issuer>
   [<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:System.Guid[]
Position:Named
Default value:None
Required:True
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:Microsoft.SystemCenter.Foundation.SPFData.Types.Issuer
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

Specifies the name of one or more tenants.

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

Inputs

Microsoft.SystemCenter.Foundation.SPFData.Types.Role

Microsoft.SystemCenter.Foundation.SPFData.Types.Stamp

Microsoft.SystemCenter.Foundation.SPFData.Types.Issuer

Outputs

System.Object