< Back
Connect-Hive
Post
NAME Connect-Hive
SYNOPSIS
Connects to British Gas Hive API and retrieves An Access Token
SYNTAX
Connect-Hive [-Username] <String> [-Password] <SecureString> [<CommonParameters>]
DESCRIPTION
The Connect-Hive function is used to connect to the Hive 6.1 API, Hive API returns a unique token to represent the
user's credentials for subsequent calls. Acquire a token before running other PowerHive cmdlets.
PARAMETERS
-Username <String>
Hive User name
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Password <SecureString>
Hive User Password
Required? true
Position? 3
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
Does not take pipeline input.
OUTPUTS
Hive Session Vairable $Global:HiveHead
NOTES
Author: @pm091
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Connect-Hive -Username useraccount@email
This will connect to Hive with a username of "useraccount@email". The prompt will request a secure password.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Connect-Hive -Username "useraccount@email" -Password (ConvertTo-SecureString "secret" -asplaintext -force)
If you need to pass the password value in the cmdlet directly, use the ConvertTo-SecureString function.
RELATED LINKS
https://github.com/pm091/PowerHive/blob ... ct-Hive.md
SYNOPSIS
Connects to British Gas Hive API and retrieves An Access Token
SYNTAX
Connect-Hive [-Username] <String> [-Password] <SecureString> [<CommonParameters>]
DESCRIPTION
The Connect-Hive function is used to connect to the Hive 6.1 API, Hive API returns a unique token to represent the
user's credentials for subsequent calls. Acquire a token before running other PowerHive cmdlets.
PARAMETERS
-Username <String>
Hive User name
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Password <SecureString>
Hive User Password
Required? true
Position? 3
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
Does not take pipeline input.
OUTPUTS
Hive Session Vairable $Global:HiveHead
NOTES
Author: @pm091
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Connect-Hive -Username useraccount@email
This will connect to Hive with a username of "useraccount@email". The prompt will request a secure password.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Connect-Hive -Username "useraccount@email" -Password (ConvertTo-SecureString "secret" -asplaintext -force)
If you need to pass the password value in the cmdlet directly, use the ConvertTo-SecureString function.
RELATED LINKS
https://github.com/pm091/PowerHive/blob ... ct-Hive.md