Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 251495

Re: UserVars.ESXiShellTimeOut

$
0
0

$Shelltimeout = Get-VMHost | Select Name, @{N="settings";E={(Get-VMHostAdvancedConfiguration-vmhost $_ -name UserVars.ESXiShellTimeOut).values}}

 

$myItem.Shelltimeout = $Shelltimeout.settings

 

 

this doesnt seem to work. i keep getting blank in the csv file. On the Powershell connamd line, if i do a write-host $shelltimeout[0].settings, i get an output, but $Shelltimeout.settings is blank. i am using this within a foreach loop

 

foreach

($vmhin$vmhs)

{

 

$myItem="" | SelectVC , Host , Shelltimeout

 

$myItem.Host=$vmh.Name

 

$myItem.VC=$vc

 

$myItem.Version=$vmh.Version

 

 

Connect-VIServer$vmh.Name-Credential$rcred

 

 

$Shelltimeout= Get-VMHost | Select Name, @{N="settings";E={(Get-VMHostAdvancedConfiguration -vmhost $_ -name UserVars.ESXiShellTimeOut).values}}

 

 

$myItem.Shelltimeout = $Shellto.settings

 

 

 

Disconnect-VIServer-Server*-Confirm:$false

 

$HostData+=$myItem

}

}

 

 

 

how do i specify the arraynumber?

 

thanks in advance for you help!!


Viewing all articles
Browse latest Browse all 251495

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>