PowerShell Error:SecurityError: (:) [], PSSecurityException

Bruce Zhang 26 Reputation points
2021-07-12T02:34:09.007+00:00

Hi All,

I am using Windows MDT to deploy OS and run 2 PowerShell script to install a software (with registry update) and enable BitLocker per our customization request.
Environment:
MDT: 6.3.8456.1000
ADK: 10.1.19041.1
Both of these two script are certificate signed by internal CA

113682-image.png

Error in BDD:

About to run: "C:\MININT\Modules\Microsoft.BDD.TaskSequenceModule\Microsoft.BDD.TaskSequencePSHost40.exe" "\XX.XX.XX.XX\MDTShare$\Scripts\Cisco.ps1" "C:\MININT\SMSOSD\OSDLOGS"
File \XX.XX.XX.XX\MDTShare$\Scripts\Cisco.ps1 cannot be loaded because you opted not to run this software now.
SecurityError: (:) [], PSSecurityException

Windows for business | Windows Server | User experience | PowerShell
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 48,036 Reputation points
    2021-07-12T18:39:11.2+00:00

    If you uploaded the file to a share, be sure that the file has not been blocked.

    Does the PowerShell execution policy allow you to run scripts from the target machine?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.