Thank you very much LucD. It appears the get-esxcli functionality has been deprecated? My script fails beginning here. I am getting errors from this point forward. Would have you have a suggestion to resolve this? Your assistance is appreciated.
Everything fails beginning with this line:
# List all user accounts on the Host -Host Local connection required-
Get-VMHost | Get-VMHostAccount
# List UserVars.ESXiShellInteractiveTimeOut for each host
Get-VMHost | Select Name, @{N="UserVars.ESXiShellInteractiveTimeOut";E={$_ | Get-AdvancedSetting -Name UserVars.ESXiShellInteractiveTimeOut | Select -ExpandProperty Values}}
# List UserVars.ESXiShellTimeOut for each host
Get-VMHost | Select Name, @{N="UserVars.ESXiShellTimeOut";E={$_ | Get-AdvancedSetting -Name UserVars.ESXiShellTimeOut | Select -ExpandProperty Values}}
# List Iscsi Initiator and CHAP Name if defined
#Get-VMHost | Get-VMHostHba | Where {$_.Type -eq "Iscsi"} | Select VMHost, Device, ChapType, @{N="CHAPName";E={$_.AuthenticationProperties.ChapName}}
#List the Software AcceptanceLevel for each host
Foreach ($VMHost in Get-VMHost ) {
$ESXCli = Get-EsxCli -VMHost $VMHost
$VMHost | Select Name, @{N="AcceptanceLevel";E={$ESXCli.software.acceptance.get()}}
}
# List only the vibs which are not at "VMwareCertified" acceptance level
Foreach ($VMHost in Get-VMHost ) {
$ESXCli = Get-EsxCli -VMHost $VMHost
$ESXCli.software.vib.list() | Where { $_.AcceptanceLevel -ne "VMwareCertified" }
}
# List the Software AcceptanceLevel for each host
Foreach ($VMHost in Get-VMHost ) {
$ESXCli = Get-EsxCli -VMHost $VMHost
$VMHost | Select Name, @{N="AcceptanceLevel";E={$ESXCli.software.acceptance.get()}}
}
# List only the vibs which are not at "VMwareCertified" or "VMwareAccepted" or "PartnerSupported" acceptance level
Foreach ($VMHost in Get-VMHost ) {
$ESXCli = Get-EsxCli -VMHost $VMHost
$ESXCli.software.vib.list() | Where { ($_.AcceptanceLevel -ne "VMwareCertified") -and ($_.AcceptanceLevel -ne "VMwareAccepted") -and ($_.AcceptanceLevel -ne "PartnerSupported") }
}
# List Net.DVFilterBindIpAddress for each host
Get-VMHost | Select Name, @{N="Net.DVFilterBindIpAddress";E={$_ | Get-VMHostAdvancedConfiguration Net.DVFilterBindIpAddress | Select -ExpandProperty Values}}
# Check the SHA1 has of the download with the following function
#Function Get-SHA1 {
#Param (
#$Filename
#)
#begin {
#[Reflection.Assembly]::LoadWithPartialName("System.Security") | out-null
#$sha1 = new-Object System.Security.Cryptography.SHA1Managed
#}
#Process {
#$file = [System.IO.File]::Open($filename, "open", "read")
#$filehash = $sha1.ComputeHash($file) | Foreach {
#write-host -NoNewLine $_.ToString("x2")
#}
#$file.Dispose()
#}
#}
#Get-SHA1 -Filename "C:\Sources\ESX5.ISO"
# List the system modules and Signature Info for each host
Foreach ($VMHost in Get-VMHost ) {
$ESXCli = Get-EsxCli -VMHost $VMHost
$ESXCli.system.module.list() | Foreach {
$ESXCli.system.module.get($_.Name) | Select @{N="VMHost";E={$VMHost}}, Module, License, Modulefile, Version, SignedStatus, SignatureDigest, SignatureFingerPrint
}
}
# List the vCenter Password Expiration Value
Get-AdvancedSetting -Entity $defaultVIServer -Name "VirtualCenter.VimPasswordExpirationInDays"
Errors are attached.