PowerCli – Ensure a non-root user account exists for local admin access

In this blog, we will a new user across all our esx hosts via powercli

#####################################################################
# Ensure a non-root user account exists for local admin access#
# manage users on an ESXi host
# Not Tested 
# V1.0
######################################################################
  
#Variables
$vCenter = "sfo-m01-vc02.ash.local"
$Cluster = "Production-vSAN"
 
$esxuserName = "myadmin"
$esxpassword = "G20Summ1T"
  
### Start of Script
# Load VMware Cmdlet and connect to vCenter
Add-PSSnapin vmware.vimautomation.core
connect-viserver -server $vCenter
$VMHost = Get-Cluster -Name $Cluster | Get-VMhost



(Visited 103 times, 1 visits today)

Leave a Reply