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....
LVL 1
usmansultanAsked:
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.

coolsport00Commented:
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).

~coolsport00
0
coolsport00Commented:
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.

~coolsport00
0
coolsport00Commented:
What is the version of your vCenter Server/ESX or ESXi hosts?

~coolsport00
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy 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

http://www.veeam.com/vmware-esx-reporter-free.html

(it produces nice pictures for Management!)
0
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 10.22.36.36 –Protocol https –User admin –Password mypass
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
to check you've connected and all is working type

Get-VM

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

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
http://www.vmware.com/support/developer/viperltoolkit/

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

Hope this can help

Jail
0
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?
0
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 http://powergui.org/index.jspa

http://www.virtu-al.net/featured-scripts/vmware-powerpack/

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!
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Do you have a vCenter Management Server?
0
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?
0
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.
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
But, I can recommend Veeam Reporter (free download)

http://www.veeam.com/vmware-esx-reporter-free.html

which may help you with your Inventory.
0

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
younghvCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
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
VMware

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.