Import-Module does nothing

Welcome Forums General PowerShell Q&A Import-Module does nothing

This topic contains 3 replies, has 3 voices, and was last updated by

4 years, 11 months ago.

  • Author
  • #14818

    Points: 0
    Rank: Member

    On my Windows 8.1 machine, I tried to use the get-adcomputer command but got the cmdlet unknown error. I then tried to "Import-Module ActiveDirectory" but also got nowhere. How do I correct this and how do I allow auto loading of modules when they are called? (I thought that was the default setting after version 3.0)

    Below are some pertinent details:


    Name Value
    —- —–
    PSVersion 4.0
    WSManStackVersion 3.0
    CLRVersion 4.0.30319.34014
    BuildVersion 6.3.9600.16394
    PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
    PSRemotingProtocolVersion 2.2

    PS C:\Users\rambo_000> import-module ActiveDirectory
    import-module : The specified module 'ActiveDirectory' was not loaded because no valid module file was found in any
    module directory.
    At line:1 char:1
    + import-module ActiveDirectory
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ResourceUnavailable: (ActiveDirectory:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

    PS C:\Users\rambo_000> $PSModuleAutoLoadingPreference
    PS C:\Users\rambo_000>

    (end of shell capture...the last command $PSModuleAutoLoadingPreference does not come back with anything)

  • #14819

    Points: 0
    Rank: Member

    The ActiveDirectory module is not part of the base PowerShell installation; it's part of the Remote Server Administration Tools (RSAT) package, which you can download from .

  • #14830

    Points: 41
    Rank: Member

    Or make sure you're on the domain controller logged in as an Administrator and the PowerShell console is also elevated as Administrator.

  • #14835

    Points: 0
    Rank: Member

    I was in as local administrator. Unfortunately, the edition of Windows 8.1 is not Pro or Enterprise so RSAT will not work 🙁

    p.s. I was simply trying out the effects of get-adcomputer on my local machine to see what the results would be for osversion. When I run [environment]::OSVersion.Version from the powershell window and from the ISE, I get different results. The ISE seems to report it incorrectly and wanted to see what get-adcomputer will yield. I'll have to wait until work upgrades our machines to 8.1.

    Thanks for your help.

The topic ‘Import-Module does nothing’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort