Lumious
asked on
VMware vSphere - PowerCLI Script - Export List of VM Creation Date
Hi,
I'm trying to find a PowerCLI script that I can run on my vCenter Environment to get a list of all the VM's and when their creation date was.
I'm not that good at scripting so if someone could provide the code and explain what I would have to input to get this done that would be great.
Thanks
I'm trying to find a PowerCLI script that I can run on my vCenter Environment to get a list of all the VM's and when their creation date was.
I'm not that good at scripting so if someone could provide the code and explain what I would have to input to get this done that would be great.
Thanks
ASKER
Hi,
Abhilash Hb:
- When I try to run the first script they presented, it doesn't do anything in my PowerCLI connection to vCenter 5.1. I even try to put the script in a Test.ps1 file and run that file from PowerCLI but it doesn't do anything from what I see. When trying to run the first script they presented, I copied and pasted the whole thing into the PowerCLI.
Please let me know if I'm running this incorrectly.
Thanks
Abhilash Hb:
- When I try to run the first script they presented, it doesn't do anything in my PowerCLI connection to vCenter 5.1. I even try to put the script in a Test.ps1 file and run that file from PowerCLI but it doesn't do anything from what I see. When trying to run the first script they presented, I copied and pasted the whole thing into the PowerCLI.
Please let me know if I'm running this incorrectly.
Thanks
First you will have to load the functions. That's where the tasks the scripts do are defined.
ASKER
Hi,
I'm not sure if I'm running it correctly. Please see attached document I created for what I actually do and let me know when you can if I'm doing it correctly and if I should continue.
Thanks
Instructions.docx
I'm not sure if I'm running it correctly. Please see attached document I created for what I actually do and let me know when you can if I'm doing it correctly and if I should continue.
Thanks
Instructions.docx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
Your instructions worked! See attached:
So I ran this on One VM, what if I need to run this on multiple VM's? I dont want to have to type out each VM Name individually. Is there a way to make it so that it runs againsts All VMs in the environment and then exports the results to an excel sheet?
Thanks
1-14-2014-1-35-20-PM.jpg
Your instructions worked! See attached:
So I ran this on One VM, what if I need to run this on multiple VM's? I dont want to have to type out each VM Name individually. Is there a way to make it so that it runs againsts All VMs in the environment and then exports the results to an excel sheet?
Thanks
1-14-2014-1-35-20-PM.jpg
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
That worked! See attached:
I believe you replied on the other question I posted as well:
https://www.experts-exchange.com/questions/28337760/VMware-vSphere-PowerCLI-Script-Export-List-of-VM-Name-and-Last-Logon.html?anchor=a39778384
Please let me know just like this one, what I would have to replace as it wasn't that clear and I'm not a scripter.
Thanks
1-14-2014-1-57-59-PM.jpg
That worked! See attached:
I believe you replied on the other question I posted as well:
https://www.experts-exchange.com/questions/28337760/VMware-vSphere-PowerCLI-Script-Export-List-of-VM-Name-and-Last-Logon.html?anchor=a39778384
Please let me know just like this one, what I would have to replace as it wasn't that clear and I'm not a scripter.
Thanks
1-14-2014-1-57-59-PM.jpg
Nice! Glad to know it worked.
http://psvmware.wordpress.com/2012/11/27/when-was-vm-created-how-vm-was-created-and-who-has-created-this-vm/#more-726
There is a lot of explaination too with the scripts.