How to set IIS settings by command line

1

1

I've installed IIS on a server 2008 r2 system by command line.

Now I also want to set some settings by command line. For example to enable ASP.NET v4.0.30319 and enable windows and basic authentication.

Is it possible?

If it is possible, how can I do it?

Thanks in advance. Marco

Marco Frost

Posted 2013-07-02T09:32:58.603

Reputation: 125

Answers

0

You can change all IIS settings on the command line, even some things you can not change in the GUI.

There are various options, you could use appcmd.exe, COM objects in your WSH scripts or own programss, or PowerShell IIS cmdlets.

There are tons of examples out there, a good starting point is www.iis.net, they have a reference section with many examples. You could also use the Configuration editor in 'IIS Manager' it offers to generate a script for any change you make in it. Just copy the script into your batch file.

To enable ASP.NET you may need to look into

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -?

Peter Hahndorf

Posted 2013-07-02T09:32:58.603

Reputation: 10 677