Hello Shane,
The issue is not changing the status but checking the status in the txt file. The file contains just "Restricted" same as your output, so when you change the
$stringToFind = "RemoteSigned" to $stringToFind = "Restricted",do you get it right now?
For meself it didn't work, however I do the same with powershell it get the status OK.
Why is the status NOK with kix?
does it work for you?