HI All,
how to get the VC inventory ?
share the scripts
Need the following formats
Volume Name LUN Name Storage Controller Cluster Name Virtual Machine Name
Thansk & Regards,
BSR Krishna
You save the attached file as .ps1 file.
From the PowerCLI prompt, you connect to vCenter with Connect-VIServer.
Then you execute the script with
.\the-script.ps1
provided you're position in the folder where the .ps1 was saved.
You can find a good intro on using PowerCLI in this Introduction to using VMware vSphere PowerCLI post.
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Please try not to post the same question in multiple forums, duplicated thread from -
Can you provide a little more details on the "type" of script? Are you working in a Windows/Unix/Linux environment? What language do you plan on using?
=========================================================================
William Lam
VMware vExpert 2009,2010
VMware scripts and resources at:
Getting Started with the vMA (tips/tricks)
Getting Started with the vSphere SDK for Perl
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".
HI William Lam,
i am using vi-toolkit - windows powershell .
Thanks & Regards,
BSR Krishna
Moved to the PowerCLI forum. Your other thread has been deleted.
Dave
VMware Communities User Moderator
Now available - vSphere Quick Start Guide
Do you have a system or PCI card working with VMDirectPath? Submit your specs to the Unofficial VMDirectPath HCL.
Thanks a lot
Did you already check the scripts in ?
And I'm not sure what you mean with the 'Virtual Machine Name".
LUNs, controllers... are connected to ESX(i) servers.
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
HI Lucd ,
Thanks for storage script. i have 50 data stores . i want know each data store how many VM'sare stored at a time .
Thanks & Regards,
BSR Krishna
What do you mean with "Volume Name" ? Is that the Datastore name ?
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
S . DATA STORE NAME
Thanks & Regards,
BSR Krishna
Hi Lucd ,
i want output as
Volume NAME/ DATASTORENAME LUN NAME ( LUN PATH) CONTROLLER CLUSTER NAME VM's Name
i am using Netapp Ontap 7.3 storage Let me know any confusions
Thanks & Regards,
BSR Krishna
The script became a bit more complex then I originally thought it would be.
Give the attached script a try.
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi Lucd,
Thanks a lot .. let me know how to exceute this script... i am using windows powershell
Thanks & Regards,
BSR Krishna
You save the attached file as .ps1 file.
From the PowerCLI prompt, you connect to vCenter with Connect-VIServer.
Then you execute the script with
.\the-script.ps1
provided you're position in the folder where the .ps1 was saved.
You can find a good intro on using PowerCLI in this Introduction to using VMware vSphere PowerCLI post.
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
HI Lucd ,
Thanks a lot for inventory script ..
one more query . I want know daily how many vms are rebooting and how many are not rebooting( Because in my infrastructure daily basis windows patches will be install. after installation VM s will reboot .. )...
Is there any way we can find guest os patches ..
i) when the patch was installed
ii) Last time vm reboot
iii) Health monitor of VM ..
Thanks & Regards,
BSR Krishna
1) To know when patches are installed you could query the eventlog of the guest itself.
With the Get-Event cmdlet and by using the Invoke-VMScript cmdlet this should not be too diffcult.
2) For the last reboot have a look at the When was the last time that VM was powered on? post on the PowerCLI blog.
3) Not sure what you mean with 'health monitor'. What exactly do you want to monitor ?
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference