Hi All,
I have downloaded script located Automatically Securing Virtual Machines Using a vCenter Alarm (Scripts.zip)
I want to understand is there a way to automatically load the function defined the script.
every time i want to run this script, i have to load the function.
Thanks for your assistance in advance,
Preetam
There are a couple of ways to load such a function.
The easiest one is to place the function in one of the profile files, that way it is "known" when you start the PowerCLI session.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
There are a couple of ways to load such a function.
The easiest one is to place the function in one of the profile files, that way it is "known" when you start the PowerCLI session.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks Luc.
One more doubt, I want to ensure all VMware admins get Set-VMAdvancedConfiguration cmdlet to run, is it good idea to load $profile.AllUsersAllHosts with the functions. I'm also planning to include customized functions defined over here Working with VM Devices in PowerCLI | VMware PowerCLI Blog - VMware Blogs
That would be a good solution, but you still have to devise a mechanism to distribute that profile to all stations.
You could do that with a logon script, by a GPO or whatever procedure you use to distribute files to all the stations.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference