Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block ilandcloud

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View metadata-csv-export.ps1
# Set up an array for the final report
$report = @()
# Get all vApp from the Org
$vApps = Get-CIVApp
foreach ($vApp in $vApps) {
# Get the metadata key/value pairs for all vApps
$Metadatas = Get-CIMetaData -CIObject $vApp
View update-metadata.ps1
Connect-CIServer -server ‘ ‘username’ -Password ‘password’ -Org ‘YourOrg
# Read existing CSV file with metadata requirements
$file = 'c:\temp\metadata.csv'
# Read the CSV file into an array
$requirements = Import-Csv -Path $file
# Trundle through the array, getting the requirements per vApp
foreach ($requirement in $requirements){
$vApp = $requirement.vApp
View New-CIMetaData.ps1
Function New-CIMetaData {
Creates a Metadata Key/Value pair.
Creates a custom Metadata Key/Value pair on a specified vCloud object
The name of the Metadata to be applied.
View automatic-shutdown.ps1
# Connect to iland cloud
Connect-CIServer -server ‘ ‘username’ -Password ‘password’ -Org ‘YourOrg
# Get the current time, and specifically hour in 24 hour format
$time = Get-Date -DisplayHint Time
$today = Get-Date -UFormat %a
$hour = $time.Hour
# Get a list of all the vApps in the Org
$vApps = Get-CIVApp
ilandcloud / Get-CIMetadata.ps1
Last active Oct 13, 2016
This is a custom-developed cmdlet from This can be referenced as part of your Powershell profile, or just included at the top of your script.
View Get-CIMetadata.ps1
Function Get-CIMetaData {
Retrieves all Metadata Key/Value pairs.
Retrieves all custom Metadata Key/Value pairs on a specified vCloud object
The object on which to retrieve the Metadata.
ilandcloud / get-CIVapp.ps1
Created Oct 12, 2016
The ‘AutoOnOff’ key on its own can be used for a really simple script that checks for the existence of the key and the value being set to ‘Yes’, and will then shut it down.
View get-CIVapp.ps1
$vApps = Get-CIVApp
$Metadatas = Get-CIMetaData -CIObject $vApps
foreach ($Metadata in $Metadatas) {
$vApp = $Metadata.CIObject
$Key = $Metadata.Key
$Value = $Metadata.Value
if ($Value -like 'Yes') {write-host 'Stopping vApp....',$vApp}
if ($Value -like 'Yes') {Stop-CIVApp -VApp $vApp -Confirm:$false}
You can’t perform that action at this time.