tabs-not-spaces / Intune.USB.Creator

A module containing tools to assist with the creation of a bootable WinPE USB used to provision devices for enrollment to Intune.
GNU General Public License v3.0
131 stars 43 forks source link

Grabbing Autopilot config file from Azure #35

Closed glwheeler closed 3 years ago

glwheeler commented 3 years ago

When grabbing Autopilot config file from Azure.., I get this. WARNING: Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

macaddict89 commented 3 years ago

I had this issue today on a new machine. When I was trying some troubleshooting I tried to run a command and found the issue to be that I hadn't changed the executionpolicy settings. It may not be your issue, however I wanted to post this in case someone else hadn't checked executionpolicy settings.

tabs-not-spaces commented 3 years ago

The issue is due to not having the msal module in both PowerShell 5.1 and PowerShell 7.0 module locations.

On Fri, 28 May 2021, 4:14 am Gregory Wheeler, @.***> wrote:

When grabbing Autopilot config file from Azure.., I get this. WARNING: Could not load type 'System.Security.Cryptography.SHA256Cng' from assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tabs-not-spaces/Intune.USB.Creator/issues/35, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIDA4LK223PYWOAGROXGRXTTP2DYBANCNFSM45U2O44A .

macaddict89 commented 3 years ago

That checks out. I had installed the module in 5.1 as part of my troubleshooting so i may have been off on my resolution.

gregfink83 commented 3 years ago

I am getting this error as well. I'm sorry I don't understand the fix, can some be more descriptive? Thank you.

tabs-not-spaces commented 3 years ago

It's not an error. Install the MSAL.PS module for both PowerShell 5.1 & PowerShell 7.0.