< Back
Connect-AdbServer
Post
NAME Connect-AdbServer
SYNOPSIS
Login to the adb server. The session is stored in the module context and
is returned as a session object if required.
SYNTAX
Connect-AdbServer -Uri <String> -Credential <PSCredential> [-PassThru] [<CommonParameters>]
Connect-AdbServer -Uri <String> -Token <String> [-PassThru] [<CommonParameters>]
Connect-AdbServer -Uri <String> -UserRequest <String> [-PassThru] [<CommonParameters>]
Connect-AdbServer -Uri <String> -Guest [-PassThru] [<CommonParameters>]
DESCRIPTION
The adb server is specified by the uri. The uri may only contain the
host and the protocoll. Path to the api must not be specified. Multiple
autenticiation mechanism are supported:
- Token
This function will verify the token and then create a session from the
given token.
- Credential
Authentication against the endpoint /api/v1/users/login is performed,
the resulted token is stored in the session.
- UserRequest
Request access from a user by interactively query for the access in
the user session. Specify the username in this parameter.
- Guest
No authentication at all, access is limited to guest information.
PARAMETERS
-Uri <String>
Adb uri.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Credential <PSCredential>
Adb credentials.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Token <String>
Adb token.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-UserRequest <String>
Adb token.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Guest [<SwitchParameter>]
Use adb as guest.
Required? true
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-PassThru [<SwitchParameter>]
Return the session object.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Connect-AdbServer -Uri 'https://adb.contoso.com' -Credential 'john'
Connect to the adb server by using username and password.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Connect-AdbServer -Uri 'https://adb.contoso.com' -Token 'XXX'
Connect to the adb server by using an existing token copied from the adb
website.
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Connect-AdbServer -Uri 'https://adb.contoso.com' -UserRequest 'john'
Request access from the user john.
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>Connect-AdbServer -Uri 'https://adb.contoso.com' -Guest
Access the adb as a guest user.
-------------------------- EXAMPLE 5 --------------------------
PS C:\\>$adbSession = Connect-AdbServer -Uri 'https://adb.contoso.com' -Credential 'john' -PassThru
Store the adb session in a separate variable.
RELATED LINKS
SYNOPSIS
Login to the adb server. The session is stored in the module context and
is returned as a session object if required.
SYNTAX
Connect-AdbServer -Uri <String> -Credential <PSCredential> [-PassThru] [<CommonParameters>]
Connect-AdbServer -Uri <String> -Token <String> [-PassThru] [<CommonParameters>]
Connect-AdbServer -Uri <String> -UserRequest <String> [-PassThru] [<CommonParameters>]
Connect-AdbServer -Uri <String> -Guest [-PassThru] [<CommonParameters>]
DESCRIPTION
The adb server is specified by the uri. The uri may only contain the
host and the protocoll. Path to the api must not be specified. Multiple
autenticiation mechanism are supported:
- Token
This function will verify the token and then create a session from the
given token.
- Credential
Authentication against the endpoint /api/v1/users/login is performed,
the resulted token is stored in the session.
- UserRequest
Request access from a user by interactively query for the access in
the user session. Specify the username in this parameter.
- Guest
No authentication at all, access is limited to guest information.
PARAMETERS
-Uri <String>
Adb uri.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Credential <PSCredential>
Adb credentials.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Token <String>
Adb token.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-UserRequest <String>
Adb token.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Guest [<SwitchParameter>]
Use adb as guest.
Required? true
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-PassThru [<SwitchParameter>]
Return the session object.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Connect-AdbServer -Uri 'https://adb.contoso.com' -Credential 'john'
Connect to the adb server by using username and password.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Connect-AdbServer -Uri 'https://adb.contoso.com' -Token 'XXX'
Connect to the adb server by using an existing token copied from the adb
website.
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Connect-AdbServer -Uri 'https://adb.contoso.com' -UserRequest 'john'
Request access from the user john.
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>Connect-AdbServer -Uri 'https://adb.contoso.com' -Guest
Access the adb as a guest user.
-------------------------- EXAMPLE 5 --------------------------
PS C:\\>$adbSession = Connect-AdbServer -Uri 'https://adb.contoso.com' -Credential 'john' -PassThru
Store the adb session in a separate variable.
RELATED LINKS