< Back
Connect-B2Cloud
Post
NAME Connect-B2Cloud
SYNOPSIS
The Connect-B2Cloud cmdlet sets the API key for the Backblaze B2 module cmdlets.
SYNTAX
Connect-B2Cloud [[-AccountID] <String>] [[-ApplicationKey] <String>] [<CommonParameters>]
DESCRIPTION
The Connect-B2Cloud cmdlet is used to retireve the API Uri, download Uri, and API
token that authorizes actions againt a B2 account. The cmdlet returns the results
of the REST query as text if successful and an error if not successful.
The application key and account ID can be obtained from your Backblaze B2 account page.
PARAMETERS
-AccountID <String>
The account ID for the B2 account.
Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ApplicationKey <String>
The application key to access the B2 account.
Required? false
Position? 2
Default value
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
System.String
This cmdlet takes the AccountID and ApplicationKey as strings.
OUTPUTS
PS.B2.Account
The cmdlet will output a PS.B2.Account object holding account authorization info.
NOTES
Connect-B2Cloud will always output the account information on a successful connection, to
prevent this it is recommened to pipe the out put to Out-Null. i.e. Connect-B2Cloud | Out-Null
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Connect-B2Cloud
AccountID ApiUri DownloadUri Token
--------- ------ ----------- -----
30f20426f0b1 https://api900.backblaze.com https://f900.backblaze.com YOUR_TOKEN
The above cmdlet will prompt for the account ID and application key, authenticate, and
save the token, API Uri, and download Uri returned for use in the other PS.B2 modules.
The API Uri, download Uri, and authorization token will be returned if the cmdlet was successful.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Connect-B2Cloud -AccountID 30f20426f0b1 -ApplicationKey YOUR_APPLICATION_KEY
AccountID ApiUri DownloadUri Token
--------- ------ ----------- -----
30f20426f0b1 https://api900.backblaze.com https://f900.backblaze.com YOUR_TOKEN
The above cmdlet will take the given account ID and application key authenticate and
save the token, API Uri, and download Uri returned for use in the other PS.B2 modules.
The API Uri, download Uri, and authorization token will be returned if the cmdlet was successful.
RELATED LINKS
https://www.backblaze.com/b2/docs/
SYNOPSIS
The Connect-B2Cloud cmdlet sets the API key for the Backblaze B2 module cmdlets.
SYNTAX
Connect-B2Cloud [[-AccountID] <String>] [[-ApplicationKey] <String>] [<CommonParameters>]
DESCRIPTION
The Connect-B2Cloud cmdlet is used to retireve the API Uri, download Uri, and API
token that authorizes actions againt a B2 account. The cmdlet returns the results
of the REST query as text if successful and an error if not successful.
The application key and account ID can be obtained from your Backblaze B2 account page.
PARAMETERS
-AccountID <String>
The account ID for the B2 account.
Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ApplicationKey <String>
The application key to access the B2 account.
Required? false
Position? 2
Default value
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
System.String
This cmdlet takes the AccountID and ApplicationKey as strings.
OUTPUTS
PS.B2.Account
The cmdlet will output a PS.B2.Account object holding account authorization info.
NOTES
Connect-B2Cloud will always output the account information on a successful connection, to
prevent this it is recommened to pipe the out put to Out-Null. i.e. Connect-B2Cloud | Out-Null
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Connect-B2Cloud
AccountID ApiUri DownloadUri Token
--------- ------ ----------- -----
30f20426f0b1 https://api900.backblaze.com https://f900.backblaze.com YOUR_TOKEN
The above cmdlet will prompt for the account ID and application key, authenticate, and
save the token, API Uri, and download Uri returned for use in the other PS.B2 modules.
The API Uri, download Uri, and authorization token will be returned if the cmdlet was successful.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Connect-B2Cloud -AccountID 30f20426f0b1 -ApplicationKey YOUR_APPLICATION_KEY
AccountID ApiUri DownloadUri Token
--------- ------ ----------- -----
30f20426f0b1 https://api900.backblaze.com https://f900.backblaze.com YOUR_TOKEN
The above cmdlet will take the given account ID and application key authenticate and
save the token, API Uri, and download Uri returned for use in the other PS.B2 modules.
The API Uri, download Uri, and authorization token will be returned if the cmdlet was successful.
RELATED LINKS
https://www.backblaze.com/b2/docs/