•Arnošt Havelka
Practical: System Audit
Scripting a professional system inventory report.
Start Interactive LessonAs a Sysadmin, your boss wants a report on a workstation's status. Instead of running commandsmanually, let's write a batch script to generate a professional report automatically.
The Mission
Create audit.bat that:
- Grabs the Hostname.
- Grabs the IP Address.
- Grabs the Running Processes.
- Saves it all to
report.txt.
Step 1: The Script Structure
We will use echo to create headers and redirection >> to compile the file.
Terminal
C:\Users\Student>copy con audit.bat
Step 2: Running the Audit
Execute the script.
Terminal
C:\Users\Student>audit.bat
Step 3: Viewing the Report
Let's see what we generated.
Terminal
C:\Users\Student>type report.txt
Knowledge Check
1 / 2Why do we use '>>' instead of '>' for the second command?
References
These documentation links provide authoritative details for the commands used in this article.
Up Next
Power Features
Master powercfg workflows for battery diagnostics, sleep policies, and reliable recovery actions.