Deployment Module






This module is designed to make automating the installation of software a breeze. It also provides logging that makes it easy to check and see if there were errors during an installation. The logging has been designed so that there is an installation log file that records all steps in the installation, an application log file that the installer creates, and finally a build.log file that records if the application was successfully installed. The build.log file provides a goto location for checking to see if all applications are installed while generating a golden image. It sequentially numbers easy application that makes it a snap to go and check if all apps are there.


The application log will give a step-by-step logging of the installation as shown below:

In order to properly install the module, it is suggested that you create the following folder: %programfiles%\windowspowershell\modules\Deployment. Next, copy the .PSD1 and PSM1 files to that folder. That is all that is needed to install the module.

The next step to using the module is the use the template I created called install.ps1. The global variables are in an array called $GlobalVariables. The function InitializeVariables is where you go in and make the appropriate modifications to the $Global:LogFile, $Global:Phase, $Global:Sequence, and $Global:Title. The Sequence is populated only if this is an installation that occurs during an image processs. If it is an image process, change Phase to Software Deployment.

Once the InitializationVariables is populated, you will insert the appropriate functions in the field that reads #<Insert Functions to install/uninstall applications>. That is all that is to this. I have been testing this out for a few months and it has made my life as an SCCM administrator much easier. I hope it does the same for you.

The module includes the following functions:


  • Copy-Files
  • Disable-WindowsFeature
  • Enable-WindowsFeature
  • Exit-PowerShell
  • Get-Architecture
  • Get-OSVersion
  • Import-RegistryFile
  • Install-EXE
  • Install-Fonts
  • Install-MSI
  • Install-MSP
  • Install-MSU
  • New-Directory
  • New-FileShortcut
  • New-LogFile
  • New-StartMenuShortcut
  • New-TaskbarShortcut
  • New-URLShortcut
  • Remove-Directory
  • Remove-DirectoryFromUserProfiles
  • Remove-File
  • Remove-FileFromUserProfiles
  • Remove-HKUKey
  • Remove-RegistryKey
  • Remove-StartMenuShortcut
  • Remove-TaskbarShortcut
  • Remove-Variables
  • Set-ConsoleTitle
  • Set-FolderPermissions
  • Set-Variables
  • Start-Task
  • Stop-Task
  • Uninstall-EXE
  • Uninstall-MSI
  • Uninstall-MSIByGUID
  • Uninstall-MSIByName
  • Wait-ProcessEnd
  • Write-LogFile

You can download the module, installer template, and manifest here:
Here is a Youtube tutorial video on how to implement the module:

0 Response to "Deployment Module"

Post a Comment