Archive for category VMware

Moving VMs between vRA business groups and reservations in vCO

The below vCO script moves a VM to a new business group (provisioning group) and reservation in vRealize Automation.

The trick is that each reservation is mapped to one business group only and once you move a VM between business groups you also have to re-define reservations. Business groups are represented by provisioning groups in vRA. Reservations are changed by updating VM’s references to host-reservation and host-reservation-to-storage objects. Read the rest of this entry »

, , , ,

No Comments

Running PowerCLI scripts from Windows command line

    You can run PowerCLI scripts directly in the Windows command line. This is useful if you need to run a PowerCLI script in Windows Scheduler.

    PowerCLI must be installed on the Windows system.

    Just use the following systax:

    C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe -psconsolefile "C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" -outputformat Text -command ". \"C:\My Scripts\PowerCLI Script.ps1\" -arg1 X -arg2 Y"


No Comments

Site Recovery Manager configuration export with SRM API 5.0

During a recent implementation of VMware Site Recovery Manager 5.1.1 for one of my clients I faced a problem how I could make a text dump of current SRM settings mainly for a project documentation but also just in case the SRM environment had to be restored from scratch.

I did a short research on that and found Site Recovery Manager Developer’s Guide which presents SRM API 5. Read the rest of this entry »