From c633aadc7155c4451b6d2a2033276e1bb908c47f Mon Sep 17 00:00:00 2001 From: Ben Reedy Date: Sun, 9 Jul 2023 13:41:41 +1000 Subject: [PATCH] feat(doc): Document Powershell v7.3 argument parsing Signed-off-by: Ben Reedy --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 6ffea804..fc78d368 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,13 @@ On some older versions of Windows you may need to surround parameter values with msiexec /i C:\Users\Administrator\Downloads\windows_exporter.msi ENABLED_COLLECTORS="ad,iis,logon,memory,process,tcp,thermalzone" TEXTFILE_DIR="C:\custom_metrics\" ``` +Powershell versions 7.3 and above require [PSNativeCommandArgumentPassing](https://learn.microsoft.com/en-us/powershell/scripting/learn/experimental-features?view=powershell-7.3) to be set to `Legacy` when using `--% EXTRA_FLAGS`: + +```powershell +$PSNativeCommandArgumentPassing = 'Legacy' +msiexec /i ENABLED_COLLECTORS=os,service --% EXTRA_FLAGS="--collector.service.services-where ""Name LIKE 'sql%'""" +``` + ## Kubernetes Implementation