Virtual Server Security Script

Here is a handy script I created recently to add a user to the Virtual Server users automatically:

Dim ace

set objVs = wscript.CreateObject(“VirtualServer.Application”)
Set objSecurity = WScript.CreateObject(“VirtualServer.VMSecurity”)

set objSecurity = ObjVs.Security

Set ace = objSecurity.AddEntry(“DOMAINUsername”,vmAccessRights_Allowed)
    ace.WriteAccess = True
    ace.ReadAccess = True
    ace.ExecuteAccess = True
    ace.DeleteAccess = True
    ace.ReadPermissions = True
    ace.ChangePermissions = True

ObjVs.Security = objSecurity

This will add the user ‘DOMAINUsername’ with full access.