I work at a large healthcare company that is upward of 86% virtualized now, however precious few individuals are very PowerCLI savvy. Several are becoming more familiar with the output / results of PowerCLI scripts and are looking to leverage them, however that could spread to ~20 different engineers with greatly varying degrees of technical knowledge and I'm looking for a way to simplify execution for them. Having simply emailed them scripts before, it seems impossible to guarantee that everyone has a correctly configured environment for execution (PS 2.0, PowerCLI 5, etc.), hence feedback to managers that "The script doesn't work". Very fun conversations come out of those...
I thought of three different approaches to this issue and would appreciate your thought in vetting them:
Any thoughts on how to tackle this would be greatly appreciated. I've done some searching around but never ran across a solution to this problem.
Definitely some tough issues there and great that everyone's working on using PowerCLI. I can try to address some of these things based on experience and tools I'm aware of. I'm currently working on a similar problem with a growing script repository for a very large virtual environment and team.
1. We have 2 servers that we use to run PowerCLI/PowerShell scripts. Servers are used for running scheduled tasks and allowing admins to connect when running scripts for changes. These servers are lightweight and usually only have PowerShell, PowerCLI, and PowerGUI installed. My fellow main scripter and I are currently working on making most of our scripts write restricted by implementing some user interaction where possible to minimize changes. We also copy change related scripts into a specific directory so that the originals do not need to be touched.
2. I think this could be addressed with the setup above to some degree but it would depend on where you want the scripts to be run from. I know that Quest's PowerGUI product has a MobileShell that can help with this as well. http://www.quest.com/PowerGUIPro/mobileshell.aspx
While it does not help you currently, PowerShell 3 should provide some functionality for you with it's PowerShell Web Access in the upcoming Windows Server release. http://blog.powershell.no/2011/09/14/windows-powershell-web-access/
3. This is an interesting idea. The code on that itself could be harrowing. The list could be done dynamically with PowerShell of course but you'd have to have a predefined naming/directory structure. I have been working on the following structure in our environment and it has worked pretty well so far. We may be scaling down the subdirectories and do that separation based on filename but that is TBD on our side. Our biggest push is to have a specific directory on a shared drive that admins can access their own copies of the scripts they need without affecting the originals. It's another option for you. Here's the rightup on the structure we're trying and I'm happy to answer further questions. http://www.vtesseract.com/post/7368244489/managing-powercli-scripts-file-structure
I'm sure you'll get some further feedback from others and we'll both learn some other techniques. Good community here. Hope this helps.
Both offer remote access to a controlled interface where users can start scripts.
A thought outside your 3 options, why don't you try to use PowerShell Remoting.
You could set up the scripts on your central server and allow your engineers to use remote sessions to start these scripts.
With the proper access right on the central server, the engineers would be able to start the script but not change them.