Skip to content

Conversation

Al2Klimov
Copy link
Member

@Al2Klimov Al2Klimov commented Feb 27, 2025

fixes #2
fixes #3

ref/IP/58070

How to install this ...

... for testing

  1. Open PowerShell as admin
    1. Install IIS: Enable-WindowsOptionalFeature -FeatureName IIS-WebServerRole -Online
    2. Prepare IfW install: Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
    3. Install IfW framework: https://icinga.com/docs/icinga-for-windows/latest/doc/110-Installation/01-Getting-Started/#install-icinga-for-windows
      • "Where do you want to install ...": enter
      • "... run the Icinga Management Console?": y
        • Settings/ Repositories/ Icinga Stable/ Continue/ Exit
      • Install dependency: Install-IcingaComponent -Name plugins
  2. Continue with the following section

... in production

  1. Create a folder as you wish, say, C:\iispatch
  2. Download this PR there: https://github.com/Al2Klimov/icinga-powershell-iis/archive/refs/heads/patch-1.zip
  3. Open PowerShell as admin
    • Create local repo: New-IcingaRepository -Name iispatch -Path C:\iispatch -Snapshot
    • Install this PR from it: Install-IcingaComponent -Name iis -Snapshot

Now C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-iis\provider/public/New-IcingaProviderFilterDataIIS.psm1 must look as in files changed here!

Test

Tested on WS25, WS16 and 2012r2.

With this PR, Invoke-IcingaCheckIISHealth may complain with "[UNKNOWN] IIS Service: The IIS tools are not installed" (on 2012r2 or even crash on newer ones). At least this is a different error message than #2. And it can be fixed like this:

Enable-WindowsOptionalFeature -FeatureName IIS-ManagementScriptingTools -Online

WS16+

PS C:\Users\Administrator> Invoke-IcingaCheckIISHealth
[OK] IIS Health: 1 Ok
| akws16::ifw_iishealth::iishealth=4;;4;;
0
PS C:\Users\Administrator>

2012r2

PS C:\Program Files\WindowsPowerShell\Modules> Invoke-IcingaCheckIISHealth
[UNKNOWN] IIS Health: 1 Unknown [UNKNOWN] IIS Service
\_ [UNKNOWN] IIS Service: The IIS tools are not installed
3
PS C:\Program Files\WindowsPowerShell\Modules>

🤷‍♂️

Friendly reminder

Extended support for Windows Server 2012 and Windows Server 2012 R2 will be ending on October 10, 2023.

https://learn.microsoft.com/en-us/windows-server/get-started/extended-security-updates-overview

My recommendations

@Wintermute2k6

Until the next release, as a bridge technology, install this PR as above. Or wait for it to be merged and use our snapshot repo.

@bobapple

Merge this, so that customers can directly use our snapshot repo instead of a custom one created from the @Al2Klimov namespace. The diff is dead simple and it works on my machineTM.

@cla-bot cla-bot bot added the cla/signed CLA is signed by all contributors of a PR label Feb 27, 2025
@bobapple bobapple requested a review from LordHepipud March 6, 2025 14:09
@LordHepipud LordHepipud added this to the v1.0.1 milestone Mar 7, 2025
@LordHepipud
Copy link
Collaborator

Thank you very much for the PR! Can you please add a note in the changelog for target version 1.0.1, similar to the other repositories with a link to the milestone? I will merge if afterwards.

@Al2Klimov
Copy link
Member Author

I don't even know the release date for the new changelog entry heading. Also, you're already allowed to push your own commit on top of my branch.

@Al2Klimov Al2Klimov removed their assignment Mar 10, 2025
@Wintermute2k6
Copy link

@Al2Klimov @LordHepipud Customer tested the changes ..
Informed us that without IIS-ManagementScriptingTools installed Invoke-IcingaCheckIISHealth doesn't work correctly .. also a notice that IIS-ManagementScriptingTools are required would be nice in the documentation.

@Al2Klimov
Copy link
Member Author

Yes, I know...

Invoke-IcingaCheckIISHealth may complain with "[UNKNOWN] IIS Service: The IIS tools are not installed" (on 2012r2 or even crash on newer ones). At least this is a different error message than #2. And it can be fixed like this:

Enable-WindowsOptionalFeature -FeatureName IIS-ManagementScriptingTools -Online

... and I've not addressed it here for the sake of construction area simplicity.

@LordHepipud LordHepipud merged commit 9fe4b7f into Icinga:main Aug 26, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cla/signed CLA is signed by all contributors of a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IIS Check doesn't Check for W3SVC, WinHttpAutoProxySvc
3 participants