Skip to content

Instantly share code, notes, and snippets.

@nohwnd
Last active October 28, 2020 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nohwnd/3c78fb0e452dd4a49a8810c155023e33 to your computer and use it in GitHub Desktop.
Save nohwnd/3c78fb0e452dd4a49a8810c155023e33 to your computer and use it in GitHub Desktop.
$m = Get-Command Invoke-Pester -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Module
$psv = $PSVersionTable.PSVersion
$pre = $m.PrivateData -and $m.PrivateData.PSData -and $m.PrivateData.PSData.PreRelease
$pv = if ($pre) { "$($m.Version)-$($m.PrivateData.PSData.PreRelease)" } else { $m.Version }
"Pester version : " + $pv + " " + $m.Path
"PowerShell version : " + $psv
"OS version : " + [System.Environment]::OSVersion.VersionString
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment