Scripting and Automation for IT
Automating system administration with Bash, PowerShell and Python: files, users, logs, scheduled jobs and working with APIs.
PYTH-120 Year 1 3 credits 12 lessons · 5 h 22 min ▶ Video lessons coming soon
Offered by HSM University · IT Foundations
What you'll learn
- Decide which IT chores are worth automating by weighing time saved, cost of mistakes and stability, and choose between Bash, PowerShell and Python.
- Read and write Bash scripts that use variables, quoting, arguments, tests, loops, pipes and safe settings.
- Read and write PowerShell scripts that pass objects through pipelines, take typed parameters and handle errors.
- Build Python command-line tools with argparse, environment variables, subprocess and meaningful exit codes.
- Find, rename, organize, copy, archive and safely delete files and folders with pathlib and shutil.
- Parse application and web server logs with string methods and regular expressions, and summarize them.
- Script user onboarding and offboarding, and read, set and audit file permissions using least privilege.
- Schedule jobs with cron, systemd timers and Task Scheduler, avoiding environment, time zone and overlap traps.
- Call web APIs from Python, handling JSON, query strings, credentials, pagination, rate limits and retries.
- Explain configuration management, desired state, idempotence and templates, and read an Ansible playbook.
- Make scripts safe with specific error handling, input validation, logging, atomic writes and dry runs.
- Design, build, test, schedule and hand over a complete automation for a recurring administrative task.
Course content
12 lessons · 5 h 22 min total · final exam
- 1 Why automate 26 min · quiz
- 2 Bash scripting 26 min · quiz
- 3 PowerShell scripting 24 min · quiz
- 4 Python for system administration 25 min · quiz
- 5 Working with files and directories 27 min · quiz
- 6 Parsing logs and text 26 min · quiz
- 7 Managing users and permissions with scripts 25 min · quiz
- 8 Scheduling jobs with cron and Task Scheduler 27 min · quiz
- 9 Calling web APIs and handling JSON 26 min · quiz
- 10 Configuration management concepts 27 min · quiz
- 11 Error handling, logging and safe scripts 29 min · quiz
- 12 Capstone: automating a weekly admin task 34 min · quiz
- E Final exam 20 questions
Requirements
Recommended background. You can start any course at any time.
Description
Automating system administration with Bash, PowerShell and Python: files, users, logs, scheduled jobs and working with APIs.
Part of the Information Technology stream, typically taken in year 1.