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

Bruce Zhang 26 Reputation points

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.
MDT: 6.3.8456.1000
ADK: 10.1.19041.1
Both of these two script are certificate signed by internal CA


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 Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,344 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 44,541 Reputation points

    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?