But if you have more quick wins, tips or oneliners let me know and i'll add them.
- netsh int ip reset all will reset your NIC back to DHCP quickly, blanking out all static settings.
- net use will show you all open SMB connections on your machine.
- If you need to grab a quick network capture, but aren’t allowed to install Wireshark or another similar tool, open an admin command prompt and run netsh trace start capture=yes tracefile=c:\capture.etl to create a file you can open in Wireshark or Netmon later. Use netsh trace stop to end the capture.
- If you just need to know what is happening, but not capture a trace, use netstat as a poor man’s packet analyzer. netstat –ano 1 | findstr X will update once a second and highlight whatever you replace X with, like :443 or SYN_SENT or the destination ip.addr you are trying to confirm your machine is attempting to communicate with.
- netstat –e can give you a quick diagnosis of layer 2. Watch out for high or increasing numbers of errors.
- Grab the TCPING utility from http://www.elifulkerson.com/projects/tcping.php and use it to monitor not just when a server reboots, but when a service is back up. Try tcping –t –b 2 addr 3389 when you reboot a Windows server. It will start to use your default beep sound when the service starts responding to SYN requests, so you know you can RDP back into the box after a reboot.
- Use netstat –r to dump your IP routing table so you can see if everything goes to the default gateway, or somewhere unexpected.
- Download BIND for Windows from https://www.isc.org/downloads/# and use the Windows ports of DIG and HOST to do DNS queries.
- And if you like DIG and HOST, grab the whois port from https://technet.microsoft.com/en-us/sysinternals/bb897435 to do command line lookups of domain names and IP networks.
- netdom query fsmo will list all the Flexible Single Master Operations members in your domain, so you can find the PDC emulator, schema master, etc.
- repadmin /replsummary will give you a quick status on AD replication. It will also let you know if you cannot reach a domain controller from the machine on which you run the command.
- repadmin /syncall will trigger an AD replication so you don’t have to wait.
- net accounts will list the domain security policy.
- gpresult /v will dump all the Group Policy Object settings affecting you and the machine you’re on.
- whoami and whoami /groups will confirm your AD account and group memberships.
- set l will let you know what domain controller authenticated you, or if you are running with cached credentials.
- Use the Windows+Arrow Keys to move windows around, including both half- and quarter-monitor views.
- Windows+Tab to bring up a quick preview of all running applications.
- Windows+X brings up the Quick Access Menu.
- Windows+P brings up projection options for when you connect to a second monitor or projector.
- Windows+number will launch whatever app is in that numeric position, from left to right, on your taskbar.
- CTRL+SHIFT+P launches an “In Private” session of Internet Explorer.
- Use the Problem Steps Recorder to automatically capture screenshots of a process or procedure. It’s great for documentation and training too. Windows+R, PSR, Enter!
- Run powercfg –h off to turn off hibernation, and buy back several GB of disk space by dropping the hiberfil.sys file that is just taking up space on your hard drive.
- Look up most error codes at the command prompt by downloading the Microsoft ERR tool and saving it in your path.
- All the Sysinternals command-line tools can be executed from the web using \\live.sysinternals.com\tools\toolname*. Check out http://live.sysinternals.com/ for all the tools that are there.
- If you are not sure of a command, run get-command *something* to get a list of appropriate commands.
- Use get-help command to get help on a command. –full gives you everything, -examples just lists some examples, and –online brings up the online help.
- PowerShell v4 and later has copy and paste already turned on, and can use the highlight, CTRL-C, CTRL-V just like any other Windows app.
- There are 155 aliases in PowerShell v5, making cmdlets from DOS and Linux available to you in PowerShell. Run alias to see all the ones that are built-in, and use the alias command to create your own.