Questions tagged [appcmd]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
542 views

Appcmd.exe: How to set config the virtual directory by using it parent path?

Using Appcmd.exe, I am trying to change the configuration of the virtual directory using its parent path "IIS://localhost/w3svc/5/ROOT/Site123" where, 5 - is the parent site ID, Site123 - is ...
0 votes
1 answer
67 views

Use AppCmd.exe to delete a restricted IP address

I used the following syntax to add an IP address (10.0.0.1) to the restrited IIS 7.5 section for the whole server : appcmd.exe set config -section:system.webServer/security/ipSecurity /+[ipAddress='10....
-2 votes
1 answer
687 views

How to make a change in iis apppool using appcmd.exe

I want to edit the parts marked in the photo using appcmd.exe or another comman-line method.
  • 69
0 votes
0 answers
187 views

how can find list of the sites connecting to the app pool using appcmd.exe

I can see a list of site and list of app pool separately. but how can I find wich site using from the app pool. e.g: we have an app pool with name: app1 i want to send command to find how sites ...
  • 69
0 votes
1 answer
362 views

how to get current physicalPath site using appcmd.exe

we want get current physicalPath of the site using appcmd.exe. how to identify physicalPath of site via site name or app pool name.
  • 69
3 votes
2 answers
4k views

How can I get the list of app pool using appcmd.exe

we using the below command to get the list of the site added in is: %systemroot%\system32\inetsrv\AppCmd.exe list sites but the above command can not take a list of app pools related to the site. I ...
  • 69
0 votes
1 answer
144 views

how can create a directory, in add site command using appcmd.exe?

When I am using the appcmd.exe for creating a website, I need a physical Path address in the command. How can I create directory when I am running this address: %systemroot%\system32\inetsrv\AppCmd....
  • 69
0 votes
1 answer
1k views

How to set the "ASPNETCORE_ENVIRONMENT" environmentVariable in the WEBROOT (web.config) with APPCMD.exe?

How am I able to set the sites web.config "ASPNETCORE_ENVIRONMENT" environmentVariable with APPCMD.exe? So far I've tried ending it using /commit:MACHINE/WEBROOT, /commit:webroot and I get the below: ...
4 votes
1 answer
3k views

How can I specify SSL certificate when running appcmd add site?

I can create a web site in IIS using e.g. the following command: appcmd add site -name:portallocal -physicalPath:"C:\dev\projects\mysite" -bindings:https/127.0.0.1:444:mysite.dev But how can I ...
  • 6,687
5 votes
1 answer
1k views

Can't find IIS config file listed by appcmd

I'm managing a bunch of IIS 8.5 servers and I'm working on complying with security baselines. My question is this: If I run a specific appcmd query on one of our IIS servers, I get the following: C:\&...
  • 2,831
3 votes
1 answer
2k views

What is the effect of stopping an AppPool on currently executing requests?

It is my understanding that asking an AppPool in IIS to recycle will give currently active requests 90 seconds to complete before they are abnormally terminated by the recycle request, while no longer ...
  • 133
2 votes
1 answer
4k views

Remove IIS configuration setting using AppCmd without clearing the entire section

I am using the following appcmd to add an autoStartProvider to the list of autoStartProviders: appcmd.exe set config -section:system.applicationHost/serviceAutoStartProviders /+"[name='MyAutoStartup',...
1 vote
1 answer
71 views

Conditionals in cmd scripts

I'm doing scripting using appcmd. What I'd like to do is check to see if a given site exists and if does perform an action. In this case, delete it. appcmd list app | find "mySite" So, if the find "...
  • 449
3 votes
1 answer
654 views

Why does scripting with appcmd behave differently than using IIS GUI?

I've scratched my head raw on this. Please help me stop the scratching. We have a manual workaround for a site problem we're experiencing. The workaround always works when we do the steps ...
0 votes
1 answer
2k views

Add a PHP Handler to a website or even a folder only via AppCmd

I am trying to automatically deploy an IIS webserver (currently 8.5, will need to work it out all the way down to 7.5 as well), using AppCmd.exe I am using PHP's FastCGI to handle requests. I have ...
  • 297
0 votes
1 answer
940 views

Change an IISExpress site's physicalPath on the command line

What's the easiest way to accomplish this? I see there's lots of examples for appcmd relating to IIS proper, and using powershell for same, but I can't see an API of sorts for reconfiguring the ...
  • 121
4 votes
1 answer
947 views

Use appcmd.exe to enable gzip compression on dynamic content on IIS 7.x

Every doc I can find discusses editing applicationHost.config in notepad to enable this. The real need: a) Via appcmd.exe or cmd line tool, enable dynamic compression to be configured in web.config (...
1 vote
0 answers
868 views

Start/Stop IIS site automated as an administrator, which is not a built-in "Administrator"

There are several ways to start/stop an IIS site, in a way that does not require logon to the system. For example: 1) Command line via APPCMD: C:\windows\system32\inetsrv\appcmd.exe stop site /site....
  • 201
2 votes
1 answer
739 views

PsExec hangs intermittently when calling AppCmd

We have an automated deployment process which is primarily managed by a batch file. One of the first steps in that process is to stop an IIS AppPool so the updated files can be safely copied. To do ...
  • 185
0 votes
1 answer
642 views

IIS applications appear in appcmd but not in IIS manager tree view

I have some web servers running Windows Server 2008 Std with IIS 7. I've noticed a strange thing about the configuration. I see some Apps and Virtual Directories in appcmd that don't show up in the ...
  • 292
0 votes
0 answers
274 views

Filter AppCmd to running sites

