System.DirectoryServices.ActiveDirectory 和 Microsoft.ActiveDirectory 之间的区别
Difference between System.DirectoryServices.ActiveDirectory and Microsoft.ActiveDirectory
在阅读 Active Directory 时,我遇到了 System.DirectoryServices.ActiveDirectory
和 Microsoft.ActiveDirectory.Management
。
System.DirectoryServices.ActiveDirectory
和Microsoft.ActiveDirectory.Management
有什么区别?
正如评论中 @Mathias R. Jessen
所暗示的那样:
System.DirectoryServices.ActiveDirectory Namespace:
The System.DirectoryServices.ActiveDirectory namespace provides a high
level abstraction object model that builds around Microsoft Active
Directory services tasks. The Active Directory service concepts such
as forest, domain, site, subnet, partition, and schema are part of the
object model.
The System.DirectoryServices.ActiveDirectory namespace is used to automate Active Directory management tasks.
System.DirectoryServices.ActiveDirectory is not used to access data
that resides within Active Directory or any other directory service.
The System.DirectoryServices namespace should be used for this
purpose.
The System.DirectoryServices.ActiveDirectory namespace is intended for use by application developers who are familiar with .NET Framework
programming using Visual Basic .NET or C#.
Microsoft.ActiveDirectory.Management:
It is the Active Directory Module for Windows PowerShell. This is
installed when you'll install Remote Server Administrations Tools
or
a subset of this feature
(RemoteServerAdministrationTools-Roles-AD-Powershell). For management
of Microsoft's Active Directory, you should import this module into
PowerShell.
Windows Directory Services API Layers
图片来自 Active Directory, 5th Edition:
在阅读 Active Directory 时,我遇到了 System.DirectoryServices.ActiveDirectory
和 Microsoft.ActiveDirectory.Management
。
System.DirectoryServices.ActiveDirectory
和Microsoft.ActiveDirectory.Management
有什么区别?
正如评论中 @Mathias R. Jessen
所暗示的那样:
System.DirectoryServices.ActiveDirectory Namespace:
The System.DirectoryServices.ActiveDirectory namespace provides a high level abstraction object model that builds around Microsoft Active Directory services tasks. The Active Directory service concepts such as forest, domain, site, subnet, partition, and schema are part of the object model.
The System.DirectoryServices.ActiveDirectory namespace is used to automate Active Directory management tasks. System.DirectoryServices.ActiveDirectory is not used to access data that resides within Active Directory or any other directory service. The System.DirectoryServices namespace should be used for this purpose.
The System.DirectoryServices.ActiveDirectory namespace is intended for use by application developers who are familiar with .NET Framework programming using Visual Basic .NET or C#.
Microsoft.ActiveDirectory.Management:
It is the Active Directory Module for Windows PowerShell. This is installed when you'll install
Remote Server Administrations Tools
or a subset of this feature (RemoteServerAdministrationTools-Roles-AD-Powershell). For management of Microsoft's Active Directory, you should import this module into PowerShell.
Windows Directory Services API Layers
图片来自 Active Directory, 5th Edition: