Compartir a través de


IVMAccessRights::Sid property

The Sid property retrieves the SID string of the user or group.

This property is read/write.

Syntax

HRESULT put_Sid(
  [in]  BSTR sid
);

HRESULT get_Sid(
  [out] BSTR *sid
);

VB
VMAccessRights.Sid( _
  ByVal sid, _
  ByRef sid _
)

Property value

The SID string of the owner.

This property value is read/write.

Error codes

Name Meaning
S_OK
The operation was successful.
E_POINTER
The sid parameter is NULL.
E_INVALIDARG
The sid parameter is not valid or an empty string.
DISP_E_EXCEPTION
An unknown error has occurred. Other HRESULT error values may be returned as well.

Examples

The following example prints the Sid property of the access control entries from the security object protecting access to the COM interfaces and global settings.

Dim vsApp
Dim vsSecurity
Dim vsAccessRights
Dim arProperty

Set vsApp = WScript.CreateObject("VirtualServer.Application")
Set vsSecurity = vsApp.Security
Set vsAccessRights = vsSecurity.AccessRights

For Each arProperty In vsAccessRights
    Wscript.Echo "Name: " & arProperty.Name
    Wscript.Echo "SID: " & arProperty.SID
    Wscript.Echo
Next

Requirements

Download
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003
Header
VsComInterfaces.h

See also

IVMAccessRights