[vbox-dev] PowerShell with the COM API and enums usage

Nikolay Igotti igotti at gmail.com
Thu Aug 11 00:18:56 PDT 2011

  Hi Oliver,

 Have you considered using search engines? For example
is the first hit on Google. For us typelib prefix is likely


2011/8/10 Olivier Cochard-Labbé <olivier at cochard.me>:
> Hi all,
> I'm looking for using the VirtualBox COM API enums type with PowerShell.
> As example, I want to add a SATA controller to a virtual machine
> (object is called "$vm" in my example).
> I'm using this line:
> $vm_obj_storage_ctrl = $vm_obj.addStorageController("SATA Controller",2)
> But referring to the COM API Manual, I can use the enums type
> "StorageBus" in place of my hard-coder "2".
> How to use this enums type in PowerShell ?
> I would like to replace my old line by a new one like this:
> $vm_storage_ctrl = $vm.addStorageController("SATA Controller",StorageBus::SATA)
> Thanks,
> Olivier
> _______________________________________________
> vbox-dev mailing list
> vbox-dev at virtualbox.org
> http://vbox.innotek.de/mailman/listinfo/vbox-dev

More information about the vbox-dev mailing list