8 May,19 at 03:02 PM
Problem:
Exception error ‘Operation is not supported’ returned when import Centrify DC / DA PS modules.
PS C:\Users\pckelly> Import-Module CentrifyDirectControl
Import-Module : Could not load file or assembly 'file:///C:\Windows\system32\WindowsPowerShell\v1.0\Modules\CentrifyDirectControl\Centrify.Cfw.Core.dll' or one of its
dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
At line:1 char:1
+ Import-Module CentrifyDirectControl
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Import-Module], FileLoadException
+ FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand
Cause:
'Operation is not supported' indicates the module couldn't be loaded because of some security policies. That is most likely the .dll files under C:\Windows\system32\WindowsPowerShell\v1.0\Modules\CentrifyDirectControl\ are copied from untrusted site defined by the machine. Then the .dll files are blocked on the local machine.
Resolution:
To check if the dlls are blocked: