OK, so firstly, to be 100% sure, if I run the above script, I need to do so after shutting down the VM with the AMD GPU passed through. And when I do run it, it will put the whole PC to sleep so any other running VM's will also be suspended? I am not sure on this last part.
And then also, this...