Tried to list all upgrade files in a path
I store the actual update vibs in a folder called Update. So I want to update the esxi with a script but Get-Childitem returns simply nothing.
$VMHost = "ESXi"
Connect-VIServer $VMHost
$esxcli = Get-ESXcli -VMHost $VMHost
$ds = Get-Datastore "STORE"
$Path = $ds.DatastoreBrowserPath + "\Update\"
$Files = Get-ChildItem -Recurse -Path $Path | sort
if ($Files.Count -gt 0) {
Foreach ($File in $Files) {
$esxcli.software.vib.install($File)
}
}
How can I get the right path to update the esxi?
Thank you for any help