Question

I have a Web application hosted on Windows Server 2003(IIS 6). I wish to delete the Web Application remotely via a DOS command. I have already tried using these: 1. "C:\Program Files\IIS\Microsoft Web Deploy\msdeploy" -verb:delete -dest:apphostconfig="Default Web Site/MyAppName"

  1. C:\Windows\System32\inetsrv\appcmd.exe delete app "Default Web Site/MyAppName"

But the problem is that the system does not have either of msdeploy or appcmd.

There are ~20 such servers where this application needs to be removed from so I cannot do it manually. Also I cannot install any other program/application on to these servers.

Can someone please help?

Était-ce utile?

La solution

(APPCMD.EXE was only written for Windows Server 2008+, so it cannot apply to Windows Server 2003).

Most installations of Server 2003 have ADSUTIL.VBS which is tool that uses the ADSI automation interface of IIS. You can use that tool to do your deleting. (if for some reason that tool is not there, you can write your own script to call into ADSI to do the same).

cscript.exe %systemdrive%\inetpub\adminscripts\adsutil.vbs appdelete w3svc/1/root/MyAppName

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top