Import-Module SQLParser fails

Jun 7, 2010 at 2:22 PM

When running

Import-Module sqlpsx

I get this:

Loading SQLPSX Module - SQLParser
Import-Module : Could not load file or assembly 'Microsoft.Data.Schema.ScriptDom, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)
At \\SERVER01\Users\japheth\My Documents\WindowsPowerShell\Modules\sqlpsx\sqlpsx.psm1:52 char:15
+  Import-Module <<<<  $PSXmodule -global
    + CategoryInfo          : InvalidOperation: (:) [Import-Module], FileLoadException
    + FullyQualifiedErrorId : FormatXmlUpateException,Microsoft.PowerShell.Commands.ImportModuleCommand

Any ideas?

Jun 8, 2010 at 3:04 AM

I would look at one of two things:

First, did you unblock the zip file after downloading as indicated in the documentation

Second, by the "\\SERVER01\Users\japheth\My Documents" message it appears you may be trying to import a module using a remote UNC path location. Unless the script is signed (which it isn't) or you have your execution policy set to unrestricted (which you shouldn't) this could be an issue. Make your execution is set to remote signed as indicated in the documentation and you are importing a module stored locally on the machine.