From b90d08e1dff7a83b998715c3682c19a9662239c0 Mon Sep 17 00:00:00 2001 From: dyoder Date: Thu, 19 Aug 2021 12:47:58 -0400 Subject: [PATCH] properly escape special characters in string replace --- Install-AteraAgent.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Install-AteraAgent.ps1 b/Install-AteraAgent.ps1 index 7745f7d..d33b6db 100644 --- a/Install-AteraAgent.ps1 +++ b/Install-AteraAgent.ps1 @@ -6,8 +6,8 @@ ) ## Make $INTEGRATOR_ID URL safe -$INTEGRATOR_ID = $INTEGRATOR_ID -replace '@','%40' -$INTEGRATOR_ID = $INTEGRATOR_ID -replace '+','%2B' +$INTEGRATOR_ID = $INTEGRATOR_ID -replace [Regex]::Escape('@'),'%40' +$INTEGRATOR_ID = $INTEGRATOR_ID -replace [Regex]::Escape('+'),'%2B' ## Set the Atera URL for your specific environment $BASE_URL = 'https://emberkom.atera.com'