SOLVED

Planner Admin PowerShell Pre-requisite Error

Copper Contributor

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 Microsoft Link.

 

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;

Snippet.png

 

 

 

 

 

 

 

 

Can anybody please point me in the right direction on how to fix this?

 

Thanks in advance!

 

Simon

3 Replies
best response confirmed by SimonRear (Copper Contributor)
Solution
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

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
1 best response

Accepted Solutions
best response confirmed by SimonRear (Copper Contributor)
Solution
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

View solution in original post