|
| 1 | +<# |
| 2 | + .SYNOPSIS |
| 3 | + Check TLS Settings for SCOM |
| 4 | + .DESCRIPTION |
| 5 | + Gathers TLS settings from the registry. |
| 6 | + .PARAMETER Servers |
| 7 | + The servers you would like to run this script to check TLS settings for Operations Manager. |
| 8 | + .EXAMPLE |
| 9 | + Local Machine: |
| 10 | + PS C:\> .\Get-TLSRegistryKeys.ps1 |
| 11 | + Remote Machine |
| 12 | + PS C:\> .\Get-TLSRegistryKeys.ps1 -Servers MS01-2019.contoso.com, MS02-2019.contoso.com |
| 13 | + .NOTES |
| 14 | + Original Author: Mike Kallhoff |
| 15 | + Author: Blake Drumm (blakedrumm@microsoft.com) |
| 16 | + Modified: July 29th, 2022 |
| 17 | + Hosted here: https://github.com/blakedrumm/SCOM-Scripts-and-SQL/blob/master/Powershell/Get-TLSRegistryKeys.ps1 |
| 18 | +#> |
| 19 | +param |
| 20 | +( |
| 21 | + [Parameter(Mandatory = $false)] |
| 22 | + [array]$Servers |
| 23 | +) |
| 24 | + |
1 | 25 | Function Get-TLSRegistryKeys |
2 | 26 | { |
3 | | - <# |
4 | | - .SYNOPSIS |
5 | | - Check TLS Settings for SCOM |
6 | | - .DESCRIPTION |
7 | | - Gathers TLS settings from the registry. |
8 | | - .PARAMETER Servers |
9 | | - The servers you would like to run this script to check TLS settings for Operations Manager. |
10 | | - .EXAMPLE |
11 | | - Local Machine: |
12 | | - PS C:\> .\Get-TLSRegistryKeys.ps1 |
13 | | - Remote Machine |
14 | | - PS C:\> .\Get-TLSRegistryKeys.ps1 -Servers MS01-2019.contoso.com, MS02-2019.contoso.com |
15 | | - .NOTES |
16 | | - Original Author: Mike Kallhoff |
17 | | - Author: Blake Drumm (blakedrumm@microsoft.com) |
18 | | - Modified: July 15th, 2022 |
19 | | - Hosted here: https://github.com/blakedrumm/SCOM-Scripts-and-SQL/blob/master/Powershell/Get-TLSRegistryKeys.ps1 |
20 | | - #> |
21 | 27 | [CmdletBinding()] |
22 | 28 | Param |
23 | 29 | ( |
@@ -371,3 +377,11 @@ Function Get-TLSRegistryKeys |
371 | 377 | } |
372 | 378 | $scriptOut | Out-String -Width 4096 |
373 | 379 | } |
| 380 | +if ($Servers) |
| 381 | +{ |
| 382 | + Get-TLSRegistryKeys -Servers $Servers |
| 383 | +} |
| 384 | +else |
| 385 | +{ |
| 386 | + Get-TLSRegistryKeys |
| 387 | +} |
0 commit comments