Difference between revisions of "Script Extracts and Examples (PowerCLI)"

Jump to navigation Jump to search
→‎Getting Started: Added "Certificates"
(→‎ESX: Added "Daily ESX Up/Down Check")
(→‎Getting Started: Added "Certificates")
Line 104: Line 104:
Or on a Win7 or Win2k8 (64bit) machine you might have something like...
Or on a Win7 or Win2k8 (64bit) machine you might have something like...
* <code> Powershell -PSConsoleFile "C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" "& C:\Scripts\ESX-probe.ps1" </code>
* <code> Powershell -PSConsoleFile "C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" "& C:\Scripts\ESX-probe.ps1" </code>
=== Certificates ===
A regular irritation is the certificate warnings that pop-up whenever you connect to a Virtual Centre.  To completely fix you need update the default, out of the box, self-signed certificates that are created during the install with proper certs that can be tracked back to a fully trusted root (see http://www.vmware.com/pdf/vi_vcserver_certificates.pdf for further info).
To install a VC's certificate on your client machine (or any machine you want to run PowerCLI from and avoid the warnings)...
# Map a drive, or do whatever so you can access the VC's cert from the client machine
#* Default location on Win2k3: <code>C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\SSL\rui.crt</code>
#* Default location on Win2k8: <code>C:\ProgramData\VMware\VMware VirtualCenter\SSL\rui.crt</code>
# On the client machine, start the Certificate Manager (run <code> certmgr.msc </code>)
# Right-click over '''Trusted Root Certificate Authorities''', and click '''All Tasks > Import...'''
# Use the wizard to add the certificate
# Once added, go to the certificate's '''Properties''' and put your VC's hostname in the '''Friendly Name''' field


== Useful CmdLets etc ==
== Useful CmdLets etc ==

Navigation menu