Day 1.0 - Automating Software Installs for 30 New Computers: A Sysadmin's Guide

As an IT admin, managing multiple systems simultaneously can be overwhelming—especially when you’re setting up 30 new computers at once. The good news is that you don’t have to do it all manually! Automating the software installation process not only saves you time but also ensures consistency across all devices. In this post, I’ll walk you through how I automated the setup of 30 new computers using PowerShell, making the process smoother and more efficient.
Why Automate?
Before we dive into the how, let’s discuss the why. The manual process of installing software on each new computer can be incredibly time-consuming. Imagine having to sit in front of 30 machines, individually downloading and installing software, one by one. It’s a nightmare, and there's always the risk of human error.
Automation is the key to:
- Consistency: Each machine gets the same setup.
- Speed: What would take hours can now be done in minutes.
- Scalability: Once you automate, you can replicate the process for future setups with minimal effort.
The Tools You Need
To automate software installation on new computers, I relied heavily on PowerShell. PowerShell is versatile, powerful, and perfect for this kind of task. In addition, I made use of:
- Package managers: Tools like Chocolatey (for Windows) streamline software installs with a simple command line.
- Windows Deployment Services (WDS): For large-scale deployments, WDS can deploy the operating system and applications automatically.
- Scripting: PowerShell scripts can handle installing multiple apps, checking for prerequisites, and even restarting systems when needed.
Step-by-Step Guide to Automating the Installation Process
- Set Up a Base Image
Before automating software installs, I made sure the operating system was pre-configured with the necessary settings and drivers. For Windows, I used Sysprep to prepare the system and create a custom base image. This way, I could deploy the same base configuration on all 30 computers. - Install Chocolatey
Chocolatey is a package manager that lets you install software via the command line. It’s like the apt-get or yum for Windows. To get started, I first installed Chocolatey on the base image.
Here’s the command to install it via PowerShell:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
This simple script ensures Chocolatey is installed on all your machines.
- Create a Software Installation Script
Now comes the fun part! I wrote a PowerShell script that installs all the software I needed. For instance, if you wanted to install Chrome, 7-Zip, and Notepad++, you could use the following commands:
choco install googlechrome -y
choco install 7zip -y
choco install notepadplusplus.install -y
These commands automatically download and install the software from Chocolatey’s repository. You can easily add or remove applications to customize the list based on your requirements.
- Configure the Script for Mass Deployment
Once the script was ready, I configured it to run on all 30 machines. I used Group Policy or PowerShell Remoting to push the script to each machine across the network. Here’s an example of using PowerShell Remoting:
Invoke-Command -ComputerName "Computer1", "Computer2", "Computer3" -ScriptBlock {
choco install googlechrome -y
choco install 7zip -y
choco install notepadplusplus.install -y
}
You can replace "Computer1", "Computer2", "Computer3"
with the actual machine names or IP addresses.
- Automate Reboots and Post-Install Configuration
After the software installs, you may need to restart the machine or run some post-install configuration tasks (like setting up specific settings or installing updates). You can automate this with PowerShell like so:
Restart-Computer -Force
ou can also add delays between installations to ensure that each software install completes before the next one starts.
- Test the Setup
Before deploying to all 30 machines, I recommend testing the automation on a few test systems. This ensures that everything works smoothly and gives you a chance to tweak the script as necessary.
Bonus Tips for a Successful Setup
- Error Handling: Ensure your script includes proper error handling. If a package fails to install, the script should log the error and continue with the next installation.
- Silent Installs: Many software packages support silent installs, meaning they install without any user interaction. This is perfect for automation! Use the
-y
flag in Chocolatey to ensure installs run quietly. - Logging: Add logging to your script to track which installations were successful and which failed. You can log the output to a text file for future troubleshooting.
- Security Considerations: Make sure the installation process doesn’t accidentally expose any sensitive data or allow unauthorized access. Running scripts remotely requires proper authentication and permissions.
Conclusion
Automating software installations for 30 new computers doesn’t have to be a daunting task. With PowerShell and tools like Chocolatey, you can streamline the process, save hours of manual work, and ensure that every machine is set up consistently. Whether you’re an IT administrator managing a small office or an enterprise-level deployment, automation is the way forward.
Happy automating!
~ IcePhishHacker