ImportSystemModule

This topic contains 0 replies, has 1 voice, and was last updated by  Forums Archives 5 years, 11 months ago.

  • Author
    Posts
  • #5108

    by danj111 at 2012-09-13 11:31:48

    I am receiving the following error when I run the command ImportSystemModule, I understand it probably has something to do with Server 2008 Admin Pack being installing on my computer running Windows 7. Any help to sort this out would be appreciated.

    PS C:\Users\danj> $error
    Import-Module : The following error occurred while loading the extended type data file:
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(1
    1) : Error in type "Microsoft.ActiveDirectory.Management.ADEntity": Exception: Cannot convert the "Microsoft.ActiveDire
    ctory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(1
    7) : Error in type "Microsoft.ActiveDirectory.Management.ADObject": Exception: Cannot convert the "Microsoft.ActiveDire
    ctory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(2
    3) : Error in type "Microsoft.ActiveDirectory.Management.ADOrganizationalUnit": Exception: Cannot convert the "Microsof
    t.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(2
    9) : Error in type "Microsoft.ActiveDirectory.Management.ADPrincipal": Exception: Cannot convert the "Microsoft.ActiveD
    irectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(3
    5) : Error in type "Microsoft.ActiveDirectory.Management.ADGroup": Exception: Cannot convert the "Microsoft.ActiveDirec
    tory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(4
    1) : Error in type "Microsoft.ActiveDirectory.Management.ADUser": Exception: Cannot convert the "Microsoft.ActiveDirect
    ory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(4
    7) : Error in type "Microsoft.ActiveDirectory.Management.ADComputer": Exception: Cannot convert the "Microsoft.ActiveDi
    rectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(5
    3) : Error in type "Microsoft.ActiveDirectory.Management.ADAccount": Exception: Cannot convert the "Microsoft.ActiveDir
    ectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(5
    9) : Error in type "Microsoft.ActiveDirectory.Management.ADServiceAccount": Exception: Cannot convert the "Microsoft.Ac
    tiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(6
    5) : Error in type "Microsoft.ActiveDirectory.Management.ADDomain": Exception: Cannot convert the "Microsoft.ActiveDire
    ctory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(7
    1) : Error in type "Microsoft.ActiveDirectory.Management.ADFineGrainedPasswordPolicy": Exception: Cannot convert the "M
    icrosoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(7
    7) : Error in type "Microsoft.ActiveDirectory.Management.ADSite": Exception: Cannot convert the "Microsoft.ActiveDirect
    ory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(8
    3) : Error in type "Microsoft.ActiveDirectory.Management.ADRootDSE": Exception: Cannot convert the "Microsoft.ActiveDir
    ectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(8
    9) : Error in type "Microsoft.ActiveDirectory.Management.ADDefaultDomainPasswordPolicy": Exception: Cannot convert the
    "Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(9
    5) : Error in type "Microsoft.ActiveDirectory.Management.ADDirectoryServer": Exception: Cannot convert the "Microsoft.A
    ctiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(1
    01) : Error in type "Microsoft.ActiveDirectory.Management.ADDomainController": Exception: Cannot convert the "Microsoft
    .ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(1
    07) : Error in type "Microsoft.ActiveDirectory.Management.ADForest": Exception: Cannot convert the "Microsoft.ActiveDir
    ectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(1
    13) : Error in type "Microsoft.ActiveDirectory.Management.ADOptionalFeature": Exception: Cannot convert the "Microsoft.
    ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".

    At line:24 char:34
    + Import-Module < <<< $_.Name -ErrorAction SilentlyContinue
    + CategoryInfo : InvalidOperation: (:) [Import-Module], RuntimeException
    + FullyQualifiedErrorId : FormatXmlUpateException,Microsoft.PowerShell.Commands.ImportModuleCommand

    Import-Module : The following error occurred while loading the extended type data file:
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(1
    1) : Error in type "Microsoft.ActiveDirectory.Management.ADEntity": Exception: Cannot convert the "Microsoft.ActiveDire
    ctory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(1
    7) : Error in type "Microsoft.ActiveDirectory.Management.ADObject": Exception: Cannot convert the "Microsoft.ActiveDire
    ctory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(2
    3) : Error in type "Microsoft.ActiveDirectory.Management.ADOrganizationalUnit": Exception: Cannot convert the "Microsof
    t.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(2
    9) : Error in type "Microsoft.ActiveDirectory.Management.ADPrincipal": Exception: Cannot convert the "Microsoft.ActiveD
    irectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(3
    5) : Error in type "Microsoft.ActiveDirectory.Management.ADGroup": Exception: Cannot convert the "Microsoft.ActiveDirec
    tory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(4
    1) : Error in type "Microsoft.ActiveDirectory.Management.ADUser": Exception: Cannot convert the "Microsoft.ActiveDirect
    ory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(4
    7) : Error in type "Microsoft.ActiveDirectory.Management.ADComputer": Exception: Cannot convert the "Microsoft.ActiveDi
    rectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(5
    3) : Error in type "Microsoft.ActiveDirectory.Management.ADAccount": Exception: Cannot convert the "Microsoft.ActiveDir
    ectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(5
    9) : Error in type "Microsoft.ActiveDirectory.Management.ADServiceAccount": Exception: Cannot convert the "Microsoft.Ac
    tiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(6
    5) : Error in type "Microsoft.ActiveDirectory.Management.ADDomain": Exception: Cannot convert the "Microsoft.ActiveDire
    ctory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(7
    1) : Error in type "Microsoft.ActiveDirectory.Management.ADFineGrainedPasswordPolicy": Exception: Cannot convert the "M
    icrosoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(7
    7) : Error in type "Microsoft.ActiveDirectory.Management.ADSite": Exception: Cannot convert the "Microsoft.ActiveDirect
    ory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(8
    3) : Error in type "Microsoft.ActiveDirectory.Management.ADRootDSE": Exception: Cannot convert the "Microsoft.ActiveDir
    ectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(8
    9) : Error in type "Microsoft.ActiveDirectory.Management.ADDefaultDomainPasswordPolicy": Exception: Cannot convert the
    "Microsoft.ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(9
    5) : Error in type "Microsoft.ActiveDirectory.Management.ADDirectoryServer": Exception: Cannot convert the "Microsoft.A
    ctiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(1
    01) : Error in type "Microsoft.ActiveDirectory.Management.ADDomainController": Exception: Cannot convert the "Microsoft
    .ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(1
    07) : Error in type "Microsoft.ActiveDirectory.Management.ADForest": Exception: Cannot convert the "Microsoft.ActiveDir
    ectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".
    Microsoft.PowerShell, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDirectory.Types.ps1xml(1
    13) : Error in type "Microsoft.ActiveDirectory.Management.ADOptionalFeature": Exception: Cannot convert the "Microsoft.
    ActiveDirectory.Management.ADEntityAdapter" value of type "System.String" to type "System.Type".

    At line:24 char:34
    + Import-Module < <<< $_.Name -ErrorAction SilentlyContinue
    + CategoryInfo : InvalidOperation: (:) [Import-Module], RuntimeException
    + FullyQualifiedErrorId : FormatXmlUpateException,Microsoft.PowerShell.Commands.ImportModuleCommand

    Import-Module : Could not load file or assembly 'Microsoft.GroupPolicy.Management' or one of its dependencies. An argum
    ent was out of its legal range. (Exception from HRESULT: 0x80131502)
    At line:24 char:34
    + Import-Module < <<< $_.Name -ErrorAction SilentlyContinue
    + CategoryInfo : InvalidOperation: (:) [Import-Module], FileLoadException
    + FullyQualifiedErrorId : FormatXmlUpateException,Microsoft.PowerShell.Commands.ImportModuleCommand

    Import-Module : Could not load file or assembly 'FailoverClusters.ObjectModel' or one of its dependencies. An argument
    was out of its legal range. (Exception from HRESULT: 0x80131502)
    At line:24 char:34
    + Import-Module < <<< $_.Name -ErrorAction SilentlyContinue
    + CategoryInfo : InvalidOperation: (:) [Import-Module], FileLoadException
    + FullyQualifiedErrorId : FormatXmlUpateException,Microsoft.PowerShell.Commands.ImportModuleCommand

    Import-Module : Could not load file or assembly 'Microsoft.BackgroundIntelligentTransfer.Management.Interop' or one of
    its dependencies. An argument was out of its legal range. (Exception from HRESULT: 0x80131502)
    At line:24 char:34
    + Import-Module < <<< $_.Name -ErrorAction SilentlyContinue
    + CategoryInfo : InvalidOperation: (:) [Import-Module], FileLoadException
    + FullyQualifiedErrorId : FormatXmlUpateException,Microsoft.PowerShell.Commands.ImportModuleCommand

    Import-Module : Could not load file or assembly 'Microsoft.Security.ApplicationId.PolicyManagement.Cmdlets' or one of i
    ts dependencies. An argument was out of its legal range. (Exception from HRESULT: 0x80131502)
    At line:24 char:34
    + Import-Module < <<< $_.Name -ErrorAction SilentlyContinue
    + CategoryInfo : NotSpecified: (:) [Import-Module], FileLoadException
    + FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand

    Import-Module : Could not load file or assembly 'Microsoft.ActiveDirectory.Management' or one of its dependencies. An a
    rgument was out of its legal range. (Exception from HRESULT: 0x80131502)
    At line:24 char:34
    + Import-Module < <<< $_.Name -ErrorAction SilentlyContinue
    + CategoryInfo : InvalidOperation: (:) [Import-Module], FileLoadException
    + FullyQualifiedErrorId : FormatXmlUpateException,Microsoft.PowerShell.Commands.ImportModuleCommand

    by DonJ at 2012-09-13 11:53:37

    The Windows 7 RSAT isn't compatible with anything but Windows 7. If you're trying to do this on another OS, it won't work.

    As an alternative, if you have a machine where this module exists (like a domain controller running 2008R2), and that machine has PowerShell Remoting enabled, then yo ucould implicitly remote the module from that machine.

    by juneb_msft at 2012-09-14 11:32:12

    I'd be interested in knowing why you were using ImportSystemModules. We removed it from PowerShell 3.0 because we now have module auto-loading. Are you using it for something strategic?

    by chrisb at 2012-09-18 08:50:14

    I'm having a similar issue. I was diong the same thing and getting this error:

    , C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory\ActiveDire
    ctory.Types.ps1xml(112) : Error in type
    "Microsoft.ActiveDirectory.Management.ADOptionalFeature": Type
    "Microsoft.ActiveDirectory.Management.ADEntityAdapter" should be a
    PSPropertyAdapter.
    At line:1 char:1
    + import-module ActiveDirectory
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [Import-Module], RuntimeEx
    ception
    + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Co
    mmands.ImportModuleCommand

    I loaded the non-import version of PS and am now getting this:

    PS C:\Windows> Get-ADComputer
    Get-ADComputer : The 'Get-ADComputer' 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-ADComputer
    + ~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (Get-ADComputer:String) [], Comm
    andNotFoundException
    + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

    I am running v3. Any ideas?

    edit: Also, I installed the hp system tools pack for PS and even though it shows as loaded it does not recognize anyof the commands:

    Name : HewlettPackard.Servers.BladeSystem.HPBladeSystemEnclosureCmdLets
    PSVersion : 2.0
    Description : PowerShell SnapIn for HP BladeSystem Enclosure Monitor

    Name : Quest.ActiveRoles.ADManagement
    PSVersion : 1.0
    Description : This Windows PowerShell snap-in contains cmdlets to manage
    Active Directory and Quest ActiveRoles Server.

    PS C:\Windows> get-blade
    get-blade : The term 'get-blade' is not recognized as the name of a cmdlet,
    function, script file, or operable program. Check the spelling of the name, or
    if a path was included, verify that the path is correct and try again.
    At line:1 char:1
    + get-blade
    + ~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (get-blade:String) [], CommandNo
    tFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

You must be logged in to reply to this topic.