Get-SCSPFTenant
Gets one or more tenant objects.
Syntax
Empty (Default)
Get-SCSPFTenant
[<CommonParameters>]
FromTenantNameParameterSetName
Get-SCSPFTenant
-Name <String[]>
[<CommonParameters>]
FromTenantIdParameterSetName
Get-SCSPFTenant
-ID <Guid[]>
[<CommonParameters>]
FromTenantRoleParameterSetName
Get-SCSPFTenant
-Role <Role>
[<CommonParameters>]
FromTenantStampParameterSetName
Get-SCSPFTenant
-Stamp <Stamp>
[<CommonParameters>]
FromTenantIssuerParameterSetName
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.
Parameter properties
Type: | System.Guid[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
FromTenantIdParameterSetName
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Issuer
Specifies an object from a trusted issuer. To obtain a trusted issuer, use the Get-SCSPFTrustedIssuer cmdlet.
Parameter properties
Type: | Microsoft.SystemCenter.Foundation.SPFData.Types.Issuer |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
FromTenantIssuerParameterSetName
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Name
Specifies the name of one or more tenants.
Parameter properties
Type: | System.String[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
FromTenantNameParameterSetName
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | 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.
Parameter properties
Type: | Microsoft.SystemCenter.Foundation.SPFData.Types.Role |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
FromTenantRoleParameterSetName
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Stamp
Specifies a stamp for which this cmdlet returns associated tenants. To obtain a stamp, use the Get-SCSPFStamp cmdlet.
Parameter properties
Type: | Microsoft.SystemCenter.Foundation.SPFData.Types.Stamp |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
FromTenantStampParameterSetName
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.