mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-15 06:28:17 +02:00
Update check-os.ps1
This commit is contained in:
parent
71eaa3e6f1
commit
eca81b91d5
@ -16,7 +16,7 @@ try {
|
|||||||
if ($IsLinux) {
|
if ($IsLinux) {
|
||||||
$Name = $PSVersionTable.OS
|
$Name = $PSVersionTable.OS
|
||||||
if ([System.Environment]::Is64BitOperatingSystem) { $Arch = "64-bit" } else { $Arch = "32-bit" }
|
if ([System.Environment]::Is64BitOperatingSystem) { $Arch = "64-bit" } else { $Arch = "32-bit" }
|
||||||
Write-Host "✅ $Name $Arch"
|
Write-Host "✅ $Name (Linux $Arch)"
|
||||||
} else {
|
} else {
|
||||||
$OS = Get-WmiObject -class Win32_OperatingSystem
|
$OS = Get-WmiObject -class Win32_OperatingSystem
|
||||||
$Name = $OS.Caption -Replace "Microsoft Windows","Windows"
|
$Name = $OS.Caption -Replace "Microsoft Windows","Windows"
|
||||||
|
Loading…
Reference in New Issue
Block a user