Extensions/PowerShellCmdletsExtensions.ps1

<#
.SYNOPSIS
A wrapper function for Invoke-WebRequest which gets content from a web page on the internet.
 
.DESCRIPTION
A wrapper function for Invoke-WebRequest which gets content from a web page on the internet.
For PowerShell Core the function calls the Invoke-WebRequest cmdlet directly.
For PowerShell 5.1 a custom Certificate Validator is used to cover the missing SkipCertificateCheck parameter.
 
.PARAMETER InvokeParams
The hashtable containing the parameters that are going to be passed to the Invoke-WebRequest cmdlet.
 
.PARAMETER SkipCertificateCheck
If the value is $true, skips certificate validation checks. This includes all validations such as
expiration, revocation, trusted root authority, etc.
#>

function Invoke-WebRequestX {
    [CmdletBinding()]
    [OutputType([Microsoft.PowerShell.Commands.BasicHtmlWebResponseObject])]
    param (
        [Parameter(Mandatory = $true)]
        [hashtable]
        $InvokeParams,

        [Parameter(Mandatory = $true)]
        [bool]
        $SkipCertificateCheck
    )

    $tempProgressPreference = $ProgressPreference
    $ProgressPreference = 'SilentlyContinue'

    $invokeWebRequestResult = $null

    if ($Global:PSVersionTable.PSEdition -eq 'Core') {
        $InvokeParams['SkipCertificateCheck'] = $SkipCertificateCheck

        $invokeWebRequestResult = Invoke-WebRequest @InvokeParams
    } else {
        [System.Net.ServicePointManager]::ServerCertificateValidationCallback = [CustomCertificatesValidator]::GetDelegate()

        try {
            $invokeWebRequestResult = Invoke-WebRequest @InvokeParams
        } finally {
            $debugLog = [CustomCertificatesValidator]::GetDebugLog()
            Write-Debug -Message $debugLog
        }
    }

    $ProgressPreference = $tempProgressPreference

    $invokeWebRequestResult
}

<#
.SYNOPSIS
A wrapper function for Invoke-RestMethod which sends an HTTP or HTTPS request to a RESTful web service.
 
.DESCRIPTION
A wrapper function for Invoke-RestMethod which sends an HTTP or HTTPS request to a RESTful web service.
For PowerShell Core the function calls the Invoke-RestMethod cmdlet directly.
For PowerShell 5.1 a custom Certificate Validator is used to cover the missing SkipCertificateCheck parameter.
 
.PARAMETER InvokeParams
The hashtable containing the parameters that are going to be passed to the Invoke-RestMethod cmdlet.
 
.PARAMETER SkipCertificateCheck
If the value is $true, skips certificate validation checks. This includes all validations such as
expiration, revocation, trusted root authority, etc.
#>

function Invoke-RestMethodX {
    [CmdletBinding()]
    [OutputType([System.Object])]
    param (
        [Parameter(Mandatory = $true)]
        [hashtable]
        $InvokeParams,

        [Parameter(Mandatory = $true)]
        [bool]
        $SkipCertificateCheck
    )

    $invokeRestMethodResult = $null

    if ($Global:PSVersionTable.PSEdition -eq 'Core') {
        $InvokeParams['SkipCertificateCheck'] = $SkipCertificateCheck

        $invokeRestMethodResult = Invoke-RestMethod @InvokeParams
    } else {
        [System.Net.ServicePointManager]::ServerCertificateValidationCallback = [CustomCertificatesValidator]::GetDelegate()

        try {
            $invokeRestMethodResult = Invoke-RestMethod @InvokeParams
        } finally {
            $debugLog = [CustomCertificatesValidator]::GetDebugLog()
            Write-Debug -Message $debugLog
        }
    }

    $invokeRestMethodResult
}

<#
.SYNOPSIS
Retrieves the Certificate thumbprint for the specified remote host.
 
.DESCRIPTION
Retrieves the Certificate thumbprint for the specified remote host. Tcp and Ssl streams are used.
 
.PARAMETER RemoteHostName
The IPAddress of the remote host.
 
.PARAMETER Port
The port number of the remote host.
 