I have a script that uses appcmd to find sites using a particular vdir and iterates through them to find which ones are currently running appcmd.exe list vdir /physicalPath:Z:\My\Path :: save sites ...
  • 195
5 votes
2 answers
5k views

appcmd command to set anonymous authentication on a folder under a Web Application

I would like to run a command to set up anonymous authentication on a folder under a Web Application on IIS. I would like the particular folder to be the only thing affected. I don't want to change ...
10 votes
2 answers
6k views

Changing physical path on IIS through appcmd isn't activated

We have come across an issue on IIS 7.5 where we have a simple deploy system which consists of the following: Create a zip-file of new webroot, consisting of three folders: Api Site Manager This is ...
  • 858
3 votes
2 answers
866 views

IIS 7 - change the allowDefinition attribute for a config section in machine.config

We have a situation where we need to explicitly limit the system.web/processModel/maxAppDomains = 1 for one website. The problem is that system.web/processModel can only be set at the machine.config ...
  • 33
2 votes
1 answer
1k views

APPCMD syntax issue

I am trying to setup recycling logging events, using the following: appcmd set config /section:applicationPools /[name=' AppPoolName '].recycling.logEventOnRecycle:time But I am getting this error:...
  • 21
1 vote
2 answers
318 views

Is there a way to generate appcmd invocations from IIS Server Manager?

I find the appcmd CLI inscrutable, and so will often do more esoteric operations once locally in the server-manager, then look at the various changes to the config files that happen so I can perform ...
  • 1,243
0 votes
1 answer
1k views

IIS - How to use appcmd to add cache control rules to ARR?

We are using IIS/ARR to act as a reverse proxy which is deployed on Windows Azure, as part of the role startup a CMD file runs which handles all of the configuration. eg: %appcmd% set config -...
1 vote
1 answer
5k views

IIS7/appcmd - importing httpError configuration gives an error

In an effort to try and take the pointy-clickyness out of configuring IIS for our application, I've been looking at appcmd. Specifically it's ability to export config trees and reapply them with ...
  • 1,218
10 votes
3 answers
11k views

Is there a way to make my local AppCmd.exe to refer to a remote server?

I need to remotely administrate IIS via command-line. Is there a way to make my local AppCmd.exe refer to a remote server? So that every command I pass to AppCmd.exe would be executed in another ...
1 vote
1 answer
13k views

Anonymous Authentication <anonymousAuthentication> / 403 - Forbidden: Access is denied

I am using windows server 2008 R2 and IIS 7.5 I deployed my app to that server for the first time and I got the following error; 403 - Forbidden: Access is denied. You do not have permission ...
  • 907
5 votes
2 answers
23k views

How can I get just the site name from the "AppCmd.exe list site" command?

If I run the following command on my server: %windir%\system32\inetsrv\AppCmd.exe list site I get this output: SITE "MyCompany.MyProject.WebRole_IN_0_Web" (id:1273337555,bindings:https/555.555.555....
7 votes
1 answer
16k views

appcmd has insufficient permissions to read redirection.config

I have this problem with my IIS7: C:\Users\vtortola.dk>%windir%\system32\inetsrv\appcmd.exe list site ERROR ( message:Configuration error Filename: redirection.config Line Number: 0 Description: ...
3 votes
2 answers
8k views

IIS7 appcmd list sites: is there a wildcard to filter on (for i.e. all bindings on port 443)?

In IIS7, is it possible to filter the results of the appcmd list sites command to, for example, all sites running on port 443? For example: /appcmd list sites /bindings:http://216.123.123.123:443:*...
  • 248
1 vote
1 answer
3k views

How do I elevate privileges when running appcmd from a nant task?

We are using a Windows 7 box as build server. As part of our continuous integration process I would like to stop and start an IIS 7 website. I have tried doing this from the command line using appcmd:...
  • 119
1 vote
1 answer
4k views

How can I delete a URL rewrite rule in IIS7 from the command prompt if it's got spaces in the name?

The appcmd help is a little vague and I can't seem to figure out the proper escape or quoting sequence. appcmd set config -section:defaultDocument /-files.[value='main.html'] Remove a ...
3 votes
1 answer
3k views

AppCmd returns error: Object 'SET' is not supported

I am trying to set SSL Host Headers and Secure Site Bindings in IIS7. I followed the directions on this website http://www.digicert.com/ssl-support/ssl-host-headers-iis-7.htm (among others), but when ...
  • 141
4 votes
3 answers
12k views

AppCmd backup for IIS7 gives access denied error (hresult:80070005)

I have a script I have been using on another Windows 2008 to delete the IIS7 backup of configs and create a fresh one: SET DEST=C:\Backup\Web\IIS7 SET BACKUPNAME=IIS7-CONFIGS %windir%\system32\...
  • 425
0 votes
3 answers
3k views

Is it possible to run APPCMD from Server 2003?

In our transitory migration situation, I have the need to run APPCMD from a Windows Server 2003 machine, but of course targeting an IIS7 instance on a remote Windows Server 2008. Is it possible? (I ...
  • 111
1 vote
2 answers
13k views

IIS appcmd on Windows Server 2003?

For IIS 7.0 on Windows Server 2003, any tools like appcmd for IIS 7.0 with Windows Server 2008? I did not find such command on Windows Server 2003. thanks in advance, George
  • 1,137
1 vote
1 answer
2k views

using appcmd to add new web site issue

I am using VSTS 2008 + C# + .Net 3.5 + IIS 7.0. I want to using appcmd to add a new web site, my scenario is like this. All my web site files are under folder c:\template; I want to add my new web ...
  • 1,137