question

BruceZhang-5759 avatar image
0 Votes"
BruceZhang-5759 asked IanXue-MSFT commented

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

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-server-powershell
image.png (72 B)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RichMatheisen-8856 avatar image
0 Votes"
RichMatheisen-8856 answered IanXue-MSFT commented

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?

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Buddy,

  I finally finger it out and it is caused the expired coding certificate. After deploy new certificate it works as expected.

But I experienced another issue:

I want to reinstall the System driver without format disk partition. I add a TS to check if C:\Windows existed. If yes, Skip disk partition.

From the BDD.log it actually works as ruled. but MDT deploy the OS failed with error code: 5456.


114139-1.png114178-2.png




0 Votes 0 ·
1.png (22.1 KiB)
2.png (29.6 KiB)

Hi,

As it's more a MDT issue, please start a new thread with the "mem-mdt" tag for better help.

0 Votes 0 ·