Skip to main content

VCD | How to find an Organization name of VM(s)

One of my ex-colleague requested to share the script so, I thought to create a post and then share it. It is an awesome place to keep an information and can be accessible from anywhere, anytime.

Finding Organization name of a VM in vCD is very easy in vCD GUI but when you have demand to extract a report against each and every VM or search a VM's Org quickly then vCD GUI is not helpful and can be a time taking process.

I am writing here a very simple and short script to search any VM's Org name in vCD. Here you go.....

#Start here

$vCD = Read-host "Enter vCD URL starting with https  " #It will connect the vCD
$VM = Read-host "Enter the VM name, you want to search "

Get-CIVM -Name $VM  | Select Org, OrgvDC #it will give you exact Org and OrgvDC name of any VM that you have given to it.

#End here


Above script is for one VM. If you need a script which can extract a csv\.xlsx file for all the VMs then feel free to let me know, I will do that for you guys.

Above script is too basic script but if anyone wants an intelligent search or action engine then you need to request for that because I can and will customize it as per your requirement. URL(
https://vcloudnotes.blogspot.com/2019/11/update-powershell.html) is an example for search engine I have created for vCenter Server and below image is an example of Search engine for vCD.

Feel free to contact me anytime by commenting on my any blog.





Thank you,
Team vCloudNotes

Comments

Popular posts from this blog

Network Migration | VLAN to VXLAN

NSX-T | Getting Started with PowerCLI

NSX-T | Security

Automate Power on Operations using PS