Search code examples
iis-7appcmd

Configure appcmd to support utf8


I am using appcmd in order to list the websites by calling:

appcmd.exe list config -section:system.applicationHost/sites

As I have some web sites that have non-ascii characters in their name (in this case- Chinese), the result is that the Chinese chars are omitted from the web site name, as can be seen in the following pic:

Querying for web sites using appcmd

I know that updating the "Language for non-Unicode programs" under "Regional and Language Options" to Chinese is a possibility but I want to run appcmd with support of utf8 from the first place.

Is it possible? Is there a way to configure it?


Solution

  • An alternative use of the appcmd tool for fetching the required data can be to read the ApplicationHost.config file. see: http://www.iis.net/learn/get-started/planning-your-iis-architecture/introduction-to-applicationhostconfig).