| Command | Description |
|---|---|
| Windows Info | |
Get-ComputerInfo | computer information |
(Get-CimInstance Win32_OperatingSystem).LastBootUpTime | last download time |
(Get-CimInstance Win32_LogonSession Sort-Object StartTime -Descending Select-Object -First 1).StartTime | user login time |
| GPO | |
| klist -li 0x3e7 purge | force update of the system Kerberos cache |
gpupdate /force | apply group policies on the client |
| gpupdate /target:computer /force | apply group policies on the client |
gpresult /r | checking whether group policy has been applied on the client |
Invoke-GPUpdate -Computer PC001 -Force | apply group policies on the specified computer (with administrative rights, remotely) |
$pcs = "PC001","PC002","PC003"Invoke-GPUpdate -Computer $pcs -Force | apply group policies on several computers (with administrative rights, deleted) |
Invoke-GPUpdate -Computer PC001 -Target User -Force | apply group policies and user part for a specific user (with administrative rights, deleted) |
psexec \\PC001 -s gpupdate /force | apply group policies (with administrative rights, remotely) |
| Tasks | |
Get-ScheduledTask -TaskName "Force-WSUS-CheckIn" | get task |
Get-ScheduledTaskInfo -TaskName "Force-WSUS-CheckIn" | get information about a task |
Get-ScheduledTask | Where-Object {$_.TaskName -like '*Force*' -or $_.TaskName -like '*WSUS*'} | get task |
Start-ScheduledTask -TaskName 'Force-WSUS-CheckIn' | run task |
| Windows Update List | |
Get-CimInstance -Namespace root\cimv2 -ClassName Win32_QuickFixEngineering | Sort-Object InstalledOn -Descending | Select-Object InstalledOn, HotFixID, Description, InstalledBy | Shows installed KBs (Quick Fix Engineering). (not always a complete list) |
Get-WindowsUpdateLog | |
Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*" | Where-Object { $_.DisplayName -match "Update|KB" } | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Sort-Object InstallDate -Descending | List of installed updates via “Installed Updates” |
Get-CimInstance Win32_OperatingSystem | Select-Object Caption, Version, BuildNumber, OSArchitecture, LastBootUpTime | List of installed updates |
| Network | |
ping -t | Infinite ping. Indispensable when setting up antennas or reconnecting cables. |
tracert | Shows route map |
tracert -d google.com | |
ping -l 1000 | Package size. |
ping -a | Tries to find out the computer name by IP address. |
ipconfig | information about network adapters |
ipconfig /release | Reset the current IP address (abandon it). |
ipconfig /renew | Request a new IP address from the DHCP server (router). |
ipconfig /flushdns | Clear DNS cache. Very important! If the site has moved to a new server, and your computer remembers the old address, this command will make it “forget” the old one and ask again. |
nslookup | IP address by name |
netstat -ano | active connections full view |
netstat -ab | active connections shows program name |
Test-NetConnection <IP/Name> -Port <Number> | testing connection |