It appears that the Windows Management Framework 3.0 for Windows 7 SP1 and Windows Server 2008 R2 SP1 update (http://support.microsoft.com/kb/2506143), which includes PowerShell 3.0, breaks PSTerminalServices.
When trying to 'Import-Module PSTerminalServices' I get the following error:
Import-Module : Could not load file or assembly 'file:///P:\Documents\WindowsPowerShell\Modules\PSTerminalServices\bin\cassia.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) At P:\Documents\Scripts\ScriptName.ps1:17 char:1
+ CategoryInfo : InvalidOperation: (:) [Import-Module], FileLoadException
+ FullyQualifiedErrorId : FormatXMLUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand
Yes, the Cassia.dll file is at the location referenced in the error above, I quintuple checked. However, PowerShell doesn't seem to "see" it.
I should note that P: is a network share and I have mapped my My Documents (and other libraries) to that location. Running this exact script works fine in PowerShell 2.0.
Uninstalling the offending Windows Update allows the import to take place without an issue, so I'm assuming PowerShell 3.0 has broken this functionality somehow. However, I am able to import other custom modules from that same network location just
fine with PS 3.0.
Anyone else having this problem with PSTerminalServices? Any idea on how to fix it?