From e87612370d3e515dcfad7c1895292f6870f43a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0t=C4=9Bp=C3=A1n?= Date: Tue, 21 Jul 2026 18:41:03 +0200 Subject: [PATCH] Remove UTF-8 BOM and non-ASCII characters to fix "irm | iex" compatibility; update version to 1.2.3 --- .../Download-WinRMConfigScript.ps1 | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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()]