Request-VCFToken¶
Synopsis¶
Requests an authentication token from SDDC Manager.
Syntax¶
Request-VCFToken [-fqdn] <String> [[-username] <String>] [[-password] <String>] [[-credential] <PSCredential>] [-skipCertificateCheck] [<CommonParameters>]
Description¶
The Request-VCFToken
cmdlet connects to the specified SDDC Manager and requests API access and refresh tokens. It is required once per session before running all other cmdlets.
Examples¶
Example 1¶
Request-VCFToken -fqdn sfo-vcf01.sfo.rainpole.io -username administrator@vsphere.local -password VMw@re1!
This example shows how to connect to the specified SDDC Manager using a clear-text username and password.
Example 2¶
$secureString = Read-Host -AsSecureString 'Password'
Request-VCFToken -fqdn sfo-vcf01.sfo.rainpole.io -username admin@local -password $secureString
This example shows how to connect to the specified SDDC Manager instance using a SecureString
password.
Example 3¶
$credential = Get-Credential
Request-VCFToken -fqdn sfo-vcf01.sfo.rainpole.io -credential $credential
This example shows how to connect to the specified SDDC Manager instance using a PSCredential.
Example 4¶
Request-VCFToken -fqdn sfo-vcf01.sfo.rainpole.io -username admin@local
This example shows how to connect to the SDDC Manager instance where the user will be prompted for a password.
Example 5¶
Request-VCFToken -fqdn sfo-vcf01.sfo.rainpole.io
This example shows how to connect to the specified SDDC Manager instance where the user will be prompted for a username and password.
Parameters¶
-fqdn¶
The fully qualified domain name or IP Address of the SDDC Manager instance.
Type: String
Parameter Sets: PSCredentialSet, UserNameAndPasswordSet
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-username¶
The username to authenticate to the SDDC Manager instance.
Type: String
Parameter Sets: UserNameAndPasswordSet
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-password¶
The password to authenticate to the SDDC Manager instance. This parameter takes either a string or a SecureString
value.
If not specified, the user will be prompted for the SecureString
value.
Type: String
Parameter Sets: UserNameAndPasswordSet
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-credential¶
Specifies to authenticate to the SDDC Manager instance using a PSCredential object.
Type: PSCredential
Parameter Sets: PSCredentialSet
Aliases:
Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-skipCertificateCheck¶
Switch to skip certificate check when connecting to the SDDC Manager instance.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Common Parameters¶
This cmdlet supports the common parameters: -Debug
, -ErrorAction
, -ErrorVariable
, -InformationAction
, -InformationVariable
, -OutVariable
, -OutBuffer
, -PipelineVariable
, -Verbose
, -WarningAction
, and -WarningVariable
. For more information, see about_CommonParameters.