HI
it seems like I always need help , I looking for a script that get me the information on what cd\dvd are mounted within a esxi host.
get me the vm housed by the esxi host that have cd\dvd mounted
Thanks
Do you mean something like this?
Get-VMHost -Name $esxName | Get-VM -PipelineVariable vm | Get-CDDrive |
where{$_.ConnectionState.Connected} |
select @{N='VM';E={$vm.Name}},IsoPath,HostDevice,RemoteDevice
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Do you mean something like this?
Get-VMHost -Name $esxName | Get-VM -PipelineVariable vm | Get-CDDrive |
where{$_.ConnectionState.Connected} |
select @{N='VM';E={$vm.Name}},IsoPath,HostDevice,RemoteDevice
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
L.
as always thanks , can this be adjusted to change the status of the device type to "client Device" ?? and also if by any chance the vmware tools is running how to end installation ?
Thanks
That is done by the VMRC with an API that is afaik not public.
There is no PowerCLI cmdlet or method, but you could use Invoke-VMScript to check if a VMware Tools update is running inside the guest OS.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
L.
so at this point get-dcdrive can tell me if it is mount, but as of now there is no script that can dismount and change the device type to "client device", this portion has to be done manually?
correct?
Thanks again jefe
That is correct.
In fact, when you use the VMRC you can only connect to a local ISO when the VM is powered on.
The only way around is to copy the ISO to a datastore and then use the IsoPath parameter.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
L.
Thanks for the direction , as always priceless
for the CD\dvd I went and adjust the script to reflect " | set-cddrive -nomedia -confirm:$false"
sad we dont have something that will trigger or do "end VMware Tools Install"
again Thanks a bunch L for all the help