I read this answer but it doesn't work for Windows PowerShell. How to change the drive?
Please ignore this question. I was trying to change the drive from C: to D:. The reason it wasn't working was that there was no D: on my computer. A really silly mistake.