Last active
May 26, 2022 12:26
-
-
Save tshm/9c07496e84d364665fc4 to your computer and use it in GitHub Desktop.
information collection batch script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pushd c:\log | |
| systeminfo > systeminfo.txt | |
| msinfo32 /report msinfo32.txt | |
| ipconfig /all > ipconfig.txt | |
| schtasks /query /V > schtasks.txt | |
| net use > netuse.txt | |
| netstat -sp > netstat_sp.txt | |
| netstat -e > netstat_e.txt | |
| tasklist > tasklist.txt | |
| tasklist /svc > tasklist_svc.txt | |
| tasklist /m > tasklist_m.txt | |
| wevtutil qe system /f:TEXT > system_log.txt | |
| wevtutil qe Application /f:TEXT > Application_log.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition | |
| $dd = $(get-date -format yyyyMMddhhmss) | |
| mkdir ($scriptPath + '/' + $dd) | |
| pushd ($scriptPath + '/' + $dd) | |
| systeminfo > systeminfo.txt | |
| msinfo32 /report msinfo32.txt | |
| ipconfig /all > ipconfig.txt | |
| schtasks /query /V > schtasks.txt | |
| net use > netuse.txt | |
| netstat -sp > netstat_sp.txt | |
| netstat -e > netstat_e.txt | |
| tasklist > tasklist.txt | |
| tasklist /svc > tasklist_svc.txt | |
| tasklist /m > tasklist_m.txt | |
| wevtutil qe system /f:TEXT > system_log.txt | |
| wevtutil qe Application /f:TEXT > Application_log.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment