Incompatibility on Windows 8.1 Powershell 4.0

144 views
Skip to first unread message

jason....@lsr7.net

unread,
Mar 24, 2015, 10:19:27 PM3/24/15
to gshell-...@googlegroups.com
I ran across this the other day on my new Windows 8.1 x64 workstation. I confirmed it on a test system and a vm, all loaded by different people. v0.0.5.0 and v0.0.6.0 exhibit this behavior but v0.0.4.5 and earlier do not (though several versions including v0.0.4.5 require the installer to be run in compatibility mode). I did do a ridiculous amount of troubleshooting before tracing it down to gshell.

- The problem is, once the gshell module is loaded, no other module can be loaded.

- gshell will still work, you just can't load anything else.

- Any modules you load before gshell will work even after you load gshell.

I used the activedirectory module as an example in the output below. The results were similar on every other module I tried, right up to and including Microsoft.PowerShell.Management. I'm not a programmer so please let me know what info, if any that I can provide to help resolve this. Thanks!





Windows PowerShell
Copyright (C) 2014 Microsoft Corporation. All rights reserved.

PS C:\WINDOWS\system32> import-module gshell
PS C:\WINDOWS\system32> get-aduser
get-aduser : The 'get-aduser' command was found in the module 'ActiveDirectory', but the module could not be loaded.
For more information, run 'Import-Module ActiveDirectory'.
At line:1 char:1
+ get-aduser
+ ~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (get-aduser:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

PS C:\WINDOWS\system32> import-module activedirectory
import-module : The following error occurred while loading the extended type data file:
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(11) : Error in type
"Microsoft.ActiveDirectory.Management.ADEntity": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(17) : Error in type
"Microsoft.ActiveDirectory.Management.ADObject": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(23) : Error in type
"Microsoft.ActiveDirectory.Management.ADOrganizationalUnit": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(29) : Error in type
"Microsoft.ActiveDirectory.Management.ADPrincipal": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(35) : Error in type
"Microsoft.ActiveDirectory.Management.ADGroup": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(41) : Error in type
"Microsoft.ActiveDirectory.Management.ADUser": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(47) : Error in type
"Microsoft.ActiveDirectory.Management.ADComputer": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(53) : Error in type
"Microsoft.ActiveDirectory.Management.ADAccount": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(59) : Error in type
"Microsoft.ActiveDirectory.Management.ADServiceAccount": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(65) : Error in type
"Microsoft.ActiveDirectory.Management.ADDomain": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(71) : Error in type
"Microsoft.ActiveDirectory.Management.ADFineGrainedPasswordPolicy": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(77) : Error in type
"Microsoft.ActiveDirectory.Management.ADRootDSE": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(83) : Error in type
"Microsoft.ActiveDirectory.Management.ADDefaultDomainPasswordPolicy": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(89) : Error in type
"Microsoft.ActiveDirectory.Management.ADDirectoryServer": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(95) : Error in type
"Microsoft.ActiveDirectory.Management.ADDomainController": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(101) : Error in type
"Microsoft.ActiveDirectory.Management.ADForest": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(107) : Error in type
"Microsoft.ActiveDirectory.Management.ADOptionalFeature": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(113) : Error in type
"Microsoft.ActiveDirectory.Management.ADReplicationSite": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(119) : Error in type
"Microsoft.ActiveDirectory.Management.ADReplicationSubnet": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(125) : Error in type
"Microsoft.ActiveDirectory.Management.ADReplicationSiteLink": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(131) : Error in type
"Microsoft.ActiveDirectory.Management.ADReplicationSiteLinkBridge": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(137) : Error in type
"Microsoft.ActiveDirectory.Management.ADReplicationAttributeMetadata": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(143) : Error in type
"Microsoft.ActiveDirectory.Management.ADReplicationFailure": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(149) : Error in type
"Microsoft.ActiveDirectory.Management.ADReplicationPartnerMetadata": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(155) : Error in type
"Microsoft.ActiveDirectory.Management.ADReplicationQueueOperation": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(161) : Error in type
"Microsoft.ActiveDirectory.Management.ADReplicationUpToDatenessVectorTable": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(167) : Error in type
"Microsoft.ActiveDirectory.Management.ADReplicationConnection": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(173) : Error in type
"Microsoft.ActiveDirectory.Management.ADClaimTypeBase": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(179) : Error in type
"Microsoft.ActiveDirectory.Management.ADResourceProperty": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(185) : Error in type
"Microsoft.ActiveDirectory.Management.ADClaimType": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(191) : Error in type
"Microsoft.ActiveDirectory.Management.ADCentralAccessPolicy": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(197) : Error in type
"Microsoft.ActiveDirectory.Management.ADCentralAccessRule": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(203) : Error in type
"Microsoft.ActiveDirectory.Management.ADResourcePropertyList": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(209) : Error in type
"Microsoft.ActiveDirectory.Management.ADResourcePropertyValueType": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(215) : Error in type
"Microsoft.ActiveDirectory.Management.ADTrust": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(221) : Error in type
"Microsoft.ActiveDirectory.Management.ADClaimTransformPolicy": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(227) : Error in type
"Microsoft.ActiveDirectory.Management.ADAuthenticationPolicy": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
, C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\activedirectory\ActiveDirectory.Types.ps1xml(233) : Error in type
"Microsoft.ActiveDirectory.Management.ADAuthenticationPolicySilo": Exception: Cannot convert the
"Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
At line:1 char:1
+ import-module activedirectory
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Import-Module], RuntimeException
+ FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand



