Running Scripts on VMWARE

I have to run a script on VMWare server, i have the instructions, i just need bit more guidance on how to run it...The instructions that i have are;

1.       Copy the attached script to your vSphere (vCentre) server.
2.       Change the extension of the file from .txt to .ps1
3.       Open “vSphere PowerCLI”
4.       Connect to vsphere server.
5.       Change to directory with this script in it.
6.       Type ./inventory.ps1
7.       A file called inventory.csv is created (works for both Windows and Linux).
I  want to go step by step, now in the first point it says i have to run script on vsphere? we have 8 VMware servers, all of them running ESX 3.5, so what do i have to do in the first step....
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

What server it's refering to is just that - your vCenter Server server...whether that is a VM server or physical. So, you just need to copy the file to that server somewhere (I personally create a C:\Support folder to place tech files in).

The vSphere PowerCLI can be on your local workstation. I'm not a CLI guru by any means, but there is a command (reference in CLI User's Guide) on what to type to connect to your vCenter Server server. Once connected via CLI, just do a 'CD' (change directory) command to the directory you placed the .txt/.ps1 file and follow the rest of the steps.

What is the version of your vCenter Server/ESX or ESXi hosts?

Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
The Inventory PowerCLI script querys the VMware vSphere vCenter server which contains all the details about your ESX 3.5 servers and Virtual Machines and creates a nice CSV file.

Personally I prefer Veeam Reporter

download for free

(it produces nice pictures for Management!)
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
The first thing you need to do after launching vSphere PowerCLI is to get a connection to a vCenter Server system or ESX host. To get started, call the Connect-VIServer cmdlet and specify the IP address or DNS name of your vCenter Server system or ESX host, the protocol (http or https), user name, and password.

Connect-VIServer –Server –Protocol https –User admin –Password mypass
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
to check you've connected and all is working type


usmansultanAuthor Commented:
how can i found out which server is running VCenter, i have no documents to find out that information.....
usmansultanAuthor Commented:
and how can i open the console for the servers which are running ESX server? i cant RDP in to those servers......
usmansultanAuthor Commented:
I have downloaded and installed that tool, now how can i configure it to make it work?
Luciano PatrãoICT Senior Infraestructure  Engineer  Commented:

Without most of that information, is pointless to run that scripts.

You can get the information witch host hold a VM. You get information by running a power shell script. But again, you need to connect to a vCenter.

But also you can use the perl VMware Scripts

Using you can get lots of information. But also there is so many perl scritps to work and get many information.

Hope this can help

Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
You need to find your vCenter server, and also your ESX servers, you cannot RDP to ESX servers, but you can use ssh to connect to the console of them, if ssh has been enabled.

Do you use the vSphere vCenter Client GUI? You usually use it to connect to ESX hosts or vCenter server?
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
When you have found your vCenter and ESX servers, you can also run these

I would recommend and use the VMware Community PowerPack.

in combination with PowerGUI

This will give you all the information you need, (datastores, hba, LUNs) and has the ability to run your scripts on your VMs.

Let me know if you require help finding your servers!
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Do you have a vCenter Management Server?
usmansultanAuthor Commented:
We dont have a VCentre or Vsphere, because there are six ESX servers, all of them are running ESX 3.5, and those ESX i can see the machines attached to them, but log in to them?
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
In that case you cannot use the script. Because that script needs to be run on the vCenter server.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
But, I can recommend Veeam Reporter (free download)

which may help you with your Inventory.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.