Simple Powershell script for installing multiple software packages--anyone?

Welcome Forums General PowerShell Q&A Simple Powershell script for installing multiple software packages--anyone?

This topic contains 1 reply, has 2 voices, and was last updated by

 
Participant
3 months, 4 weeks ago.

  • Author
    Posts
  • #103207

    Participant
    Points: 0
    Rank: Member

    Hello, looking for a simple script that will install multiple software packages but not finding any. I know (very, very, very) basic Powershell, unfortunately I haven't found anything specific to my situation nor do I have a coworker or mentor who would know what I'm trying to do.

    What I want is the following:

    –A simple script, not too detailed (I looked at exampled found with the PSpp Deploy Kit and felt a bit overwhelmed);
    –Multiple software packages can be added to install, with the next kicking off once the previous installation has completed;

    The Command line has been disabled within our environment, otherwise I could try a batch file instead. Now, the most the a bat file can do is 'kick' off a PS script. I've looked for something that is close to what I want to do, unfortunately I haven't found much at all. If I could I'd find someone in-the-know who could translate my questions and wishes into something I could understand but I'm working two jobs and studying for another IT exam. I don't have that luxury. Are there any templates for simplified 'chained' installs? Is there any resource that a perpetual beginner could use? Thank you.

    V/R,

    Selvarin

  • #103213

    Participant
    Points: 16
    Rank: Member

    Create a list of your software package in a collection/array.
    Loop through the collection to install the packages and their needed switches.

    $UNCToSoftware = 'D:\Software'
    $listOfSoftwareToInstall = 'softwarepkg001.exe','softwarepkg001.msi','softwarepkg001.msi'
    $listOfSoftwareToInstall | %{Start-Process -FilePath "$UNCToSoftware\$_" -ArgumentList 'Whatever arguments are needed' -Wait}
    

The topic ‘Simple Powershell script for installing multiple software packages--anyone?’ is closed to new replies.