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

Loading

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 87 times, 1 visits today)

By C A Thomas

Chinchu A. Thomas is an Infrastructure Analyst specializing in Microsoft Azure, the Microsoft 365 suite, AWS, and Windows infrastructure management products.

Leave a Reply