导入模块:指定的模块“ActiveDirectory的”不加载,因为没有有效的模块文件中发现了任何模块目录模块、发现了、加载、有效

2023-09-08 12:42:52 作者:爱与自由

我有麻烦的是Server 2008 SP2(64位)执行导入模块的ActiveDirectory。

I am having trouble doing an import-module ActiveDirectory on a Server 2008 SP2 (64 bit).

在安装NET Framework 3.5 SP1中 我下载Windows6.0-KB968934-x86.msu程序(用于ADWS) 在此文件没有安装说的更新并不适用于我的系统 在做一些研究(http://anti-american.rssing.com/chan-2091246/all_p15.html)我在知识库文章969166安装修补程序,并安装了上述更新。 在重新启动后,我注意到,在服务,Active Directory Web服务运行 在我开了一个行政PS提示并执行了导入模块的ActiveDirectory,但是... NET Framework 3.5 SP1 is installed I download the Windows6.0-KB968934-x86.msu (for ADWS) This file did not install saying that "The update does not apply to my system" Doing some research (http://anti-american.rssing.com/chan-2091246/all_p15.html) I installed hotfix in KB article 969166 and the above update installed. After a reboot, I noticed that in services, Active Directory Web Services is running I opened an administrative PS prompt and performed an Import-Module ActiveDirectory, but...

...我得到:

Import-Module : The specified module 'activedirectory' was not loaded because no valid     module file was found in any module directory.
At line:1 char:14
+ import-module <<<<  activedirectory
    + CategoryInfo          : ResourceUnavailable: (activedirectory:String) [Import-    Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

如果它的任何帮助,这里是在PSModule路径,模块和版本的一些信息:

If its any help, here's some info in PSModule Path, modules and the version:

PS C:\Windows\system32> $env:PSModulePath
C:\Users\ischmd\Documents\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules\

PS C:\Windows\system32> Get-Module -ListAvailable

ModuleType Name                      ExportedCommands
---------- ----                      ----------------
Manifest   BitsTransfer              {}
Manifest   PSDiagnostics             {}

PS C:\Windows\system32> $PSVersionTable.psversion

Major  Minor  Build  Revision
-----  -----  -----  --------
2      0      -1     -1


PS C:\Windows\system32> $host.version

Major  Minor  Build  Revision
-----  -----  -----  --------
2      0      -1     -1

任何帮助是极大的AP preciated。这样做的主要目的是让-ADUser便有命令自动执行某些过程,但是在这一点上,被难住了。我的唯一的结论是,这是不可能的视窗2008 SP2 ...

Any help is greatly appreciated. The main purpose of this is to GET-AdUser command to automate some process but at this point, were stumped. My only conclusion is that this is not possible with Windows 2008 SP2...

推荐答案

AD PowerShell的模块应列出安装的功能下。参见图:

AD Powershell module should be listed under installed Features. See image:

.