IIS 7 and Above
Configuration & Scripting
How to change IIS WebServer Name using powershell
Last post Apr 27, 2019 04:00 PM by Akshay_M
Jan 13, 2018 10:10 PM|Orwell|LINK
Last week I cloned 40 IIS WebServers (W2K16) from VMWARE VM with newSid generation in order to swap old IIS Webservers (W2K8).
All new servers have correct netbios and hostname, but in IIS console the "name server" that appears is the name from orignal VM that I used to clone.
So I look for powershell CMDlet to rename IIS name server.
Also I if you know any other settings in IIS that should be renamed / modified all your feedback shall be welcome.
Thank you for your help
Jan 15, 2018 04:04 AM|Yuk Ding|LINK
What webserver name?
The IIS display the computer name as the web server name. So if you need to change the IIS webserver name, then you could try to change the computer name for your IIS server.
Nov 14, 2018 11:05 PM|jmwolfe24|LINK
You probably can't modify this via Powershell... but I solved the issue by removing this file on the template host:
This file has the old host name encrypted in it (it's binary).
But when you remove it, when a new user is added to the system, the OS will regenerate a new file for them and use the new computername. I tried it out -- worked great (Windows 2016 Server Standard Edition).
Apr 27, 2019 04:00 PM|Akshay_M|LINK
I tried this on my Windows 2008 R2 server to rename an IIS Web Application. it’s not possible from the GUI, but it’s simple to accomplish using PowerShell. First, let’s create a web application in an existing website and then verify it exists:
New-Item -ItemType Directory -Path d:\iis\robbinsapps
New-WebApplication -Name RobbinsApps -Site MikeFRobbins -PhysicalPath d:\iis\robbinsapps -ApplicationPool "ASP.NET v4.0"
Rename the web application using PowerShell and then verify it was renamed:
Rename-Item 'IIS:\Sites\MikeFRobbins\RobbinsApps' 'RobbinsApps-Archive'
Here it is again in the GUI showing that it has indeed been renamed: