There are multiple posts on how to do this but kudos to Jeremy Taylor - his post covers it all:
A few things to note about this:
- The Drives must match on ALL systems that will host IIS - this means the Web Front Ends (WFE's), the Application Servers and the Search Servers - the SAME drive letter must be used for all servers.
- Go ahead and follow the installation up to creating the Central Administration site.
- If this is a VM, take a SNAPSHOT BEFORE you do this!
- Run the command/batch script to move the IIS sites to a new drive - use the Command Prompt and select Run as administrator (NOTE: Moving IIS sites before or after the creation of Central Administration doesn't matter - the SharePoint install has the c: drive hardcoded and you can change it until after the fact).
- After IIS sites have been moved, use the PowerShell script to move Central Administration; open the SharePoint 2013 Command Shell and be sure to select Run as administrator.
- After running the PowerShell script, you MUST change the CA directory manually in IIS (see image below)
- Once this has been completed, be SURE to run an IISRESET (use the Command Prompt selecting Run as administrator)
- Verify that Central Administration is working,
- Run the Move IIS script on ALL other servers that will be hosting IIS.