--

*CONFIDENTIALITY NOTICE AND DISCLAIMER: * This e-mail and any attachments
may be confidential and may contain privileged or copyright information.
If you are not the intended recipient, please call (816) 986-1444 and
inform us that you have received this message in error. Please do not
copy, distribute or use this e-mail or the information contained in it for
any purpose.

Spencer Varney

unread,
Mar 25, 2015, 10:00:49 AM3/25/15
to jason....@lsr7.net, gshell-...@googlegroups.com
And, I managed to not reply all again (dangit). Apologies to Jason for the duplicate message!

Hey Jason,

Thanks for the heads up, this is definitely not intended behavior! I was able to replicate it on my 8.1 machine, so I'll be taking a look in to it when I can set aside some time to focus on it (maybe this weekend, fingers crossed). I'm not entirely sure what's going on right now, but from a quick test it looks like 'the workaround' will be to load all other modules first as you mentioned.

I did some cursory research and it looks like other modules have run in to similar issues in the past, but there isn't a lot in the way of resolutions on the surface of what I found.

In the meantime, if you can do me a favor and add this as an issue here ( https://github.com/squid808/gShell/issues ) I'd appreciate it - I just don't want to forget about it. Feel free to crop some of those errors =)

Let me know if you happen to find anything that seems like it may be a hit from the Googleverse, in the meantime.

Sorry for the issue!

--
You received this message because you are subscribed to the Google Groups "gshell-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gshell-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Spencer Varney

unread,
Mar 26, 2015, 2:45:51 PM3/26/15
to Jason Carter, gshell-...@googlegroups.com
Jason et al.,

I've narrowed this issue down a bit but it has me stumped, so in case anyone is interested in the details I've posted it on StackOverflow here: http://stackoverflow.com/questions/29286173/assembly-resolution-for-posh-cmdlet-causes-other-module-imports-to-fail

Hopefully someone smarter than I has the answer!

Cheers,

Spencer

Spencer Varney

unread,
May 12, 2015, 9:43:01 PM5/12/15
to Jason Carter, gshell-...@googlegroups.com
Hi everyone,

I'm putting out a beta version of the next release tonight, if you get a chance please give it a shot and see if it resolves the issue!

Regards,

Spencer
Reply all
Reply to author
Forward
0 new messages