Custom PowerShell Profile to Connect to One of Many vCenter Servers
One of my customers has many physical datacenters, each with its own vCenter server. The servers are all connected via Linked Mode, which works fine in the GUI, but at the CLI I don't usually want to connect to every one of them. Fortunately, connect-viserver doesn't do so unless you use the -AllLinked switch, so that's fine. Unfortunately, I'm left in a position where I need to connect my PowerCLI session to any one of many vCenter servers, and I don't necessarily like typing that much or remembering that many server names. Fortunately, I can address both of those points in one fell swoop, through PowerShell Profiles . When you launch PowerShell, it simply applies the appropriate PowerShell Profile (aka. a script that you can use to customize your work environment) to that session and you're good to go. So, I put together a customized PowerShell Profile for myself that presents me with a "Connect to vCenter" option and a little text driven men