# Get PowerShell executable file version $PsVer = ( Get-command PowerShell ).FileVersionInfo.ProductVersion Write-Host "PowerShell Version $PsVer"