Get-MgmtSvcToken

Get-MgmtSvcToken

Creates an identity token.

Syntax

Parameter Set: Default
Get-MgmtSvcToken [-Type] {Adfs | Membership | MembershipAdfs | Windows | WindowsAdfs} [-AuthenticationSite] <Uri> [-ClientRealm] <Uri> [-AdfsAddress <Uri> ] [-AdfsRealm <Uri> ] [-DisableCertificateValidation] [-User <PSCredential> ] [ <CommonParameters>]


 

Detailed Description

The Get-MgmtSvcToken creates an identity token. Tokens are used by several of the Windows Azure Pack for Windows Server cmdlets. You can create a token and store it in a variable for use with other cmdlets.

Parameters

-AdfsAddress<Uri>

Specifies the URI of the AD FS address.

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

-AdfsRealm<Uri>

Specifies the URI of the AD FS realm.

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

-AuthenticationSite<Uri>

Specifies the URI of the authentication site. Use the following format: https://<computer>:<port>. For example: https://Computer01:30072.

 

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

-ClientRealm<Uri>

Specifies the URI of the client realm.

 

Aliases

none

Required?

true

Position?

3

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

-DisableCertificateValidation

Disables certificate validation for the Windows Azure Pack installation.

If you specifiy this parameter, you can use self-signed certificates.

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

-Type<TokenType>

Specifies the type for the token. Valid values are:

-- Windows

-- WindowsAdfs

-- Membership

-- MembershipAdfs

The acceptable values for this parameter are:

 

Adfs

 

Membership

 

MembershipAdfs

 

Windows

 

WindowsAdfs

 

 

 

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

-User<PSCredential>

Specifies a user account and password as a PSCredential object. To create a PSCredential object, use the Get-Credential cmdlet.

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Examples

Example 1: Create an identity token

The first command prompts the user for credentials and stores the provided user name and password in the $Credential variable.

The second command creates a Windows token for the user provided in $Credential.

PS C:\> $Credential = Get-Credential
 PS C:\> $Token = Get-MgmtSvcToken -Type Windows
AuthenticationSite "https://Computer01:30072" -ClientRealm "http://azureservices/AdminSite" -User $Credential -DisableCertificateValidation