Jump to content
Welcome to our new Citrix community!
  • 1

Having trouble simply getting started


Michael Bantz

Question

Was wondering if someone could help me get over the hurdle of getting the SDK working on my workstation (Windows 8.1 64bit).

 

Based on the included readme:

 

I copied XenServerPSModule into C:\Program Files\WindowsPowerShell\Modules

 

Set the execution policy to remote signed (had been done prior but double-checked).

 

When I launch PowerShell and try to import the XenServer module, I get the following:



 

Import-Module : Could not load file or assembly 'file:///C:\Program
Files\WindowsPowerShell\Modules\XenServerPSModule\CookComputing.XmlRpcV2.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
At line:1 char:1
+ Import-Module XenServerPSModule
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: ( : ) [import-Module], FileLoadException
    + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand

 

 

Any ideas on how to get past this? Thanks, in advance...

 

 - mike

Link to comment

10 answers to this question

Recommended Posts

  • 1

In case anyone else is hung up on this after trying the above suggestions; my problem turned out to be related to this issue: https://social.msdn.microsoft.com/Forums/vstudio/en-US/695581ae-77e7-4c3a-bb3f-6472b8c47f65/sgen-quotcould-not-load-file-or-assembly-file-or-one-of-its-dependences-operation-is-not?forum=msbuild#05f3d6fb-eefc-46db-8f90-430d21d4ba6f

 

The fix was just to export the certificate off one of the DLLs (the Citrix Systems, Inc code signing one), and import it to my machine's trusted publishers store. After that the module loaded without issue.

  • Like 1
Link to comment
  • 0

Run PowerShell as administrator.  Had this issue before.

 

I should have clarified that I'm running PowerShell as administrator when trying to import that module. Same behavior if I run as admin or run as myself.

 

As administrator:

 

PS C:\Windows\system32> Import-Module XenServerPSModule

Import-Module : Could not load file or assembly 'file:///C:\Program
Files\WindowsPowerShell\Modules\XenServerPSModule\CookComputing.XmlRpcV2.dll' or one of its dependencies. Operation is
not supported. (Exception from HRESULT: 0x80131515)
At line:1 char:1
+ Import-Module XenServerPSModule
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: ( :) [import-Module], FileLoadException
    + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand
 
PS C:\Windows\system32>

 

 

As myself:

PS C:\Users\Mike> Import-Module XenServerPSModule

Import-Module : Could not load file or assembly 'file:///C:\Program
Files\WindowsPowerShell\Modules\XenServerPSModule\CookComputing.XmlRpcV2.dll' or one of its dependencies. Operation is
not supported. (Exception from HRESULT: 0x80131515)
At line:1 char:1
+ Import-Module XenServerPSModule
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: ( :) [import-Module], FileLoadException
    + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand
 
PS C:\Users\Mike>

 

Link to comment
  • 0

Hi

 

I have the exact same issue and the exact same result with the XenServer 7.0 SDK. However downloading it again does not fix it for me.

 

Using a W2012 R2 Admin VM with .Net 4.5 and Powershell 4.0 installed. Also tried Powershell 5.0 but no difference.

 

I'm running Set-ExecutionPolicy Unrestricted, so no issues there and have obviously run this as an Admin.

 

This is the error:

 

Import-Module XenServerPSModule
Import-Module : Could not load file or assembly 'file:///C:\Windows\system32\WindowsPowerShell\v1.0\Modules\XenServerPSModule\CookComputing.XmlRpcV2.dll' or one of 
its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
At line:1 char:1
+ Import-Module XenServerPSModule
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (: ) [import-Module], FileLoadException
    + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand

 

 

 

Any ideas?

 

Thanks

 

Ben

Link to comment
  • 0

Thanks Andrew

 

For some reason, I've never heard of having to "unblock" a .dll before. Although Jarian and Michael mention it above, I assumed it was to do with when downloading the SDK.... After doing this to the 3 .dll files in the PS Modules directory, it all instantly worked!

 

For anyone else (like me) that hasn't unblocked a .dll before: Right click the .dll > Properties > Unblock

 

@ Citrix - If possible, could you please add a line about unblocking the 3 .dll files into the SDK instructions to help anyone else installing it.

 

Thanks

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...