From 1f822ae51377ab4cdcc7892858e3f6b283b18192 Mon Sep 17 00:00:00 2001 From: Kevin Crouch Date: Fri, 10 Nov 2023 10:08:15 -0500 Subject: [PATCH] Fix Single CR causing issues with lines not being recognized as separate Test-DeviceRegConnectivity.ps1 The line ending at Line245 has only a Carriage Return, not CR-LF or LF, causing two lines to be recognized as a single line, and breaking syntax. This ultimately meant that the script refused to acknowledge that anyone was an Administrator, and usually failed to run. --- Test-DeviceRegConnectivity.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Test-DeviceRegConnectivity.ps1 b/Test-DeviceRegConnectivity.ps1 index 433bb9c..d778ed8 100644 --- a/Test-DeviceRegConnectivity.ps1 +++ b/Test-DeviceRegConnectivity.ps1 @@ -242,7 +242,8 @@ Function Test-DevRegConnectivity{ } Function PSasAdmin{ - $currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent()) $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) + $currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent()) + $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) } $global:Bypass=""