If Abfrage PCSystemtype
function Model {
$t = Get-WmiObject win32_computersystem -ComputerName $CPName | Select PCSystemType;
if($t.PCSystemType -eq 1 -or 3 -or 4 -or 5) {Menu} else {Clear-Host;Cpname } }
#Varibalen Model Type#################################################################################
$0= "Kein Modeltyp"
$1= "Desktop"
$2= "Laptop"
$3= "Workstation"
$4= "Dekstop"
$5= "Desktop"
$7= "Perfomance Server"
$8= "Maximum"
Ich will mit dieser Abfrage "abfragen" um was es sich für ein Gerät handelt ? ( Desktop oder Notebook)
Die mache ich win32_computersystem (PcsystemType) (Werte 1,2,3 oder 4 ...)
Wenn z.B. es Zutrifft gehe ins Menü ansonsten fange von vorne an. Doch irgendwie klappt diese Abfrage nicht !!
Bitte um Hilfe
Gruß
$t = Get-WmiObject win32_computersystem -ComputerName $CPName | Select PCSystemType;
if($t.PCSystemType -eq 1 -or 3 -or 4 -or 5) {Menu} else {Clear-Host;Cpname } }
#Varibalen Model Type#################################################################################
$0= "Kein Modeltyp"
$1= "Desktop"
$2= "Laptop"
$3= "Workstation"
$4= "Dekstop"
$5= "Desktop"
$7= "Perfomance Server"
$8= "Maximum"
Ich will mit dieser Abfrage "abfragen" um was es sich für ein Gerät handelt ? ( Desktop oder Notebook)
Die mache ich win32_computersystem (PcsystemType) (Werte 1,2,3 oder 4 ...)
Wenn z.B. es Zutrifft gehe ins Menü ansonsten fange von vorne an. Doch irgendwie klappt diese Abfrage nicht !!
Bitte um Hilfe
Gruß
Please also mark the comments that contributed to the solution of the article
Content-Key: 203400
Url: https://administrator.de/contentid/203400
Printed on: April 23, 2024 at 08:04 o'clock
1 Comment