How to change GPU on installed VM
I added a second GPU in my system. Then i updated the driver on a VM using the Update-VMGpuPartitionDriver script and change the GpuName String from "Auto" to "Name of Gpu2". And everything worked fine. Started the VM and it used Gpu2 and i could see it in Device Manager. But if i want to change the VM back to use Gpu1. I let run the script again with GpuName change to "Name of Gpu1". Then boot up the VM again just to see it still using Gpu2 and still showing Gpu2 in Device Manager. How can i change the VM to use Gpu1 again? Why it keeps installing Gpu2 while the name says Gpu1 in Script. I even tried to boot the VM in SecureMode. Then deleted the Gpu2 in Device Manager. Deleted the driver files in HostDriverFiles. Run the script again with Name of Gpu1 and still it keeps installing Gpu2.
Thanks for help in advanced.
Same issue, accidentally changed the GPU and now can't change it back. Did you find any solution?
Edit: I was able to do it using the script stefanuk12 shared. (De)attach.zip.
I also found the script and could change my GPU back. But i could not add the GPUs under their name,it would just accept Auto as GPU. Also after a restart it switched my GPUs back around. I didnt look deeper in the Problem because i just used it as a fun project so far,and i dont really need it. But what i believe is the issue comes from my system. A HP Workstation. I think it switches the IDs of the GPUs in Bios around depending an what GPU is a Monitor attachted and shows the Boot Screen will be GPU ID0 and the second GPU will be ID1. And when the IDs switch also the GPUs in the Virtual Machines switch around. I just found out i have a setting in my Workstations Bios to let me choose what GPUs is used to show the Bootscreen. I hope that gives the GPUs a pemantent ID from the Bios so it stops switching them around. But i did not find time to test it out yet.
Oh, Good for you man! Hope it all works out :)