Share via


IVMAccessRightsCollection interface

The IVMAccessRightsCollection interface defines the collection of access control entries. An IVMAccessRightsCollection object is returned from the IVMSecurity::AccessRights property.

Members

The IVMAccessRightsCollection interface inherits from the IDispatch interface. IVMAccessRightsCollection also has these types of members:

Properties

The IVMAccessRightsCollection interface has these properties.

Property Access type Description
_NewEnum
Read-only
The collection enumerator for this collection.
Count
Read-only
The number of access control entries contained in this collection.
Item
Read-only
The IVMAccessRights object that corresponds to the given index in this collection.

Remarks

The IVMAccessRightsCollection is a representation of an IVMSecurity object's Discretionary Access Control List and is used to enumerate the individual IVMAccessRights objects representing the individual Access Control Entries in the DACL. These access rights apply to the Virtual Server object which contains the corresponding IVMSecurity object; not to any resources exposed by the guest operating system running inside a virtual machine.

Examples

The following example prints the access right properties of the access control entries from the security object protecting access to a specific virtual machine object.

Dim vsApp
Dim vsVirtualMachine
Dim vsSecurity
Dim vsAccessRightsCollection
Dim vsAccessRights

Set vsApp = WScript.CreateObject("VirtualServer.Application")
Set vsVirtualMachine = vsApp.FindVirtualMachine("Windows Server 2003")
Set vsSecurity = vsVirtualMachine.Security
Set vsAccessRightsCollection = vsSecurity.AccessRights

For Each vsAccessRights In vsAccessRightsCollection
    Wscript.Echo "Name: " & vsAccessRights.Name
    Wscript.Echo "Change permissions: " & vsAccessRights.ChangePermissions
    Wscript.Echo "Delete access: " & vsAccessRights.DeleteAccess
    Wscript.Echo "Execute access: " & vsAccessRights.ExecuteAccess
    Wscript.Echo "Flags: " & vsAccessRights.Flags
    Wscript.Echo "Read access: " & vsAccessRights.ReadAccess
    Wscript.Echo "Read permissions: " & vsAccessRights.ReadPermissions
    Wscript.Echo "SID: " & vsAccessRights.SID
    Wscript.Echo "Special access: " & vsAccessRights.SpecialAccess
    Wscript.Echo "Type: " & vsAccessRights.Type
    Wscript.Echo "Write access: " & vsAccessRights.WriteAccess
    Wscript.Echo
Next

Requirements

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