Forum Discussion
SimonRear
Jan 01, 2023Copper Contributor
Planner Admin PowerShell Pre-requisite Error
Hi, I'm new to PowerShell and hope somebody can help out. I'm trying to meet the prerequisites before running scripts to configure M365 Planner as per this https://learn.microsoft.com/en-us/office365/planner/prerequisites-for-powershell
At step 2 when I run the command;
Import-module "C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PlannerTenantAdmin\plannertenantadmin.psm1"
PowerShell displays the error;
Exception calling "LoadFrom" with "1" argument(s): "Could not load file or assembly
'file:///C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PlannerTenantAdmin\Microsoft.Identity.Client.dll' or one
of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)"
At C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PlannerTenantAdmin\plannertenantadmin.psm1:8 char:1
+ [Reflection.Assembly]::LoadFrom("$path\Microsoft.Identity.Client.dll" ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : FileLoadException
Import-module : The specified module
'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\PlannerTenantAdmin\plannertenantadmin.psm1' was not loaded because
no valid module file was found in any module directory.
At line:1 char:1
+ Import-module "C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Pla ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (C:\Windows\Syst...enantadmin.psm1:String) [Import-Module], FileNot
FoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
On the surface it looks like files can't be found however all files are in the correct place;
Can anybody please point me in the right direction on how to fix this?
Thanks in advance!
Simon
- Did you unblock the files? https://learn.microsoft.com/en-us/office365/planner/prerequisites-for-powershell#unblock-your-files Tested the procedure and works fine on my Windows 11 PowerShell 7 session
3 Replies
- Did you unblock the files? https://learn.microsoft.com/en-us/office365/planner/prerequisites-for-powershell#unblock-your-files Tested the procedure and works fine on my Windows 11 PowerShell 7 session
- SimonRearCopper Contributor
Hi Harm_Veenstra I need to pay more attention I read the check box as blocked not unblock. All working now. Thank your for your help!
- No problem, please mark my answer as solution to mark it as solved