Forum Discussion

SimonRear's avatar
SimonRear
Copper Contributor
Jan 01, 2023
Solved

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

3 Replies

Resources