IDomainStations.RemoveByName

Syntax

RemoveByName(Name: String): Boolean;

Parameters

Name - a name of the workstation that needs removing.

Description

The RemoveByName method removes the specified station from the collection. Returns True if the remove operation was successful.

Example

Executing the example requires a form, a button named Button1 on this form.

Sub Button1OnClick(Sender: Object; Args: IEventArgs);

Var

MB: IMetabase;

m_User: IMetabaseUser;

Sec: IMetabaseSecurity;

DS: IDomainStations;

Begin

MB := MetabaseClass.Active;

Sec := MB.Security;

m_User := Sec.ResolveName("ADMIN") As IMetabaseUser;

DS := m_User.StationIPs;

DS.RemoveByName("10.0.2.158");

Sec.Apply;

End Sub Button1OnClick;

Pressing the button, for the ADMIN user, will remove the 10.0.2.158 IP-address from the collection of IP-addresses that give this user an access.

See also:

IDomainStations