.PARAMETER Timeout
A TimeSpan that represents the number of milliseconds to wait, or a TimeSpan that represents -1 milliseconds to wait indefinitely.
#>

function Get-TlsCertificateThumbprintFromRemoteHost {
    [CmdletBinding()]
    [OutputType([string])]
    param (
        [Parameter(Mandatory = $true, Position = 0)]
        [ValidateNotNullOrEmpty()]
        [string]
        $RemoteHostName,

        [Parameter(Mandatory = $false, Position = 1)]
        [ValidateRange(0, 65535)]
        [int]
        $Port = 443,

        [Parameter(Mandatory = $false, Position = 2)]
        [int]
        $Timeout = 3000
    )

    $certificate = $null
    $certificateThumbprint = $null

    $sslStream = $null
    $tcpStream = $null
    $tcpClient = $null

    try {
        $tcpClient = New-Object -TypeName 'System.Net.Sockets.TcpClient'

        $iAsyncResult = $tcpClient.BeginConnect($RemoteHostName, $Port, $null, $null)
        $wait = $iAsyncResult.AsyncWaitHandle.WaitOne($Timeout, $false)

        if (!$wait) {
            $tcpClient.Close()
            Write-Warning -Message "Connection attempt to server $RemoteHostName has timed out."
        } else {
            $tcpClient.EndConnect($iAsyncResult) | Out-Null

            if ($tcpClient.Connected) {
                $tcpStream = $tcpClient.GetStream()

                $sslStream = New-Object -TypeName 'System.Net.Security.SslStream' -ArgumentList ($tcpStream, $false, ({ $true } -as [System.Net.Security.RemoteCertificateValidationCallback]))
                $sslStream.AuthenticateAsClient($RemoteHostName, $null, [System.Net.ServicePointManager]::SecurityProtocol -bor [System.Net.SecurityProtocolType]::Tls12 -bor [System.Net.SecurityProtocolType]::Tls13, $false)

                $certificate = New-Object -TypeName 'System.Security.Cryptography.X509Certificates.X509Certificate2' -ArgumentList ($sslStream.RemoteCertificate)
                $certificateThumbprint = $certificate.Thumbprint
            } else {
                Write-Warning -Message "Unable to establish connection to server $RemoteHostName on port $Port."
            }
        }
    } catch {
        throw "SkipCertificateCheck with value True requires retrieving Certificate thumbprint from server $RemoteHostName which failed with the following error : $($_.Exception.Message)"
    } finally {
        if ($null -ne $certificate) {
            $certificate.Dispose()
        }

        if ($null -ne $sslStream) {
            $sslStream.Close()
            $sslStream.Dispose()
        }

        if ($null -ne $tcpStream) {
            $tcpStream.Close()
            $tcpStream.Dispose()
        }

        if ($null -ne $tcpClient) {
            $tcpClient.Close()
        }
    }

    $certificateThumbprint
}

<#
.SYNOPSIS
A wrapper function that extracts the password from a SecureString as plain text.
 
.DESCRIPTION
A wrapper function that extracts the password from a SecureString as plain text.
For PowerShell Core the function calls the ConvertFrom-SecureString cmdlet directly.
For PowerShell 5.1 the System.Runtime.InteropServices.Marshal type is used to extract
the password from the SecureString as plain text.
 
.PARAMETER Password
Specifies the SecureString Password from which the plain text password should be extracted.
#>

function Get-PlainTextPassword {
    [CmdletBinding()]
    [OutputType([string])]
    param (
        [Parameter(Mandatory = $true)]
        [SecureString]
        $Password
    )

    $plainTextPassword = $null

    if ($Global:PSVersionTable.PSEdition -eq 'Core') {
        $plainTextPassword = ConvertFrom-SecureString -SecureString $Password -AsPlainText
    } else {
        $passwordAsBinaryString = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($Password)
        $plainTextPassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($passwordAsBinaryString)
    }

    $plainTextPassword
}

<#
.SYNOPSIS
A wrapper function that converts a JSON to PSCustomObject.
 
.DESCRIPTION
A wrapper function that converts a JSON to PSCustomObject.
For PowerShell Core the function calls the ConvertFrom-Json cmdlet directly.
For PowerShell 5.1 the Newtonsoft.Json library is used to ensure the same behaviour
for both PowerShell versions.
 
