Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell ';服务器';新psdrive中缺少选项?如何连接到';ad lds&x27;实例使用目录服务命令let?_Powershell_Active Directory_Adlds - Fatal编程技术网

Powershell ';服务器';新psdrive中缺少选项?如何连接到';ad lds&x27;实例使用目录服务命令let?

Powershell ';服务器';新psdrive中缺少选项?如何连接到';ad lds&x27;实例使用目录服务命令let?,powershell,active-directory,adlds,Powershell,Active Directory,Adlds,我的环境:Windows Server 2012,PowerShell 4.0 根据MSDN文档,应该能够使用新的psdrive Cmdlet装载“active directory”或“active directory轻型目录服务” 摘录自: 您可以使用Active Directory模块提供程序将Active Directory域、AD LDS实例和Active Directory数据库装载工具实例映射到特定的提供程序驱动器。首次加载Active Directory模块时,将安装默认的Acti

我的环境:Windows Server 2012,PowerShell 4.0

根据MSDN文档,应该能够使用新的psdrive Cmdlet装载“active directory”或“active directory轻型目录服务”

摘录自:

您可以使用Active Directory模块提供程序将Active Directory域、AD LDS实例和Active Directory数据库装载工具实例映射到特定的提供程序驱动器。首次加载Active Directory模块时,将安装默认的Active Directory驱动器(AD:)。要连接到该驱动器,请运行cd-AD:命令。要将新的提供程序驱动器连接到Active Directory域、AD LDS服务器或Active Directory数据库装载工具实例,请使用以下cmdlet:


您拼错了
ActiveDirectory
。可用的参数取决于指定的
PSProvider
,并且
activedRecordory
根本不是有效的
PSProvider

wow-就是这样:)。我更关注“错误”消息,因为我认为参数的绑定首先发生,并且假设它不能绑定到“服务器”参数。我不知道参数是否可以基于提供程序“动态”添加到“PowerShell”(这里:正如您指出的“Active Directory”)。顺便问一下,您是否有任何关于如何根据提供者添加“动态”属性的参考资料?只是好奇——因为我现在不需要。Am unblocked:)我不知道它是如何/何时进行参数绑定的,因为我不需要深入研究PS内部。不过我知道新版本会做一些有趣的巫术。在这种情况下,情况正好相反:psprovider为cmdlet定义了动态参数。更多信息可在此处找到:
New-PSDrive **–Server <server or domain name (NetBIOS/FQDN)[:port number]>**  -Name <name of the drive> -PSProvider ActiveDirectory -Root "<DN of the partition/NC>" -Credential <domain name>\<username> 
PS C:\> Import-Module activedirectory
PS C:\> cd ad:
PS AD:\> New-PSDrive -Name z -PSProvider activedreictory -root "C=MyAdLDSInstance,DC=COM" -server "myserver:50000"
New-PSDrive : A parameter cannot be found that matches parameter name 'server'.
At line:1 char:82
+ ... stance,DC=COM" -server "myserver:50000"
+                    ~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [New-PSDrive], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.NewPSDriveCommand

PS AD:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      4.0
WSManStackVersion              3.0
SerializationVersion           1.1.0.1
CLRVersion                     4.0.30319.18449
BuildVersion                   6.3.9600.16406
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion      2.2


PS AD:\>
New-PSDrive -Name z -PSProvider activedreictory -root "C=MyAdLDSInstance,DC=COM" -server "myserver:50000"