# Windows Agent not Connecting

**URL:** <https://community.icinga.com/t/windows-agent-not-connecting/3679>\
**Category:** Icinga Director\
**Tags:** windows-agent\
**Created:** [March 3, 2020, 2:35pm UTC](https://community.icinga.com/t/windows-agent-not-connecting/3679 "2020-03-03T14:35:59Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![csmall](https://community.icinga.com/user_avatar/community.icinga.com/csmall/32/617_2.png) [@csmall](https://community.icinga.com/u/csmall)\
**Post date:** [March 4, 2020, 1:10pm UTC](https://community.icinga.com/t/windows-agent-not-connecting/3679/21 "2020-03-04T13:10:24Z")

</div>

No, I am going to now and will report back.

---

<div class="post-metadata">

**Author:** ![csmall](https://community.icinga.com/user_avatar/community.icinga.com/csmall/32/617_2.png) [@csmall](https://community.icinga.com/u/csmall)\
**Post date:** [March 4, 2020, 1:21pm UTC](https://community.icinga.com/t/windows-agent-not-connecting/3679/22 "2020-03-04T13:21:38Z")

</div>

All, I regret to inform you that this was all due to my own stupidity. 🙂

I never changed the url for director in the powershell script to https://

Thank you all for talking it through with me.

---

<div class="post-metadata">

**Author:** ![csmall](https://community.icinga.com/user_avatar/community.icinga.com/csmall/32/617_2.png) [@csmall](https://community.icinga.com/u/csmall)\
**Post date:** [March 4, 2020, 1:23pm UTC](https://community.icinga.com/t/windows-agent-not-connecting/3679/23 "2020-03-04T13:23:06Z")

</div>

On a side note: Does anyone know if I place an updated version of the Windows MSI package in the share I am using and then change Director to use that one and select allow updates… will that upgrade all my Windows agents to the latest one I have? How does that behave?

---

<div class="post-metadata">

**Author:** ![rsx](https://community.icinga.com/user_avatar/community.icinga.com/rsx/32/2094_2.png) [@rsx](https://community.icinga.com/u/rsx)\
**Post date:** [March 4, 2020, 1:36pm UTC](https://community.icinga.com/t/windows-agent-not-connecting/3679/24 "2020-03-04T13:36:17Z")

</div>

Don’t mind, we all are just human beings.

For updating you could choose any kind of software distribution or even manually just run msi installation.

`allow updates` has a different meaning: It configures the agent to accept config updates from its parent. This does not belong to the agent (and its msi package).

---

<div class="post-metadata">

**Author:** ![csmall](https://community.icinga.com/user_avatar/community.icinga.com/csmall/32/617_2.png) [@csmall](https://community.icinga.com/u/csmall)\
**Post date:** [March 4, 2020, 2:02pm UTC](https://community.icinga.com/t/windows-agent-not-connecting/3679/25 "2020-03-04T14:02:50Z")

</div>

I see. Thanks for clarifying. So the Director settings and the MSI package defined there (I restricted it to the hash of the MSI package I am using to deploy) is what the powershell script uses to do the initial agent deployment and config with Director.

To keep the agent up to date after that, I can just use something like SCCM to detect the originally deployed version of the agent installed on a Windows server and if detected run the latest MSI to upgrade it? This doesn’t impact the communication/config/certs etc… with the Icinga2 server/director?

---

<div class="post-metadata">

**Author:** ![rsx](https://community.icinga.com/user_avatar/community.icinga.com/rsx/32/2094_2.png) [@rsx](https://community.icinga.com/u/rsx)\
**Post date:** [March 4, 2020, 2:06pm UTC](https://community.icinga.com/t/windows-agent-not-connecting/3679/26 "2020-03-04T14:06:33Z")

</div>

> [@csmall](#):
>
> To keep the agent up to date after that, I can just use something like SCCM to detect the originally deployed version of the agent installed on a Windows server and if detected run the latest MSI to upgrade it? This doesn’t impact the communication/config/certs etc… with the Icinga2 server/director?

Yes, and I’d try this with just one machine for test.

---

<div class="post-metadata">

**Author:** ![csmall](https://community.icinga.com/user_avatar/community.icinga.com/csmall/32/617_2.png) [@csmall](https://community.icinga.com/u/csmall)\
**Post date:** [March 4, 2020, 2:07pm UTC](https://community.icinga.com/t/windows-agent-not-connecting/3679/27 "2020-03-04T14:07:15Z")

</div>

Will do. Thanks again.

---

<div class="post-metadata">

**Author:** ![rsx](https://community.icinga.com/user_avatar/community.icinga.com/rsx/32/2094_2.png) [@rsx](https://community.icinga.com/u/rsx)\
**Post date:** [March 4, 2020, 2:12pm UTC](https://community.icinga.com/t/windows-agent-not-connecting/3679/28 "2020-03-04T14:12:54Z")

</div>

Using the icinga2-powershell-modul it will look like this example:

```auto
...
Notice: Flushing content of "C:\ProgramData\icinga2\var\lib\icinga2\api"
Notice: Stopping the Icinga 2 Service...
Notice: Icinga 2 service has been stopped.
Notice: Using Icinga version "2.10.5", setting certificate directory to "C:\ProgramData\icinga2\var\lib\icinga2\certs"
Notice: Found Icinga 2 Agent version 2.10.5 installed at "C:\Program Files\ICINGA2\"
Notice: Current Icinga 2 Agent Version (2.10.5) is not matching intended version (2.11.2). Downloading new version...
Notice: Downloading Icinga 2 Agent Binary from "http://192.168.53.210/download/Icinga2-v2.11.2-x86_64.msi"
Notice: Icinga 2 Agent hash verification successfull.
Notice: Removing previous Icinga 2 Agent version
Notice: Icinga 2 Agent successfully removed.
Notice: No migration of Icinga 2 Agent data required.
Notice: Installing new Icinga 2 Agent version
Notice: Icinga 2 Agent successfully updated.
Notice: Using Icinga version "2.11.2", setting certificate directory to "C:\ProgramData\icinga2\var\lib\icinga2\certs"
Notice: Found Icinga 2 Agent version 2.11.2 installed at "C:\Program Files\ICINGA2\"
Notice: Removing downloaded Icinga 2 Agent installer
Notice: Host is already registered within Icinga Director.
Notice: Fetched ticket " *******************************" from Icinga Director
Notice: Icinga 2 certificates already exist. Nothing to do.
Notice: icinga2.conf did not change or required parameters not set. Nothing to do
...

```

---

<div class="post-metadata">

**Author:** ![csmall](https://community.icinga.com/user_avatar/community.icinga.com/csmall/32/617_2.png) [@csmall](https://community.icinga.com/u/csmall)\
**Post date:** [March 4, 2020, 2:17pm UTC](https://community.icinga.com/t/windows-agent-not-connecting/3679/29 "2020-03-04T14:17:57Z")

</div>

Interesting. I am currently using SCCM to deploy the script(s) to install the agent. The script executes and there is a detection method that looks for the product code of the MSI existing on the system to verify that the agent is either already installed and do nothing or it is missing and run the script.

It sounds like I could change the detection method to look for the product code of the new MSI package, it will detect that it isn’t installed and execute the script again… this would see the current version of the agent is installed, contact Director and see that I have defined the new MS package/hash/version and force it to upgrade. Once installed SCCM would then detect the new product code and consider it installed and compliant.

[Previous page](https://community.icinga.com/t/windows-agent-not-connecting/3679.md?page=1)
