Windows PowerShell installer

This script will deploy the Server Density agent across your infrastructure using PowerShell, Group Policy and Network Shares. Simply follow the instructions to deploy.

Download InstallServerDensityAgent.ps1

Upload the script

Copy the script and the Server Density MSI on to a network share that is accessible to all hosts that require the agent to be installed. 

Modify the script to your requirements 

Modify the script and ensure that the following variables are updated to reflect your environment (line 79). Examples are below

$strAccountUrl = "https://example.serverdensity.io" ## Enter your Server Density URL here
$strApiToken = "b97da80a41c4f61bff05975ee51eb1aa" ## Enter your Server Density API key here
$strMsiNetworkPath = "\\server-name\share-name\ServerDensity.msi" ## Enter a path where you will store the Server Density msi
$strHostName = $env:computername

Create a domain based group policy

Create a domain based group policy containing the following:

Explanation:

This Group Policy will first use item level targeting to determine if it should apply settings. The item level target will look for the BoxedIce.ServerDensity.Agent.exe binary. If it does not exist on the server, it will create a Scheduled task to run the install script. The task will run this PowerShell script. Once run, the Server Density agent will be installed. The next time Group Policy refreshes (every 90 minutes by default), the item level target will see that the binary exists, and then it will remove the scheduled task. If the agent ever becomes uninstalled, the scheduled task would be recreated and the install will attempt to run again.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Monday  —  Friday.

10am  —  6pm UK.

Dedicated Support.