The error message you’re seeing, “CategoryInfo: SecurityError,” in PowerShell typically indicates that there is a security policy or setting preventing the script from running. PowerShell has a built-in security system to prevent potentially malicious scripts from executing without proper authorization.
If your script is not digitally signed and the execution policy is set to a restrictive level, you can bypass the policy by using the -ExecutionPolicy parameter when running your script:
powershell
Copy code
PowerShell.exe -ExecutionPolicy Bypass -File C:\Path\To\YourScript.ps1