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:
$psversiontable
Name Value
PSVersion 4.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
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)