Sample script to modify vApp (Network, Firewall Rules, Start/Stop Order,...
Hi allI would like to share a script I developed the last few days. What the script does:- Add an internal network called "Internal" with NAT/Firewall to a vApp- Add Firewall rules (f.e. RDP)- Set the...
View ArticlevCloud Director Storage Profiles
Hi all I'm trying to put together a script to setup new Organisation and Virtual Datacentres in our vCloud 5.1 environment. The problem I've come up against is that I can't specific what storage...
View ArticleHow to change Storage Profile of VM in vAppTemplate?
Hi everyone, I've got a project in front of me to migrate existing VMs from an existing storage profile or the * profile to a newly created storage profile. I've determined how to get this done for...
View ArticleAdding a vApp to Catalog in vCD with PowerCLI
I would like add a vApp to a Catalog via PowerCLI. I can't see any methods under the extensiondata of the vApp that allow for this. Then I thought maybe I need to look from the Catalog side and could...
View ArticlePowerShell Script to move VM's between vCloud vApps
Hi, I am looking to build a powershell script which will allow me to move/migrate the VM's from vApp in a Org vDC to another vApp in another Org vDC in the same organization. I was Import-CIVApp...
View ArticleExample for configuring VM's "guest properties" (i.e. OVF settings)
Following is an example for configuring a VM's "guest properties" (in vSphere this is called "OVF settings/environment") using PowerCLI (or API).Note that this script was designed to run as an "org...
View ArticleGet-Task Error
Hi, I get the following error running get-task. I seems to display the first 3000 odd tasks but then errors: PS C:\> get-taskjobDelete Success 100 11:18:48 AM...
View ArticlePowerCLI/API for update storage profile in vDC
Hi,I found how to add or remove storage profile via vcloud API (VMware vCloud Director Documentation Center), but does anyone know how to do update (change size or disable) storage profile via API or...
View ArticleStart-Job with PowerCLI not working
This script never gets past the first write-host line in the start-job... # Do work$csv = Import-Csv tmpbuild.csv foreach ($item in $csv) { Start-Job -RunAs32 -ScriptBlock { # Add...
View ArticleUsing Connect-CIServer in a Start-Job
Has anyone been able to complete something like this? This works perfectly in a plain PoSh window but running in a Start-Job it never gets past the connect-ciserver. The job shows running and...
View ArticleImport and Export of vApp
Hi All, Is it possible to export vApp using PowerCLI? We have DR requirement which stats - All vApp created in DC-A should be available in DC-B.As long as place holder vApp's are available we always...
View ArticlevCloud Director sVmotion over Powercli
I've created a Script to move VM's over the vCloud Director API to an other Datastore in the same PvDC. (Datastore with the lowest UsedSpace) Here the most important parts:$civm = get-civm...
View ArticlevCD Powercli question....digging through API
Does anyone know how to extract the DateCreated for vApps and VMs via PowerCLI? The dates are readily available in the DB in dbo.vms, but i can't seem to dig it out via PowerCLI. I've found some...
View ArticlevApp; Add custom Guest Properties failes
Hi All,I tried to add some custom Guest Properties to a vApp which is already deployed according to this blog entry:https://communities.vmware.com/thread/442664 My current script looks like this:...
View ArticleGet-Civapptemplate vmtoolsversion
hello! Is it possible to obtain the version of installed VMTools in a vCloud vApp template?
View ArticleSample Script: Creating an Empty vApp with vCloud PowerCLI
Hi Everyone, The New-CIVApp cmdlet does not allow us to create empty vApps (which can be useful when templating out network configurations, for example). This shortcoming can be overcome by calling the...
View ArticleWorking with vCloud Metadata in PowerCLI
Based on Jake Robinson's post at GeekAfterFive - Infrastructure as Code, it seems the sample scripts in Alan Renouf's March 30, 2012 post to the VMware PowerCLI Blog, Working with vCloud Metadata in...
View ArticleAny way to eject all media?
Hi, I am trying to eject the media of all vm's in an org but I am having trouble. Is there an easy way to do this? As an example with just one vm. PowerCLI C:\Program Files...
View ArticleDuplicate storage profiles on vCloud
After upgrading the vCloud from 5.1.2 to 5.5 we are unable to create vapp and capture to catlogDuplicate storage profiles on vCloud – i.e, Unable to create new vApp or capture to catlog.Scope of the...
View ArticleIssues with vCloud Cmdlets when connecting to a CIServer using SessionID
I'm working on a PowerCLI script that deploys vCloud vApps to multiple OvDCs. The script works great when it's serial, but I have been running into issues when trying to get the deployments to run in...
View Article