我已经安装了模块http://www.powershellgallery.com/packages/xActiveDirectory/,导入它,但是当我查看模块时,似乎没有任何内容,至少在所有cmdlet中都没有。以下是我所做的一份记录。显然我错过了一些东西,但不知道是什么。谁能帮忙?xActiveDirectory没有cmdlet。为什么?
PS C:\WINDOWS\system32> ipmo xActiveDirectory
PS C:\WINDOWS\system32> Get-Module
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 0.0 chocolateyProfile {TabExpansion, Update-SessionEnvironment, refreshenv}
Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con...
Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
Binary 1.0.0.1 PackageManagement {Find-Package, Find-PackageProvider, Get-Package, Get-Pack...
Script 1.0.0.1 PowerShellGet {Find-Command, Find-DscResource, Find-Module, Find-RoleCap...
Script 1.2 PSReadline {Get-PSReadlineKeyHandler, Get-PSReadlineOption, Remove-PS...
Manifest 2.12.0.0 xActiveDirectory
PS C:\WINDOWS\system32> Get-Module xActiveDirectory | fl
Name : xActiveDirectory
Path : C:\Program Files\WindowsPowerShell\Modules\xActiveDirectory\2.12.0.0\xActiveDirectory.psd1
Description : The xActiveDirectory module is originally part of the Windows PowerShell Desired State
Configuration (DSC) Resource Kit. This version has been modified for use in Azure. This module
contains the xADDomain, xADDomainController, xADUser, and xWaitForDomain resources. These DSC
Resources allow you to configure and manage Active Directory.
All of the resources in the DSC Resource Kit are provided AS IS, and are not supported through any
Microsoft standard support program or service.
ModuleType : Manifest
Version : 2.12.0.0
NestedModules : {}
ExportedFunctions :
ExportedCmdlets :
ExportedVariables :
ExportedAliases :
因为它是现有的整个原因是作为DSC资源。它必须有一个模块容器,但如果作者不希望它不需要导出命令。运行'Get-DscResource',这就是它输出的内容以及它存在的原因。 –
明白了,谢谢@ Chris-dent – jamiet