Advertisement
viper25

Useful Windows Commands

Feb 4th, 2017
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 🔵 Display Wireless network password in clear text
  2. netsh wlan show profile name=MyWiFiNetwork key=clear
  3.  
  4. 🔵 Extract a list of Domain Admin users in the organisation
  5. net group "Domain Admins" /Domain
  6.  
  7. 🔵 Get a list of all users in the domain
  8. net user /Domain
  9.  
  10. 🔵 Get computers IP address
  11. ipconfig|find "IPv4"
  12.  
  13. 🔵 In addition we can use another trick and push this information straight into the clipboard by piping the output of the "find" command into "clip"
  14. ipconfig|find "IPv4"|clip
  15.  
  16.  
  17. 🔵 Dispay useful Wireless Network Connection information (WLAN)
  18. netsh wlan show interfaces
  19.  
  20. 🔵 We can also extract information about the wired interfaces - just replace "wlan" with "lan" in the command: netsh lan show interfaces
  21.  
  22. 🔵 Display WiFi SSID
  23. netsh wlan show interfaces|findstr "[^B]SSID"
  24.  
  25. 🔵 Get a MAC address
  26. The netsh command that we used above to show interfaces info can also be used to get the MAC addresses for each interface (disguised as a "Physical Address" in the output). But there is also a simpler command to do this:
  27.  
  28. 🔵 It will display MAC addresses of all network interfaces that are present in the system.
  29. getmac
  30.  
  31.  
  32. 🔵 Display system information
  33. systeminfo /FO CSV > c:\temp\sysinfo.csv
  34.  
  35. 🔵 Using environment variables
  36.  
  37. echo %OS%
  38. echo %PROCESSOR_ARCHITECTURE%
  39.  
  40. 🔵 Energy report (Officially: Power Efficiency Diagnostics Report)
  41. powercfg energy -output c:\temp\energy-report.html
  42.  
  43. 🔵 Bring up a User Accounts dialog
  44. control userpasswords2
  45.  
  46. 🔵 User, Group and Privileges Information
  47. whoami /all
  48.  
  49. 🔵 WMI Get Motherboard manufacturer
  50. for /f "tokens=9 delims= " %F in ('wmic baseboard^|more +1') do @echo %~F
  51.  
  52. 🔵 Get physical memory size
  53. wmic computersystem get TotalPhysicalMemory | more +1
  54.  
  55.  
  56. 🔵 We can also get max memory capacity (commit charge).We see that we have roughly 32GB of RAM available - this includes the 16GB of physical RAM plus the size of the swap file.
  57. wmic memphysical get MaxCapacity | more +1
  58.  
  59. 🔵 Get version of the Adobe Acrobat Reader installed on your computer
  60. wmic product get name,version | find "Adobe Acrobat Reader"
  61.  
  62. RWM Useful http://blog.kulshitsky.com/2017/02/useful-windows-command-line-tricks.html?m=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement