Closed Brad-Dale closed 8 months ago
Thanks, I've run into this in the past when uploading scripts to GitHub, copy / paste issue or something.
Thanks for pointing it out.
I've done a find / replace, and it should be resolved now.
Please feel free to open these issues as you find them. Much appreciated.
Sorry for the delay, I didn't notice the issue until this weekend.
Thanks Gary,
Unfortunately similar issue popped up with the new version, in different lines.
At C:\Scripts\HPIA\HPIA-PR-Detect.ps1:326 char:36
+ Write-Host "Trigger Remediation"
+ ~
The string is missing the terminator: ".
At C:\Scripts\HPIA\HPIA-PR-Detect.ps1:218 char:9
+ {
+ ~
Missing closing '}' in statement block or type definition.
At C:\Scripts\HPIA\HPIA-PR-Detect.ps1:187 char:9
+ try {
+ ~
Missing closing '}' in statement block or type definition.
At C:\Scripts\HPIA\HPIA-PR-Detect.ps1:329 char:1
+
The Try statement is missing its Catch or Finally block.
At C:\Scripts\HPIA\HPIA-PR-Detect.ps1:144 char:19
+ Function Run-HPIA {
+ ~
Missing closing '}' in statement block or type definition.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
Find & replacing would sometimes work others not, but got there in the end. I'll raise another issue for what I encountered next.
When running the HPIA-PR-Detect.ps1 script in PowerShell or VS Code it results in the following errors:
Similar issue also occurs for other scripts. VS Code raises the below for lines 310 - 312 and 316 - 318.
Replacing as recommended doesn't resolve.