.PARAMETER InputObject
Specifies the input JSON that should be converted to PSCustomObject.
 
.PARAMETER Depth
Gets or sets the maximum depth the JSON input is allowed to have. By default, it is 100.
#>

function ConvertFrom-JsonX {
    [CmdletBinding()]
    [OutputType([PSCustomObject])]
    param (
        [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)]
        [AllowEmptyString()]
        [string]
        $InputObject,

        [Parameter(Mandatory = $false)]
        [ValidateRange(1, 1024)]
        [int]
        $Depth = 100
    )

    Process {
        $result = $null

        if ($Global:PSVersionTable.PSEdition -eq 'Core') {
            $result = ConvertFrom-Json -InputObject $InputObject -Depth $Depth
        } else {
            try {
                $jsonSerializerSettings = [Newtonsoft.Json.JsonSerializerSettings]::new()

                $jsonSerializerSettings.TypeNameHandling = [Newtonsoft.Json.TypeNameHandling]::None
                $jsonSerializerSettings.MetadataPropertyHandling = [Newtonsoft.Json.MetadataPropertyHandling]::Ignore
                $jsonSerializerSettings.MaxDepth = $Depth

                $deserializedObject = [Newtonsoft.Json.JsonConvert]::DeserializeObject($InputObject, $jsonSerializerSettings)

                if ($deserializedObject -is [Newtonsoft.Json.Linq.JObject]) {
                    $result = ConvertFrom-JObject -JObject $deserializedObject
                } elseif($deserializedObject -is [Newtonsoft.Json.Linq.JArray]) {
                    $result = ConvertFrom-JArray -JArray $deserializedObject
                } else {
                    $result = $deserializedObject
                }
            } catch {
                throw "Conversion from JSON failed with error: $($_.Exception.Message)"
            }
        }

        $result
    }
}

function ConvertFrom-JObject {
    [CmdletBinding()]
    [OutputType([PSCustomObject])]
    param (
        [Parameter(Mandatory = $true)]
        [System.Object]
        $JObject
    )

    $psCustomObjectResult = [PSCustomObject] @{}

    foreach ($entry in $JObject.GetEnumerator()) {
        if ($null -eq $entry.Key) {
            return $null
        }

        if ($entry.Value -is [Newtonsoft.Json.Linq.JObject]) {
            $entryValue = ConvertFrom-JObject -JObject $entry.Value

            $psCustomObjectResult | Add-Member -MemberType NoteProperty -Name $entry.Key -Value $entryValue
        } elseif ($entry.Value -is [Newtonsoft.Json.Linq.JValue]) {
            $psCustomObjectResult | Add-Member -MemberType NoteProperty -Name $entry.Key -Value $entry.Value.Value
        } elseif ($entry.Value -is [Newtonsoft.Json.Linq.JArray]) {
            $entryValue = ConvertFrom-JArray -JArray $entry.Value
            if ($null -eq $entryValue) {
                $entryValue = @()
            }

            $psCustomObjectResult | Add-Member -MemberType NoteProperty -Name $entry.Key -Value $entryValue
        }
    }

    $psCustomObjectResult
}

function ConvertFrom-JArray {
    [CmdletBinding()]
    [OutputType([array])]
    param (
        [Parameter(Mandatory = $true)]
        [System.Object]
        $JArray
    )

    $arrayResult = @()

    for ($i = 0; $i -lt $JArray.Count; $i++) {
        $entry = $JArray[$i]
        if ($entry -is [Newtonsoft.Json.Linq.JArray]) {
            $arrayResult += ConvertFrom-JArray -JArray $entry
        } elseif ($entry -is [Newtonsoft.Json.Linq.JObject]) {
            $arrayResult += ConvertFrom-JObject -JObject $entry
        } elseif ($entry -is [Newtonsoft.Json.Linq.JValue]) {
            $arrayResult += $entry.Value
        }
    }

    if ($arrayResult.Count -eq 1) {
        , $arrayResult
    } else {
        $arrayResult
    }
}

# SIG # Begin signature block
# MIIsZAYJKoZIhvcNAQcCoIIsVTCCLFECAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0Bgor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