Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

IIS admin website administration ################################ For example, to list all sites on the machine, use this command-line:

%systemroot%\system32\inetsrv\APPCMD list sites The output will be similar to: SITE "Default Web Site" (id:1,bindings:HTTP/*:80:,state:Started) SITE "Site1" (id:2,bindings:http/*:81:,state:Started) SITE "Site2" (id:3,bindings:http/*:82:,state:Stopped) Five ways that you can use AppCmd.exe to make your IIS website administration ea sier 1) Start and Stop IIS websites from the command line This is actually very simple. If you don t know the name of your sites, just do: ##Appcmd list sites SITE "Default Web Site" (id:1,bindings:HTTP/*:80:,state:Started) SITE "Site1" (id:2,bindings:http/*:81:,state:Started) SITE "Site2" (id:3,bindings:http/*:82:,state:Stopped) --------------------------------------------Appcmd start sites Default Web Site 2. 2) Add a new website Adding a new website is easy. Just use: Appcmd add sites /name: Dave s Site /id:12 /bindings:http://mysite.com:80 To get a more fully functioning IIS site, use the following two commands: AppCmd add site /name:ddsite /id:99 /bindings:http/*:81: /physicalPath:C:\ddsite AppCmd add app /site.name:DDSite /path:/ddapp /physicalPath:C:\sites\ddsite 3) Listing objects that meet certain information Using the list command is easy. I showed you how to list our websites running on the server in #1, ##Appcmd list sites /state : started ##Appcmd list sites /state : stopped 4) Backing up you IIS configuration AppCmd.exe can backup your IIS configuration using the add backup command. You can also list your commands with the list backup command the and the restore backup can put your backup data back where it needs to go with the restore backup command. ##Appcmd list backup ##Appcmd add backup ##Appcmd restore backup

5) Report on IIS configurations AppCmd has the power to report on your IIS configurations and export that config uration to a text file. To do this, just run: Appcmd list site sitename /config

Here is what the output looks like:

You might also like