If I use the code I posted above, which uses built in Kix functions. It still gets funky results, but at least usable. It shows...
 Quote:

ÿ_R
e
m
o
t
e
S
i
g
n
e
d

So try this code, and see if it gets you where you need.
 Code:
Shell "Powershell Set-ExecutionPolicy RemoteSigned"
Shell "Powershell get-ExecutionPolicy > c:\temp\PSSec.txt"

$fileToCheck = "c:\temp\PSSec.txt"
$stringToFind = "RemoteSigned"

If Exist($fileToCheck)
   $stringFound = 0
   $fh = FreeFileHandle()
   $nul = Open($fh, $fileToCheck)
   While @error = 0
      $line = ReadLine($fh)
      $text = $text + $line
   Loop
   If InStr($text, $stringToFind)
      $stringFound = 1
   Endif
   If $stringFound
      $nul = MessageBox("Status OK ! ", "ICT - INFO", 64, 3)
   Else 
      $nul = MessageBox("Status NOT OK ! ", "ICT - INFO", 64, 3)
   EndIf
Endif


Edited by ShaneEP (2017-11-17 10:39 PM)