This PowerShell script automates the process of downloading and updating MSI packages for software deployment via Group Policy Objects (GPO) in a domain environment. The script ensures that the latest version of specified software packages is always available by checking, downloading, and replacing outdated versions.
- Downloads the latest version of software MSI packages from provided links.
- Compares the newly downloaded version with the existing one.
- Replaces the existing MSI file if the new version is superior.
- Logs all actions in a
log.txt
file.
- Windows operating system with PowerShell enabled.
- A
packagesLinks.csv
file containing the software names and download links. - Sufficient permissions to download and replace MSI files.
- Clone this repository or download the script.
- Prepare the
packagesLinks.csv
file with the following format:Name;Link ExampleSoftware;https://example.com/latest.msi
- Ensure the script has execution permissions:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
- Run the script from PowerShell:
.\getPackages.ps1
- The script will download and update MSI files as needed.
- Check
log.txt
for details on executed actions.
All actions performed by the script, including downloads, comparisons, and replacements, are recorded in a log.txt
file. This log file helps track updates and troubleshoot any issues.
This project is licensed under the MIT License.
Feel free to fork this repository, submit issues, or propose improvements.
sudoPierre