node package manager


administer iis 7 on windows


Node module for administering sites, application pools and related settings in IIS 7+.

Wraps up common commands you would use in the \windows\system32\inetsrv\appcmd utility.

Note: because this is IIS, you need to execute it using "Run As Administrator".

npm install iis
var iis = require('iis');

    protocol: 'http',
    port: 80,
    host: '*',
    path : __dirname + '/site'
},function(err,rsp) {
    if (!err) {
       console.log('Site created.');
  • name: The name of the site in IIS.
  • protocol: Protocol. Either 'http' or 'https'.
  • port: Numeric port number.
  • host: Host header to bind the site to ( Use '*' for any.
  • path: Physical root path of the site (ex: 'c:\\inetpub\\wwwroot\\newsite').
iis.startSite('MyNewSite',function(err,rsp) {
   if (!err) {
     console.log('Site started');

iis.stopSite('MyNewSite',function(err,rsp) {
    if (!err) {
       console.log('Site stopped');

// Note: rsp param in callback contains the std out from the appcmd.exe shell output