Questions tagged [appcmd]

40 questions
2
votes
1 answer

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',type='PreWarmCache, MyAssembly, version=1.0.0.0,…
Philipp Schmid
  • 359
  • 2
  • 6
  • 18
2
votes
1 answer

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 this, we call PsExec, like this: PsExec.exe…
p.s.w.g
  • 185
  • 2
  • 9
2
votes
1 answer

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: Failed to process input: The parameter…
Adam
  • 21
  • 2
1
vote
1 answer

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 site as a virtual directory under default web site,…
George2
  • 1,137
  • 6
  • 22
  • 41
1
vote
1 answer

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 "mySite" returns any text, I'd like to execute a…
Frank V
  • 449
  • 4
  • 15
1
vote
0 answers

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.name:"TestSite" 2) VBS script: Set oIIS =…
1
vote
2 answers

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 them by hand or script. I could swear I've seen a…
Peter Mounce
  • 1,243
  • 4
  • 16
  • 28
1
vote
1 answer

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 minimum fuss. Generally, this gives the exported…
Chris J
  • 1,218
  • 18
  • 32
1
vote
1 answer

Anonymous Authentication / 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 to view this directory or page using the credentials…
tugberk
  • 907
  • 4
  • 13
  • 29
1
vote
1 answer

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: appcmd start site "my website" However, this…
Rune
  • 119
  • 1
  • 5
1
vote
1 answer

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 collection element with the specified keys in the …
MyItchyChin
  • 347
  • 1
  • 3
  • 12
1
vote
2 answers

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
George2
  • 1,137
  • 6
  • 22
  • 41
0
votes
1 answer

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: appcmd.exe set config "Default Web Site/Help"…
0
votes
1 answer

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 configured the FastCGI pool on server level. Now I…
Worp
  • 287
  • 1
  • 4
  • 15
0
votes
1 answer

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 physicalPath of a node for a given…
cirrus
  • 121
  • 6