Remove UTF-8 BOM and non-ASCII characters to fix "irm | iex" compatibility; update version to 1.2.3

This commit is contained in:
Petr Štěpán
2026-07-21 18:41:03 +02:00
parent 9f85f4795c
commit e87612370d
@@ -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 <url> | 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
<FWWinRMTrustedHosts> 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()]