StudyToCert

All certifications / A+ Core 2 / Lessons

CompTIA A+ Core 2 220-1202 · Domain 4: Operational procedures

Scripting basics: .bat, .ps1, .vbs, .sh, .js, .py; use cases (automation, restarts, drive mapping, installs, backups, updates) and risks

▶ Watch the overview video

Last reviewed October 6, 2026 · Leer en español

Explain it simpler

A script is a text file with a list of computer commands that run one after another, like a recipe the computer follows. Technicians use scripts to do the same job on many computers at once, such as connecting network drives, installing programs, restarting machines or making backups. Different script types have different file endings: .bat and .ps1 and .vbs are for Windows, .sh is for Linux and Mac, and .py (Python) and .js (JavaScript) work on many systems. Scripts are powerful, so a mistake can break many computers quickly, and criminals sometimes hide harmful scripts in email attachments. Always test a script on one machine first and never run one you do not trust. It is like a recipe card: great for cooking the same dish every time, but one wrong measurement repeats in every batch.

It is Friday afternoon at Northgate School District, and Jordan, the newest technician, proudly announces he has written a PowerShell script to clean temporary files on all 200 lab PCs. He tested it once, on his own laptop, and it worked perfectly. He is about to push it out through the management console as an administrator. Meanwhile, the front office forwards a strange email attachment named invoice.vbs that a teacher almost opened. Scripts are about to save someone a weekend of clicking, or wreck a weekend of somebody else's. What do you need to know, right now, to tell which one is about to happen?

A script is a plain-text file of commands that an interpreter runs in order. Unlike a compiled program, you can open a script in a text editor, read it, and change it. Scripts let technicians automate repetitive tasks, apply the same configuration to many machines and avoid manual mistakes that creep in when someone clicks through the same steps for the fiftieth time. The A+ exam does not expect you to write complex code, but it does expect you to recognize common script types by their extension, know what they are used for, recognize basic building blocks, and understand the risks.

Free account

Keep reading for free

Create a free StudyToCert account to read the rest of this lesson: 8 more sections, 8 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.

Sign up free Log in

Study A+ Core 2 for free
A week-by-week plan with every lesson, quizzes, checkpoint tests, a practice exam and hands-on labs.
Open the A+ Core 2 study plan