cloudbase / adk-tools-maas

ADK tools for automated WinPE provisioning in MaaS
7 stars 4 forks source link

DeviceManagement.psd1: Could not load file or assembly #4

Open Traste opened 9 years ago

Traste commented 9 years ago

Hi,

Trying to import the DeviceManagement.psd1 on my Windows 8.1 Pro x64 home pc, i get an error as follows:

PS C:\Powershell\DevMan> Import-Module .\DeviceManagement.psd1

-verbose VERBOSE: Loading module from path 'C:\Powershell\DevMan\DeviceManagement.psd1'. VERBOSE: Loading module from path 'C:\Powershell\DevMan\DeviceManagementCmdlet.dll'. Import-Module : Could not load file or assembly 'file:///C:\Powershell\DevMan\DeviceManagementCmdlet.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) At line:1 char:1

Is this a compatibility issue, or am i missing something on my machine?` See attached image for more info. (Note the PS shell is x86 version running, same result in both this and x64

ps dev mgr error

KenMckay commented 9 years ago

Have you fixed this yet? If not, try unblocking the files being loaded. This is likely to be the cause of this behaviour.

fredericaltorres commented 9 years ago

I have the same issue

matepeter90 commented 9 years ago

I had the same issue, but this solution worked for me, KenMckay was right. The downloaded dll files were blocked by Windows because they were downloaded from the internet. Standing in the extracted directory the solution with PowerShell:

Get-ChildItem . | Unblock-File
Import-Module .\DeviceManagement.psd1
tamj0rd2 commented 6 years ago

The solution didn't work for me :(

rolambert commented 4 years ago

Run this in powershell

$psversiontable

Change the powershell version requirements on line 39 of DeviceManagment.psd1 to match your system.