I am not super familiar with PowerShell but I am trying to write a script through a remote monitoring tool we use. I want to use this script to run a report of all systems in our environment that have a snapshot.
My script downloads the PowerCLI and attempts to install quietly (not sure why this won't work) I think its because VIX wants to be installed and its not %100 silent, you have to click okay to acknowledge this. I can always script the install of VIX first but I want to make this easier. One of the other issues I find is the downloading of the large 193MB file for PowerCLI 5.5
Is is possible to just extract the two cmdlets from the package to run in Windows PowerShell?
Connect-VIServer vCenterServerName
get-vm | get-snapshot | format-list
If so this would make my life much easier
I'm afraid you can't just install 2 PowerCLI cmdlets.
The PowerCLI PSSnapin is a collection of DLLs with interdependencies.
But you should be able to install PowerCLI silently together with VIX.
Have a look at solution 2 in this ITNinja article.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I'm afraid you can't just install 2 PowerCLI cmdlets.
The PowerCLI PSSnapin is a collection of DLLs with interdependencies.
But you should be able to install PowerCLI silently together with VIX.
Have a look at solution 2 in this ITNinja article.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Testing now, thanks!
That worked, I pulled the MSI's from the %Temp% and just used the /quiet thanks again!
I can't seem to script this install. It only works when a user is logged in. This is becoming quite frustrating. I wish I could just extract the two simple items I need. connect-viserver & get-vm get-snapshot
Which msiexec parameters did you use ?
Did you activate logging (the /l parameter) ? Any clues in the logs ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
So the VIX installs fine its the PowerCLI that doesnt run
msiexec /i "C:\VMware vSphere PowerCLI.msi" is the command I used
I even tried
msiexec /i "C:\VMware vSphere PowerCLI.msi" /qn /quiet
Can you try to add "/l*v c:\powercli.log" on the msiexec command ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
okay that worked haha!!
So it did install then ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference