Hi Experts,
Actually am working to make script to unmount CD Drive from Datastore ISO's but its asking Question option like Yes or No.I have used below command to unmount. But what i need is I want to unmount CD Drive Datastore which ISO's are mounted older than 7 days.
Get-VM _Name vm-test | Get-CDDrive | where { $_.ISOPath -like $ISO } | Set-CDDrive -Nomedia -confirm:$false | Get-VMQuestion | Set-VMQuestion –Option "Yes"
I have used this command to unmounting, its unmounting but asking Question even i have mention option. Also i want to unmount only ISO's ar emounted older than 7 days.
If any one knows kindly help.
Thanks In advance.