Skip to content
Getting Digital

IT Support, Networking and Infrastructure

Scripting and automation for administrators

An administrator who types the same commands a third time is doing work a short script should own. PowerShell on Windows, Bash on Linux and Python across both are the usual tools, and none of them requires becoming a developer. This page covers what to automate first, why the exams have started to include it, and the risk carried by a script nobody else can read.

Why this topic exists: PowerShell, Bash and Python are how administrators stop doing the same thing twice (LPIC-1 topic 105; CCNA Automation and Programmability 10 %; SFIA System software administration).

Scripting for administrators is not software development. It is the habit of turning a task you have done by hand into a short file that does it the same way every time: creating accounts for a new starter, checking disk space across forty servers, collecting the same weekly report, pushing one change to every switch. The gain is partly speed and mostly consistency, because a script does not forget step seven on a Friday afternoon.

What to automate first

  • Tasks you already perform from a written checklist, since the checklist is nearly a script.
  • Joiner and leaver steps, where a missed step becomes a security problem.
  • Morning checks: free space, certificate expiry dates, whether last night's backups finished.
  • Reports someone assembles by copying numbers between windows.
  • Changes that must reach many machines or devices identically.

Three languages and their home ground

LanguageHome groundWhat it does wellWatch for
BashLinux and macOS shellsGluing existing commands together with pipesQuoting, and filenames containing spaces
PowerShellWindows, also available on Linux and macOSPassing structured objects rather than text between commandsExecution policy and differing module versions
PythonAny platformLibraries for files, web APIs and network devicesWhich interpreter and packages the target machine actually has

The exams have been moving this way for years. LPIC-1 gives shells and scripting a topic of its own: one objective on shaping the shell environment with variables, functions and aliases, another on writing simple scripts with loops, tests, command substitution and checks on exit status. A separate objective covers scheduling with cron, at and systemd timers, which is where most scripts end up running. The CCNA gives automation and programmability 10 % of its weight, and CCNA Automation takes the network side much further. Past a certain scale, tools such as Ansible replace step-by-step scripts with a description of the state each machine should reach.

Safe to run twice

A good administrative script checks before it acts: it creates the account only if it is missing and edits the file only if the line is absent. Scripts written this way can be rerun after a failure without doing damage, which is the property configuration tools are built around.

The common beginner's mistakes are a script kept on one person's desktop, a password written into the file, and no handling for the case where a command fails halfway. Put scripts in Git, read secrets from a vault or the environment, and stop on the first error. LPIC-1 covers the Linux side, the no-cost Python Essentials 1 course from Cisco is a start in Python, and AZ-104 carries the habit into Azure administration. The next steps are Linux administration and infrastructure as code; flows built by office staff rather than administrators are covered under workplace automation.

Next to this topic

Concepts to know

Glossary entries with the reason each one matters here.

  • Python

    The language of network and systems automation.

  • Git

    Scripts belong in version control.

Certifications that test it

Vendor exams and free certificates; facts, cost and the preparation path are on each page, and the certifications hub has them all.

Tools of the trade

Frequently asked

Should I learn Bash or Python first?
Learn whichever matches the systems you look after, then the other. Bash is unavoidable on Linux for short jobs that chain commands; Python takes over once a task needs real data structures, error handling or calls to a web API.
Is PowerShell only for Windows?
No. Current versions of PowerShell run on Linux and macOS as well, and it is widely used to manage cloud resources. Its advantage over text-based shells is that commands exchange objects, so you filter on properties instead of parsing output.
Is administrative scripting the same as DevOps?
It is one ingredient. DevOps adds version control for everything, automated pipelines, infrastructure described as code and a shared responsibility between developers and operations. An administrator who scripts well and keeps those scripts in Git has already taken the first steps.

Courses in the directory

107 courses are filed here; the top 6 by our ranking, details and the provider link on each course page.

Browse the directory shelf

Last reviewed 26 September 2026 · Getting Digital