Tag: Powercli
Script to take hosts out of maintenance mode in vCenter & vROPs
On occasion, I’ve noticed that people can sometimes forget to take a host out of maintenance mode in vROPs after completing some work in vCenter. I have created a short PowerCLI script that will pull a list of hosts from a specified CSV file, connect to your vCenter & vROPs then exit the listed hosts
PowerCLI – Delete Port Groups using a CSV list
During a recent NSX-T Upgrade project, I was required to migrate VMs from traditional VLAN backed distributed port groups onto NSX-T port groups. This left a large number of port groups that needed to be removed. Fortunately, I was able to export a CSV list and run this quick function to import the CSV list
GitHub uploads
Just a quick post to say that I’ve started uploading some of the scripts I’ve been using to my GitHub Repository. More will come over the next few weeks Support PowerCLI Menu vSphere Replication Failover Menu
Deploy a new VM with PowerCLI
A PowerCLI function that prompts you to select from your Clusters, Hosts, Datastores & Networks. It will then deploy a VM according to the sizes you input
PowerCLI Code Capture
For those of us still relatively new to PowerCLI and working towards automating as many robotic tasks as possible, there is a handy tool in vCenter called Code Capture. This has been available since vCenter Server Appliance (VCSA) 6.7U2 in the developer centre so its not exactly new but a lot of people don’t realise
Connect-VIServer “The SSL Connection Could Not be established”
A super quick post about an issue you’re only really likely to see the first time you use PowerCLI on a system. If youre vCenter is using a certificate that’s not trusted by your device you will see the error: “The SSL Connection could not be established, see inner exception” Fortunately, it’s a quick fix
List my hosts BIOS version
Today i was asked to confirm the BIOS version of all the hosts in a customers estates to allow them to plan an upgrade. Initially they had planned to check each iLO individually which would have been extremely time consuming, fortunately, there is a quick PowerCLI method: get-vmhost | select name, @{N=” Model”;E={($_ | get-view).hardware.systeminfo.Model}},
ESXi6.5 Security Hardening Guide
ESXi6.5 Security Hardening Guide OK, take a seat… this is going to be a long script! I have put together a menu system that will report on all ESXi6.5 Security Hardening Guide settings that are NOT DEFAULT, if you have made additional changes to your configuration you should go through the entire SHG to ensure
Get Cluster Provisioned Resources
The script below pulls a list of your clusters with their CPU & Memory Total Capacity as well as how much has been provisioned. It then displays the ratio to physical to virtual to help you maintain your over-commitment ratios. Its setup as a function so you can choose whether to display text on screen