appcmd

How to assign a SSL Certificate to IIS7 Site from Command Prompt

Can you advise me whether it is possible or not to assign a SSL Certificate to a website in IIS7 using the APPCMD application? I am familiar with the command to set the HTTPS Binding appcmd set site /site.name:"A Site" /+bindings.[protocol='https',bindingInformation='*:443:www.mysite.com'] and how to obtain current mappings %windir...

change physical path for virtual directory or site in IIS using command line for IIs6 or IIs7

I need to implement some versioning for deployment for the app I support where I can copy the site to say c:\inetpub\wwwroot\app_v2 and then switch the virtual directory from c:\inetpub\wwwroot\app_v1. Is there a way to change the physical path for a virtual directory in IIS from the command line? Edit: i found that in IIS7 you can ...

How do you change the allowDefinition section attribute using appcmd in IIS 7?

Is it possible to use appcmd to change the value of allowDefinition? Specifically I'm try to enable changes to the httpCompression module at the application level. Modifying the applicationHost.config by manually changing the following line: <section name="httpCompression" allowDefinition="AppHostOnly" overrideModeDefault="Deny" /> T...

How do I reference a site by ID using IIS7 APPCMD?

I know how to reference a site by name to stop and start it? For example: appcmd stop site /site.name:"Microsoft SharePoint Administration" How do I reference a site using its IIS ID? I tried these variations: appcmd start stop /site.id:2 appcmd start stop /site.id:"2" appcmd start stop /site.id:2 appcmd start site /section:sites /[i...

using appcmd to add new web site issue

Hello everyone, 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, the virtual directory is called "testsite1"; I want to use the default ...

How do I change the physical path of web site in IIS7 with APPCMD?

I need to change the physical path of a web site through the command line via the appcmd.exe tool, but I can't figure out the syntax. Can someone help? ...

How to use appcmd to set debug=false in IIS7

I'm trying to use APPCMD to set debug=false in web.config, per the documentation. The specific syntax I am using is: APPCMD SET CONFIG "SITE/VDIR" section:compilation /debug:False /commit:APP the output is INFO ( section:compilation, timetaken:219, hresult:00000000, objects:1 ) Applied configuration changes to section "system....

IIS appcmd on Windows Server 2003?

Hello everyone, 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 ...

Run Command as administrator in PowerShell script. UAC

OK here is my issue: I am trying to run a script remotely on a server. I am an administrator on both boxes, firewall exceptions are in place, remote admin is enabled, and everything else looks good that i can see. invoke-command -ComputerName $ComputerName -ScriptBlock ` { cd C:\Windows\System32\inetsrv\; ./appcmd.exe ADD ...

How do I use IIS6 style metabase paths in IIS7 AppCmd tool?

I'm currently in the process of upgrading old II6 automation scripts that use the IISVdir tool to create/modify/update apps and virtual directories, and replacing them with AppCmd for IIS7. The IIS6, "IISVDir" commands reference paths in that are from the metabase, eg, /W3SVC/1/ROOT/MyApp - where 1 is ID of "Default Web Site". The comma...

Why does the page posts take so long?

Hi! I am having some problems with some page post backs that take a loooong time to execute. If I do a "appcmd list requests" I can get something like this: REQUEST "79000001800004e3" (url:POST /dir/file.aspx, time:87219 msec, client:xxx.xxx.xxx.xxx, stage:ExecuteRequestHandler, module:ManagedPipelineHandler) REQUEST "8600000080002f8...

IIS7 AppCmd How To Set Application Pool of Site using XML

I'm trying to determine what the correct XML is to tell AppCmd to set a Site's application pool correctly. So far I've tried: <appcmd> <SITE SITE.NAME="~name~" Site.ApplicationPool="~name of existing apppool~" physicalPath="~path~" SITE.ID="17" bindings="http/*:80:~domain~,http/*:80:~domain~" state="Started" /> </appcmd> But the sit...

AppCmd: Framework vs Framework64

I have a batch of new server getting installed and I'm finally trying to automate as much of at process as possible. Part of that includes making some changes to machine.config, like setting configSource on connectionStrings and setting the machine keys across a lb pool. It appears that on a 64bit os, appcmd only effects the config in t...

Use appcmd to list files/folders with windows authentication in IIS7

Hi all, is there any way to use Use appcmd to list all of the files/folders with windows authentication set in IIS7? Cheers Batesy ...

Determining if a Powershell command was successful

Hi I am quite new to Powershell but I have one niggling question. I want to be able to tell if a command has completed successfully so I can give meaningful messages to host. I am using the appcmd command to add a binding in IIS. Essentially that goes as follows: ./appcmd set site /site.name:........................ But how can I do a...

How do I create websites on remote servers using appcmd?

I have used appcmd to create websites on my local computer. There doesn't appear to be a server parameter which means that i have to remote desktop on to each machine that i'm deploying to and run the appcmd command. Also, can i use appcmd to deploy to IIS 6.0? If not, how do i deploy to remote IIS 6.0 web servers? I've tried the iisweb...