DomainController.SeizeRoleOwnership(ActiveDirectoryRole) 方法

定义

导致此域控制器获得指定角色的所有权。Causes this domain controller to take ownership of the specified role.

public:
 void SeizeRoleOwnership(System::DirectoryServices::ActiveDirectory::ActiveDirectoryRole role);
public void SeizeRoleOwnership (System.DirectoryServices.ActiveDirectory.ActiveDirectoryRole role);
member this.SeizeRoleOwnership : System.DirectoryServices.ActiveDirectory.ActiveDirectoryRole -> unit
Public Sub SeizeRoleOwnership (role As ActiveDirectoryRole)

参数

role
ActiveDirectoryRole

ActiveDirectoryRole 成员之一,它指定域控制器应获得其所有权的角色。One of the ActiveDirectoryRole members that specifies which role the domain controller should take ownership of.

例外

role 无效。role is not valid.

当前对象已被释放。The current object has been disposed.

注解

此方法是一种破坏性操作,因为它会导致在当前拥有角色的服务器的合作中采用角色。This method is a destructive operation because it causes the role to be taken without the cooperation of the server that currently holds the role. DomainController.TransferRoleOwnership应尽可能使用方法。The DomainController.TransferRoleOwnership method should be used instead whenever possible.

适用于

另请参阅