Reputation: 3451
My Environment: Windows Server 2012, PowerShell 4.0
According to MSDN documentation, one should be able to mount 'active directory' or 'active directory lightweight directory services' using new-psdrive Cmdlet.
Excerpt from: http://technet.microsoft.com/en-us/library/hh852274(v=wps.620).aspx
You can use the Active Directory module provider to map Active Directory domains, AD LDS instances, and Active Directory Database Mounting Tool instances to specific provider drives. When the Active Directory module is first loaded, a default Active Directory drive (AD:) is mounted. To connect to that drive, run the cd AD: command. To connect a new provider drive to an Active Directory domain, an AD LDS server, or an Active Directory Database Mounting Tool instance, use the following 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>
However the 'server' option is not available in new-psdrive Cmdlet. I am getting 'A parameter cannot be found that matches parameter name 'server'. And I don't see any mention of server property in the help as well: http://technet.microsoft.com/en-US/library/hh849829(v=wps.630).aspx
can anyone please let me know what I am missing here?
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:\>
Upvotes: 0
Views: 5870
Reputation: 28144
New-PSDrive -Name z -PSProvider activedreictory -root "C=MyAdLDSInstance,DC=COM" -server "myserver:50000"
You've misspelled ActiveDirectory
. The available parameters are dependent upon the PSProvider
specified, and activedreictory
isn't a valid PSProvider
at all.
Upvotes: 1