Share via


IVMVirtualServer::Security property

The IVMSecurity object associated with Virtual Server.

This property is read/write.

Syntax

HRESULT put_Security(
  [in]  IVMSecurity *security
);

HRESULT get_Security(
  [out] IVMSecurity **security
);

VB
VMVirtualServer.Security( _
  ByRef security, _
  ByVal security _
)

Property value

Contains a VMSecurity object which represents the security attributes of Virtual Server.

This property value is read/write.

Error codes

Name Meaning
S_OK
The operation was successful.
E_POINTER
The security parameter is NULL.
E_OUTOFMEMORY
Could not allocate memory for the security descriptor.
E_ACCESSDENIED
The client has insufficient access rights to modify the security attributes.
E_FAIL
The security attributes could not be applied. This may occur if the application data folders cannot be found.
DISP_E_EXCEPTION
An unexpected error has occurred.

Examples

The following example displays property values of the VMSecurity object associated with the VMVirtualServer object.

Set objVS = CreateObject("VirtualServer.Application")
Wscript.Echo "Name: " & objVS.Name

Set objSec = objVS.Security
Wscript.Echo "Security principle: "
Wscript.Echo "    Owner Name: " & objSec.OwnerName
Wscript.Echo "    Owner SID: " & objSec.OwnerSID
Wscript.Echo "    Group Name: " & objSec.GroupName
Wscript.Echo "    Group SID: " & objSec.GroupSID

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

See also

IVMVirtualServer