Remote silent execution
gpupdate /force /wait:0 /quiet
Backup all GPOs
Backup-Gpo -All -Path "\\Server1\GpoBackups"
Restore all GPOs
Restore-GPO -All -Domain "contoso.com" -Path "\\Server1\Backups"
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"'
Usando o Prompt de Comando (dnscmd)Abra o Prompt de Comando como Administrador e utilize a seguinte estrutura para adicionar um registro do...