Mostrando postagens com marcador wmic. Mostrar todas as postagens
Mostrando postagens com marcador wmic. Mostrar todas as postagens

WMI filtering by computer type

 Desktops and workstations

 Old:
Get-CimInstance -query "Select PCSystemType from Win32_ComputerSystem WHERE PCSystemType=1 OR PCSystemType=3"

OK:
Get-CimInstance -query  'Select * from Win32_ComputerSystem WHERE NOT (Manufacturer LIKE "%VMware%") AND (PCSystemType="1") OR (PCSystemType=3)'

SELECT * FROM Win32_ComputerSystem
WHERE PCSystemType = 1
AND Manufacturer NOT LIKE "%VMware%"
AND Manufacturer NOT LIKE "%Microsoft Corporation%"
AND Manufacturer NOT LIKE "%VirtualBox%"
AND Manufacturer NOT LIKE "%QEMU%"
AND Model NOT LIKE "%Virtual%"
AND Model NOT LIKE "%VMware%"
AND Model NOT LIKE "%VirtualBox%"
AND Model NOT LIKE "%KVM%"
AND Model NOT LIKE "%QEMU%" 

Select * from Win32_ComputerSystem WHERE (PCSystemType = 1) or (PCSystemType = 3) 

Old filter:

select * from Win32_OperatingSystem where ProductType="1"
Select * from Win32_Battery WHERE (BatteryStatus=0)



notebooks only

Select * from Win32_ComputerSystem WHERE (PCSystemType = 2)

Old filter: 

Select * from Win32_Battery WHERE (BatteryStatus <> 0)


0 – Unspecified
1 – Desktop
2 – Mobile
3 – Workstation
4 – Enterprise Server
5 – SOHO Server
6 – Appliance PC
7 – Performance Server
8 – Maximum

 

Test WMI filter:

Run in powershell

 gwmi -query 'Select * from Win32_OperatingSystem where ProductType="1"' 

Get remote logged user

 wmic /node:(hostname ou IP) computersystem get username

 

C:\Users\douglastos>wmic /node:desk0191 computersystem get username
UserName
grupo\userteste

 

Corrigir erro NATS no Segura

  ### erro Nats orbit nats stop orbit nats setup orbit services reload orbit services restart all ls -lh /var/orbini/system/incdt/ 

Mais vistos