BDRCloud - Bulk Installation of Backup Agents - Deploy PowerShell file through AD GPO

BDRCloud - Bulk Installation of Backup Agents - Deploy PowerShell file through AD GPO

KB ID: 115220
Overview:
This Knowledge Base article provides a comprehensive guide for deploying applications using PowerShell or Batch Scripts. The primary focus is on a PowerShell script for bulk deployments, including an example script for deploying an MSI file through Group Policy Objects (GPO) with customized user inputs.
Deployment Using Power shell/Batch Script
1. Create a PowerShell File:
  1. Example script for deploying an MSI file through GPO with customized user inputs.            
$folder = 'C:\Program Files\BDRCloud\BDRCloudDelegationService'
if (-not (Test-Path -Path $Folder)) {
   start-process -FilePath msiexec.exe -ArgumentList "/i", "\\192.168.105.103\C\Shared\BDRCloudDelegationService.msi", "/qn",  "INSTALLDRIVER=Yes", "REBOOT=Force"
}
else  { }
  1. Explanation about the script :
  1. $folder = 'C:\Program Files\BDRCloud\BDRCloudDelegationService'
The provided line establishes the variable `$Folder` as the directory to examine for its existence. The subsequent line relies on this variable to ascertain whether the program is presently installed. Modify the path to correspond to the specific program you wish to verify.
  1. if (-not (Test-Path -Path $Folder))
The given line performs a check to verify whether the path represented by the variable `$Folder` exists. If the path does not exist, the script proceeds to initiate the installation process. Conversely, if the path does exist, the script executes the code within the 'else' block, resulting in no further action.
  1. start-process -FilePath
This instruction triggers the installation process when the directory specified by the variable `$Folder`, located in the shared path, is not present. Additionally, it includes specific switch arguments, to customize user input to the installer.
  1. else  {}
If the directory represented by the variable `$Folder` exists, the script will proceed to this line and perform no further actions.
Notes
Note: This is a fundamental script designed for streamlining the mass deployment of MSI files by tailoring user inputs. Feel free to customize and enhance it, incorporating features such as logging or other options to align with your specific requirements.
Other property value available for customization is as follows
            Plugin
            Property
      Values
Disk Image Backup
INSTALLDRIVER


REBOOT
Yes - Proceed Driver Installation
No - Install Driver later

"Force" [ Reboot required case alone ]
2. Create a Group Policy Object  
  1. Access Group Policy Management on one of your Active Directory domain controllers.
  2. Expand the domain object, right-click the Group Policy Objects folder, and choose "New."

  1. Provide a name, such as "BDRSuite_Delegation_Deployment," and click OK.

  1. Right-click on the newly created policy and choose "Edit."
  2. Under the "Computer Configuration", expand the Policies folder, and subsequently, the Windows Settings folder->Scripts (Startup/Shutdown).
  1. On the right side click "Startup"
  2. Then click on PowerShell Scripts or Scripts if using a batch file[ in this example we using powershell], Click on the Add button, then click browse.
  1. When the browser window is open, you need to copy and paste the .ps1 file into it. Do not alter the path, as it corresponds to the GPO path, and the script must be copied into this specific location. Note that your path will differ from the below screenshot.

  1. Click 'OK' and then click 'OK' again. You should now be back at the main screen, indicating the successful completion of the GPO configuration.
3. Assign the GPO to   Specific group's
  1. Access Group Policy Management on one of your Active Directory domain controllers.
  2. Go to the Organizational Unit (OU) that contains the computers to which you want to deploy BDRSuite_Delegation_Service_X_X_X_X.msi.
  3. Right-click the required OU [exampled DeveloperComp->Computers], and then choose "Link an Existing GPO..."

  1. Choose the previously created Group Policy Object "BDRSuite_Delegation_Deployment", and then click OK.
Testing the Configuration  
  1. Reboot the computer that is part of the Organizational Unit (OU) where the linked Group Policy Object is applied.
  2. Since the software undergoes a silent install, users will not observe any prompts or actions during their login. The installation will seamlessly occur in the background without requiring any user interaction.
  3. To confirm that BDRSuite_Delegation_Service was installed, follow these steps:
  1. Click on the Start Button, and then choose "Settings."
  2. Type "apps" in the "Find a setting" search box.
  3. Select "Add or remove programs."
  4. Search for or locate "BDRSuite_Delegation_Service" in the list.
  1. BDRSuite_Delegation_Service should also be running in the system tray. Right-click the Tray icon, and select "Status..." to confirm.