Functions/Private/xCheckUserHash.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function Global:xCheckUserHash{
<#
    .SYNOPSIS
    Checks for the presence of $Global:BricksetConnection.UserHash

    .DESCRIPTION
    Checks for the presence of $Global:BricksetConnection.UserHash

    .INPUTS
    None

    .OUTPUTS
    None

    .EXAMPLE
    xCheckUserHash
#>


[CmdletBinding()]

    Param (

    )
    # --- Test for Brickset Connection
    if (-not $Global:BricksetConnection.UserHash){

        throw "Brickset UserHash created from your Brickset login credentials does not exist. Please run Connect-Brickset first to create it"
    }
}