|
20 | 20 | Where to Output the File (txt, log, etc) for Script Execution. |
21 | 21 | .EXAMPLE |
22 | 22 | Check All Certificates on 4 Servers and outputting the results to C:\Temp\Output.txt: |
23 | | - PS C:\> .\Invoke-CheckSCOMCertificates.ps1 -Servers ManagementServer1, ManagementServer2.contoso.com, Gateway.contoso.com, Agent1.contoso.com -All -OutputFile C:\Temp\Output.txt |
| 23 | + PS C:\> .\Test-SCOMCertificate.ps1 -Servers ManagementServer1, ManagementServer2.contoso.com, Gateway.contoso.com, Agent1.contoso.com -All -OutputFile C:\Temp\Output.txt |
24 | 24 | .EXAMPLE |
25 | 25 | Check for a specific Certificate serialnumber in the Local Machine Personal Certificate store: |
26 | | - PS C:\> .\Invoke-CheckSCOMCertificates.ps1 -SerialNumber 1f00000008c694dac94bcfdc4a000000000008 |
| 26 | + PS C:\> .\Test-SCOMCertificate.ps1 -SerialNumber 1f00000008c694dac94bcfdc4a000000000008 |
27 | 27 | .EXAMPLE |
28 | 28 | Check all certificates on the local machine: |
29 | | - PS C:\> .\Invoke-CheckSCOMCertificates.ps1 -All |
| 29 | + PS C:\> .\Test-SCOMCertificate.ps1 -All |
30 | 30 | .NOTES |
| 31 | + Update 03/2024 (Blake Drumm, https://blakedrumm.com/) |
| 32 | + Changed the name from Start-SCOMCertificateChecker to Test-SCOMCertificate. |
31 | 33 | Update 05/2023 (Blake Drumm, https://blakedrumm.com/) |
32 | 34 | Added ability to check certificates missing a common name. |
33 | 35 | Update 02/2023 (Blake Drumm, https://github.com/blakedrumm/) |
|
64 | 66 | Modification for CA chain validation |
65 | 67 | Adds needed check for MachineKeyStore property on the private key |
66 | 68 | Original Publish Date 1/2009 (Lincoln Atkinson?, https://blogs.technet.microsoft.com/momteam/author/latkin/) |
67 | | - |
68 | | -#>[CmdletBinding()] |
| 69 | +#> |
| 70 | +[CmdletBinding()] |
69 | 71 | [OutputType([string])] |
70 | 72 | param |
71 | 73 | ( |
@@ -679,7 +681,7 @@ $(Invoke-TimeStamp) : Script Completed |
679 | 681 | PROCESS |
680 | 682 | { |
681 | 683 | #region Function |
682 | | - function Invoke-CheckSCOMCertificate |
| 684 | + function Test-SCOMCertificate |
683 | 685 | { |
684 | 686 | [OutputType([string])] |
685 | 687 | [CmdletBinding()] |
@@ -756,18 +758,18 @@ Certificate Checker |
756 | 758 | #region DefaultActions |
757 | 759 | if ($Servers -or $OutputFile -or $All -or $SerialNumber) |
758 | 760 | { |
759 | | - Invoke-CheckSCOMCertificate -Servers $Servers -OutputFile $OutputFile -All:$All -SerialNumber:$SerialNumber |
| 761 | + Test-SCOMCertificate -Servers $Servers -OutputFile $OutputFile -All:$All -SerialNumber:$SerialNumber |
760 | 762 | } |
761 | 763 | else |
762 | 764 | { |
763 | | - # Modify line 770 if you want to change the default behavior when running this script through Powershell ISE |
| 765 | + # Modify line 772 if you want to change the default behavior when running this script through Powershell ISE |
764 | 766 | # |
765 | 767 | # Examples: |
766 | | - # Invoke-CheckSCOMCertificate -SerialNumber 1f00000008c694dac94bcfdc4a000000000008 |
767 | | - # Invoke-CheckSCOMCertificate -All |
768 | | - # Invoke-CheckSCOMCertificate -All -OutputFile C:\Temp\Certs-Output.txt |
769 | | - # Invoke-CheckSCOMCertificate -Servers MS01, MS02 |
770 | | - Invoke-CheckSCOMCertificate |
| 768 | + # Test-SCOMCertificate -SerialNumber 1f00000008c694dac94bcfdc4a000000000008 |
| 769 | + # Test-SCOMCertificate -All |
| 770 | + # Test-SCOMCertificate -All -OutputFile C:\Temp\Certs-Output.txt |
| 771 | + # Test-SCOMCertificate -Servers MS01, MS02 |
| 772 | + Test-SCOMCertificate |
771 | 773 | } |
772 | 774 | #endregion DefaultActions |
773 | 775 | } |
0 commit comments