diff --git a/ConfigWinRMForZabbix/Download-WinRMConfigScript.ps1 b/ConfigWinRMForZabbix/Download-WinRMConfigScript.ps1 index f621f91..ebedbee 100644 --- a/ConfigWinRMForZabbix/Download-WinRMConfigScript.ps1 +++ b/ConfigWinRMForZabbix/Download-WinRMConfigScript.ps1 @@ -1,4 +1,4 @@ -<# +<# .SYNOPSIS Downloads ConfigWinRM.ps1 and ConfigWinRM.xml to C:\WinRM and optionally sets the Zabbix Proxy IP address as the WinRM firewall trusted host. @@ -34,12 +34,14 @@ first; prompts interactively for the Zabbix Proxy IP address. .NOTES - This file is saved as UTF-8 with BOM because the author name below contains - non-ASCII characters (diacritics) - keep the BOM if this file is re-saved. + This file is intentionally plain ASCII, no BOM. A UTF-8 BOM broke the primary + "irm | iex" use case: the BOM bytes were not decoded correctly across the + download pipeline, which made the parser fail to recognize the opening "<#" of + this comment block and try to run the whole header as code. - Author: Petr Štěpán + Author: Petr Stepan Created: 2026-07-21 - Version: 1.2.2 + Version: 1.2.3 Changelog: 1.0.0 - Initial version 1.1.0 - Added $env:ZabbixProxyIPAddress fallback so a plain "irm | iex" @@ -52,6 +54,8 @@ SelectSingleNode instead of dot-property access so a missing element is detected cleanly instead of throwing a raw StrictMode error + 1.2.3 - Removed UTF-8 BOM and non-ASCII characters (broke "irm | iex" - + see note above) #> [CmdletBinding()]