From my previous post, I have a nice simple menu figured out and working and that was making my co-worker happy (Happy co-workers more likely to do favors so is a good thing). Our internal patch window for one of our VMware environments was coming up and my co-worker checked on the connected CD-Rom drives from the command line script I found for him so all the guest systems would vmotion properly. Watching over the shoulder I thought I could do a better job of that now.
Two goals.
- A menu to determine which of our environments to authenticate against (we have 5).
- Offer options to list or disconnect CD-Rom drives without exiting the script.
- Happy co-worker
... OK, that's three.
The menu I covered in my previous post with an improvement suggested by Jaykul in the comments.
To go with goal 2, I had a vague memory of 'do .. while'. A quick Get-Help about_ and I see about_while so Get-Help about_while gets me the nice little example I can use to wrap my code in.
