> For the complete documentation index, see [llms.txt](https://docs.enginsight.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.enginsight.com/docs/knowledge-base/english/pulsar/how-can-i-roll-out-the-enginsight-pulsar-via-windows-group-policy.md).

# How can I roll out the Enginsight Pulsar via Windows Group Policy?

You can automatically roll out the Enginsight agent Pulsar to multiple Windows hosts that belong to the same domain by using a Group Policy.

To do this, you need a script that checks at every system startup whether a Pulsar is installed. If this is not the case, the Pulsar is installed automatically on the affected host. You then need to configure the corresponding Windows Group Policy.

{% hint style="warning" %}
**Please note**: You need a separate script for clients and servers.
{% endhint %}

Follow these steps:

{% stepper %}
{% step %}

### Get the Pulsar installation script

Follow the [Pulsar installation instructions](https://docs.enginsight.com/docs/manual/english/installation-und-konfiguration/installation-and-configuration/enginsight-components/pulsar) for the **automatic installation** on Windows hosts as described in the Enginsight Manual.
{% endstep %}

{% step %}

### Create your own script

1. Copy the installation script from **step 4 of the Pulsar installation instructions** and insert it into the following template at the highlighted position:

<pre><code>If (Get-Service "Enginsight Pulsar" -ErrorAction SilentlyContinue) {
  break
} Else {
<strong>  # Insert the copied installation command below this line.
</strong>
}
</code></pre>

2. Remove the `powershell` line. The complete script (shown here with masked values) should look like this:

```
If (Get-Service "Enginsight Pulsar" -ErrorAction SilentlyContinue) {
  break
} Else {
  $dl='https://api.enginsight.com/v1/_/pulsar/latest/ngs-pulsar-amd64-setup.exe'
  [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
  (New-Object System.Net.WebClient).DownloadFile($dl,"$env:TEMP\ngs-pulsar-setup.exe");
  & "$env:TEMP\ngs-pulsar-setup.exe" `
     -acceptEula=true -interactive=false -license server  `
     -accessKeyId ****                `
     -accessKeySecret ****    `
     -api https://****

}
```

3. Save the finished script as a PowerShell script file with the `.ps1` extension.

{% hint style="warning" %}
**Please note**: The script location must be accessible to all hosts that belong to the domain. In addition, all hosts must have permission to execute the script.
{% endhint %}
{% endstep %}

{% step %}

### Configure the Windows Group Policy

1. Open the Group Policy Management Editor (**gpedit.msc**) as an administrator.
2. For the respective domain, navigate to **Computer Configuration** → **Windows Settings** → **Scripts (Startup/Shutdown)** → **Startup**.
3. A new window opens on the **Scripts** tab. Click **Add**.
4. Another input dialog opens, where you need to enter a script name and script parameters.

* Enter `powershell.exe` as the **Script Name**.
* Use the following template for the **Script Parameters** field:

```
-ExecutionPolicy Bypass -File "\<NetworkStoragePath>\Policies{<GUID>}\Machine\Scripts\Startup\<ScriptName>.ps1"
```

{% hint style="info" %}
Remember to replace the following parameters in `<>` accordingly:

* `<NetworkStoragePath>`
* `<GUID>`
* `<ScriptName>`
  {% endhint %}

5. Click **OK** to apply the settings.
   {% endstep %}
   {% endstepper %}

***

## Further Resources

* [How can I automatically roll out the Enginsight Pulsar to volatile Windows VDI environments?](/docs/knowledge-base/english/pulsar/how-can-i-automatically-roll-out-the-enginsight-pulsar-to-volatile-windows-vdi-environments.md)
* [How can I automatically roll out the Enginsight Pulsar to multiple persistent Windows systems?](/docs/knowledge-base/english/pulsar/how-can-i-automatically-roll-out-the-enginsight-pulsar-to-multiple-persistent-windows-systems.md)
* [How can I manually roll out the Enginsight Pulsar to multiple persistent Windows VMs?](/docs/knowledge-base/english/pulsar/how-can-i-manually-roll-out-the-enginsight-pulsar-to-multiple-persistent-windows-vms.md)

***
