Share via


Get-SCSPFTenant

Get-SCSPFTenant

Gets one or more tenant objects.

Syntax

Parameter Set: FromTenantIdParameterSetName
Get-SCSPFTenant -ID <Guid[]> [ <CommonParameters>]

Parameter Set: FromTenantIssuerParameterSetName
Get-SCSPFTenant -Issuer <Issuer> [ <CommonParameters>]

Parameter Set: FromTenantNameParameterSetName
Get-SCSPFTenant -Name <String[]> [ <CommonParameters>]

Parameter Set: FromTenantOfferParameterSetName
Get-SCSPFTenant -Offer <Offer> [ <CommonParameters>]

Parameter Set: FromTenantRoleParameterSetName
Get-SCSPFTenant -Role <Role> [ <CommonParameters>]

Parameter Set: FromTenantStampParameterSetName
Get-SCSPFTenant -Stamp <Stamp> [ <CommonParameters>]

Detailed Description

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

Parameters

-ID<Guid[]>

Specifies one or more identifiers (as a GUID) for a specific object.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Issuer<Issuer>

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Name<String[]>

Specifies the name of one or more tenants.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Offer<Offer>

Specifies an offer for which this cmdlet will return associated tenants. To obtain an offer, use the Get-SCSPFOffer cmdlet.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Role<Role>

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Stamp<Stamp>

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

1: Get all tenants.

This command displays the IDs and name of the existing tenants.

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

2: Get a tenant by its ID.

This command gets a tenant by its ID.

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

3: Get the tenant that is associated with a trusted issuer.

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

PS C:\> $ti = Get-SCSPFTrustedIssuer -Name "Litware"
PS C:\> $tnnt = Get-SCSPFTenant -Issuer $ti

4: Get a tenant by its name.

This command gets a tenant by its name.

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

5: Get the tenants that are associated with an offer.

This command gets a tenant associated to an offer. It first gets a specified offer and then uses the pipeline operator to pass the offer to the Get-SCSPFTenant cmdlet to get the associated tenant.

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

6: Get the tenant that is associated with a tenant user role.

The first command gets a tenant user role.

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

PS C:\> $role_supervisor = Get-SCSPFTenantUserRole -ID e6f9f901-2883-4478-a64e-0
0c58a423516
PS C:\> $tnnts = Get-SCSPFTenant -Role $role_supervisor

7: Get the tenants that are associated with a stamp.

The first command gets a stamp.

The second command gets the tenants associated with the stamp.

PS C:\> $stamp_silver = Get-SCSPFStamp -Name "Silver"
PS C:\> $tnnts = Get-SCSPFTenant -Stamp $stamp_silver

New-SCSPFTenant

Set-SCSPFTenant

Remove-SCSPFTenant