This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Get-HashCheck { | |
| [CmdletBinding()] | |
| Param([Parameter(ValueFromPipeline)]$o) | |
| process { | |
| Write-Output "File: $([System.IO.FileInfo]::new($o.Path).Name)"; Write-Output '' | |
| Write-Output ($o | select Algorithm, Hash) | |
| Write-Output '' | |
| Write-Output ('Get-FileHash -Algorithm SHA256 .\' + ([System.IO.FileInfo]::new($o.Path).Name) + ' |% { if ($_.Hash -eq "' + ($o.Hash) + '") { Write-Output "Test $([System.IO.FileInfo]::new($_.Path).Name) OK" } else { Write-Output "Test $([System.IO.FileInfo]::new($_.Path).Name) KO" }}') | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Test-WebServerCertificate { | |
| [CmdletBinding()] | |
| param( | |
| [Parameter(Mandatory = $true, ValueFromPipeline = $true, Position = 0)] | |
| [string]$URL, | |
| [Parameter(Position = 1)] | |
| [ValidateRange(1,65535)] | |
| [int]$Port = 443, | |
| [Parameter(Position = 2)] | |
| [Net.WebProxy]$Proxy, |