Anlage des Repos
This commit is contained in:
28
test/Get-OSVersion.ps1
Normal file
28
test/Get-OSVersion.ps1
Normal file
@@ -0,0 +1,28 @@
|
||||
IF (((Get-WmiObject -class Win32_OperatingSystem).version) -match 6.2) {
|
||||
|
||||
write-host "Windows Version: 8.0 was detected."
|
||||
Set-Variable -Name OSVersion -Value "Win8.0"
|
||||
|
||||
} #end if
|
||||
|
||||
ELSEIF (((Get-WmiObject -class Win32_OperatingSystem).version) -match 6.3) {
|
||||
|
||||
write-host "Windows Version: 8.1 was detected."
|
||||
Set-Variable -Name OSVersion -Value "Win8.1"
|
||||
|
||||
} #end elseif
|
||||
|
||||
ELSEIF (((Get-WmiObject -class Win32_OperatingSystem).version) -match 10.0) {
|
||||
|
||||
Write-Host "Windows Version: 10.0 was detected."
|
||||
Set-Variable -Name OSVersion -Value "Win10.0"
|
||||
|
||||
} #end elseif
|
||||
|
||||
ELSE {
|
||||
|
||||
Write-Host "Windows Version:" ((Get-WmiObject -class Win32_OperatingSystem).version) "was detected."
|
||||
Write-Host "ERROR: The Operation-System Version is unknown, cant proceed!"
|
||||
Write-Host "This Script works only with Windows 8, 8.1 and 10 Versions."
|
||||
|
||||
} #end else
|
||||
Reference in New Issue
Block a user