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

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

 

Apt only upgrade selected packages

 apt list --upgradable | cut -d"/" -f1 > /tmp/apt pico /tmp/apt cat /tmp/apt | tr "\n" " " apt install --on...

Mais vistos