Set-UscClientServiceAccessToken
SYNOPSIS
Sets the access token for the client service.
SYNTAX
Set-UscClientServiceAccessToken -Server <String> [-Credential <PSCredential>] [-Generate] [-Remove] [-Force]
[-Directory <String>] [<CommonParameters>]
DESCRIPTION
Use Set-UscClientServiceAccessToken
to set the personal access token for the client service.
EXAMPLES
Example 1
PS C:\> Set-UscClientServiceAccessToken -Server 'http://localhost:5000' -Generate
This example generates a new personal access token for the client service on the local computer. You will be prompted to enter your credentials, if you are not already authenticated.
Example 2
$UserName = "your-user-name@here.com"
$SecurePat = "UWU++g3xLCQvJfHDtGuCIYMQ8YHCE5KMpncLVCT6mIfjc+qKlIhDvT1QrHA7irdsyUI4rro7h1r0V8SS9CE4Eo==" | ConvertTo-SecureString -AsPlainText -Force
$Credential = New-Object System.Management.Automation.PSCredential -ArgumentList ($UserName, $SecurePat)
Set-UscClientServiceAccessToken -Server 'http://localhost:8060' -Credential $Credential
This example sets the access token for the client service on the local computer for specified credentials. E-mail as the username and the generated PAT as the password.
PARAMETERS
-Credential
Specifies the credentials to use when connecting to the server.
Type: PSCredential
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Directory
Specifies an optional alternative client directory.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Force
{{ Fill Force Description }}
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Generate
Generates a new personal access token for the client service.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Remove
Removes the personal access token for the client service.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Server
Specifies the server to connect to.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.