1) shutdown
Shut Down: shutdown /s /t 0
Restart: shutdown /r /t 0
Restart Into Startup Options: shutdown /r /o
2) recimg – Create Custom Recovery Images
recimg /createimage path
3) sfc /scannow – Scan System Files for Problems
4) netstat -an – List Network Connections and Ports
5)Find the five processes using the most memory (Power shell)
ps | sort –p ws | select –last 5
6)Cycle a service (stop, and then restart it) like DHCP -- (Power shell)
Restart-Service DHCP
7) Search a string in current path (Power shell)
dir -r | select-string stringname
8) To get the system info and summary
net statistics server/workstatition -uptime info
C:\Users\vishnu>systeminfo | more
Host Name: DESKTOP-JGGFDUJ
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.10586 N/A Build 10586
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
Registered Owner: vishnu
Registered Organization:
Product ID: 00331-10000-00001-AA644
Original Install Date:
9) To see all network connections your client has open, run this command:
net use
10. To see your routing table, run either of these commands:
route print
netstat -r
11. Need to run a trace, but don’t have Netmon or Wireshark, and aren’t allowed to install either one? Run this command:
netsh trace start capture=yes tracefile=c:\capture.etl
netsh trace stop
12. To quickly open a port on the firewall, run this command, changing the name, protocol, and port to suit. This example opens syslog:
netsh firewall set portopening udp 161 syslog enable all
13. To add an entry to your routing table that will be permanent, run the route add command with the –p option. Omitting that, the entry will be lost at next reboot:
route add 0.0.0.0 mask 0.0.0.0 172.16.250.5 –p
14. Here’s a simple way to see all open network connections, refreshing every second:
netstat –ano 1
15. You can add a | findstr value to watch for only a specific connection, like a client ip.addr or port:
netstat –ano | findstr 216.134.217.20
16. logs through command line
Get-Eventlog
Get-WinEvent -logname application/system
Get-Eventlog -Log Application -New 3 | Format-list | out-file list.txt
17. Get-service
18 Stop-service
19. Get-process
20 .
Shut Down: shutdown /s /t 0
Restart: shutdown /r /t 0
Restart Into Startup Options: shutdown /r /o
2) recimg – Create Custom Recovery Images
recimg /createimage path
3) sfc /scannow – Scan System Files for Problems
4) netstat -an – List Network Connections and Ports
5)Find the five processes using the most memory (Power shell)
ps | sort –p ws | select –last 5
6)Cycle a service (stop, and then restart it) like DHCP -- (Power shell)
Restart-Service DHCP
7) Search a string in current path (Power shell)
dir -r | select-string stringname
8) To get the system info and summary
net statistics server/workstatition -uptime info
C:\Users\vishnu>systeminfo | more
Host Name: DESKTOP-JGGFDUJ
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.10586 N/A Build 10586
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
Registered Owner: vishnu
Registered Organization:
Product ID: 00331-10000-00001-AA644
Original Install Date:
9) To see all network connections your client has open, run this command:
net use
10. To see your routing table, run either of these commands:
route print
netstat -r
11. Need to run a trace, but don’t have Netmon or Wireshark, and aren’t allowed to install either one? Run this command:
netsh trace start capture=yes tracefile=c:\capture.etl
netsh trace stop
12. To quickly open a port on the firewall, run this command, changing the name, protocol, and port to suit. This example opens syslog:
netsh firewall set portopening udp 161 syslog enable all
13. To add an entry to your routing table that will be permanent, run the route add command with the –p option. Omitting that, the entry will be lost at next reboot:
route add 0.0.0.0 mask 0.0.0.0 172.16.250.5 –p
14. Here’s a simple way to see all open network connections, refreshing every second:
netstat –ano 1
15. You can add a | findstr value to watch for only a specific connection, like a client ip.addr or port:
netstat –ano | findstr 216.134.217.20
16. logs through command line
Get-Eventlog
Get-WinEvent -logname application/system
Get-Eventlog -Log Application -New 3 | Format-list | out-file list.txt
17. Get-service
18 Stop-service
19. Get-process
20 .
Stop-Process -Name notepad Stop-Process -ID 2668
Comments
Post a Comment