Reputation: 31
I am trying to build a developers desktop (citrix) with Windows 10 and they need to have the IIS features enabled. I could do that if it was by default on C drive with the enable feature. Unfortunately, for them most of the programs are installed on the D partition since the C drive is a vdisk. This vdisk is not going to get any updates except when I update the vdisk. So, if they are going to use their applications and developing it, they need to have most of it installed on the D drive. So, I need to have IIS also installed on the D drive on Windows 10.
Does anyone have a powershell script to enable the IIS features on Windows 10 and have it install on D drive. I have Rick's script, but it installs on C drive by default. I would like to have this installed on the D drive.
I tried a script that has been provided below, but this will install on default C drive. Not on D drive as you are running from C drive Powershell.
I have not tried changing the drive to D and running it.
Add-WindowsFeature Web-Server, Web-WebServer, Web-Common-Http, Web-Default-Doc, Web-Dir-Browsing, Web-Http-Errors, Web-Static-Content, Web-Http-Redirect, Web-Health, Web-Http-Logging, Web-Custom-Logging, Web-Log-Libraries, Web-ODBC-Logging, Web-Request-Monitor, Web-Http-Tracing, Web-Performance, Web-Stat-Compression, Web-Security, Web-Filtering, Web-Basic-Auth, Web-IP-Security, Web-Url-Auth, Web-Windows-Auth, Web-App-Dev, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Mgmt-Tools, Web-Mgmt-Console, Web-Mgmt-Service, Web-Scripting-Tools
Add-WindowsFeature Web-Net-Ext, Web-Net-Ext45, Web-Net-Ext45, Web-Asp-Net, Web-Asp-Net45 -source "Path to the source files"
Add-WindowsFeature NET-Framework-Features, NET-Framework-Core, NET-Framework-45-Features, NET-Framework-45-Core, NET-Framework-45-ASPNET, NET-WCF-Services45, NET-WCF-TCP-PortSharing45 -source "Path to the source file"
No error, just need to have this code install on D drive
Upvotes: 2
Views: 2021
Reputation: 32693
You don't choose to install IIS on a specific drive. It just goes on the system drive. You can however choose where to place the files for your site. That's part of the "Basic Settings" when you configure your site in IIS, and you're free to place those files wherever you want in the file system.
In the IIS Manager utility, I clicked on a site, then on "Basic Settings", and that allows me to specify the physical path to the files for my site.
Upvotes: 3