A collection of 8 posts
How to run ESXCLI commands in PowerShell using the PowerCLI Get-EsxCli cmdlet
If you’re a vSphere admin, you’ll be very familiar with the esxcli command. But have you ever wondered how to run esxcli commands from PowerCLI? Maybe you don’t want to enable SSH on your hosts, or perhaps you need to run an esxcli command in a PowerShell script.
Add Hard Disks to VMs Asynchronously with PowerCLI
At the time of writing the
New-HardDisk PowerCLI CmdLet does not yet have a
-RunAsync parameter. I found this out when trying to create a new 300 GiB eagerly zeroed disk on multiple VMs in one go. I soon realised that I was going to be sat there for a long time as each new disk was being formatted one at a time.
Managing vSphere Global Permissions with PowerShell
It appears that working with vSphere global permissions in PowerCLI is not yet possible. The VIPerms PowerShell module combines the add/remove examples from William’s post with a new function to list all global permissions. In this post I will demonstrate how to install and use this module.
Get ESXi Host CDP Info With PowerCLI
I recently had to provide our networking team with a list of ESXi hosts and which switchports each of their physical NICs were connected to. Like many other environments, we are primarily a Cisco house and therefore I was able to get this data by querying the Cisco Discovery Protocol (CDP) information via PowerCLI. Here is how I went about it.
PowerShell Tips: Script Optimization
Introduction A colleague of mine recently asked for some help with a script he was writing. We use vSphere tags in order to determine which backup schedule a given VM is in and he wanted to find all VMs which were not assigned a tag in the category backup-service-level, and therefore were not being backed up. His actual query was regarding filtering out certain VMs which will never be given a backup tag.