Hi. I'm completely new the this and don't intend to study it in-depth, I just need to get the job done for a small task at work, and before I go on nuts researching and learning, I'd like to confirm that:
A) a script or guide for what I want to do doesn't already exist
and if not B) I'm on the right track
---
So we have 4 ESXi servers hosting like 8 machines each. We often have to re-allocate machines to other ESXi servers based on resource requirements for a task, etc. This makes it hard to keep track of where each virtual machine is, and at present, the only way we have to find a desired machine is to go through vSphere Client for each ESX server until we find what we want.
So what we want is to integrate a C#/ASP.NET page into our internal web service that will display the virtual machine names from each ESXi server.
My thinking is, a Refresh button on the C#/ASP.NET page that will execute four scripts (one for each server). Each script contacts the respective ESXi server, grabs the list of virtual machines attached to that ESXi server, and outputs a text file or HTML file of just a list of those names. The C#/ASP.NET page will then pull the names from those four text/HTML files, and format them nicely onto the web page. So that when we want to find out where a virtual machine is, we just go to this page, hit Refresh, and bam, you get a nicely formatted table saying where what is.
I've taken a look at several sample scripts and whatnot and I have a general idea with what's going on, but my main questions are:
1) How would you make a Refresh button on a C#/ASP.NET page to execute four PowerCLI scripts? What kind of code would you need to add to make that happen from C# (using Visual Studio 2010)?
2) Is it necessary to make four scripts, or can I just have one that you can supply with four different parameters (in this case, the ESXi IP addresses)?
3) Do the script(s) go on the ESXi server or...how does that work?
That's all for now I guess.
Thanks.
(I realize I'm going to get a reply or two that say RTFM and whatnot, and that's entirely what I intend to do, if there isn't some kind of very simple pre-made implementation that someone can just point me in the direction of first. I've already been reading guides for hours here and still don't even understand the basics, and don't really care to, I just need this one stupid thing to work. If that's what it comes to though, I will. Just checking first!)