KB ID 0001487
I migrated an IIS website I use for hosting files this week, and realised I’d forgotten how to relocate the wwwroot directory from it’s default install location on C:\inetpub\wwwroot.
Firstly, I’m assuming you have instilled the IIS role and you already have a wwwroot folder on your C: Drive, (in the above location). If so you can simply copy this folder to your new partition/drive (in my case the E: drive).
Open IIS Manager, Drill down to the Default Web Site > Manage Website > Advanced Settings > Physical Path > Change accordingly > OK.
You can now Stop and Restart the website from within IIS Manager, or run ‘iisreset‘ from command line.
Related Articles, References, Credits, or External Links
It doesn’t work if you use Map Folder or UNC. I’m running win2019