Get-MgmtSvcToken

Creates an identity token.

Syntax

Get-MgmtSvcToken
   [-Type] <TokenType>
   [-AuthenticationSite] <Uri>
   [-ClientRealm] <Uri>
   [-User <PSCredential>]
   [-AdfsAddress <Uri>]
   [-AdfsRealm <Uri>]
   [-DisableCertificateValidation]
   [<CommonParameters>]

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.

Examples

Example 1: Create an identity token

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

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.

Parameters

-AdfsAddress

Specifies the URI of the AD FS address.

Type:Uri
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-AdfsRealm

Specifies the URI of the AD FS realm.

Type:Uri
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-AuthenticationSite

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

Type:Uri
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ClientRealm

Specifies the URI of the client realm.

Type:Uri
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-DisableCertificateValidation

Disables certificate validation for the Windows Azure Pack installation.

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

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Type

Specifies the type for the token. Valid values are:

  • Windows
  • WindowsAdfs
  • Membership
  • MembershipAdfs
Type:TokenType
Accepted values:Windows, WindowsAdfs, Membership, MembershipAdfs, Adfs
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-User

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

Type:PSCredential
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False