Extensions/PowerShellCmdletsExtensions.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
<#
.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
# MIIexgYJKoZIhvcNAQcCoIIetzCCHrMCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgE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