VMware Cloud Community
RajuVCP
Hot Shot
Hot Shot

Need a Script to check if below given 3 settings are configured on all VC Host.

HI All,

Just made the below given changes in my vmware infrastructure on all host. But i could'nt able to makeout the changes has been applied on how many host and how many got failed.

is there a script which should run on all host and see if below given settings are configured or not in excel or csv output.

1. Increase the memory cache size settings in the /etc/likewise/lsassd.conf file from 10K to 10MB

2. Set-shell-interactive-timeout = 900

3. Set-shell-timeout = 900

Raju Gunnal VCP 4, VCP 5, VTSP 4, VTSP 5, ITIL V3 http://www.techtosolution.com
0 Kudos
1 Reply
Sivaramsharmar
Enthusiast
Enthusiast

Hi Raju,

Please find below script which fulfills 2nd & 3rd data requirement.

$vcenter=@()

$vmhosts = get-vmhost

foreach($vmhost in $vmhosts){

$sto = $vmhost | Get-AdvancedSetting | where{$_.Name -eq "UserVars.ESXiShellTimeOut"}

$Isto = $vmhost | Get-AdvancedSetting | where{$_.Name -eq "UserVars.ESXiShellInteractiveTimeout"}

$vcd = "" | select ESXi,Shellto,IShellto

$vcd.Shellto = $sto.value

$vcd.IShellto = $Isto.value

$vcd.ESXi = $vmhost.name

$vcenter += $vcd

}

$vcenter | Export-Csv .\value.csv -NoTypeInformation

0 Kudos