IIS management commandline tools

Hi all,


One of my MOSS frontend servers, part of a multi-frontend server farm, faced a well-known issue that causes the IIS Manager console to open up empty. In case you have this issue you can temporarily workaround this by performing an iisreset on the system. In my case I could not simply perform a iisreset, because the corporate website is running on it. We do have a NLB device in front of our frontend server that uses a website on all frontends for probing. If we need to disable a frontend, then we need stop the probing website in IIS and the NLB automatically disables the front end in its config. So all I needed to do is stop the probe website. How do you do that without IIS Manager ???


The solution lies in the IIS 6.0 commanline tools. I must admit that until today I had only used iisreset and I was unaware of the other tools.


Here is the list of tools as found at http://msdn.microsoft.com/en-us/library/ms525006.aspx


%SystemDrive%\Inetpub\AdminScripts\AdsUtil.vbs
AdsUtil.vbs is a popular tool because it is the most versatile, and it can be used on so many versions of IIS.AdsUtil.vbs uses ADSI to set, delete, create, and enumerate properties, find paths, and control the IIS server. One helpful parameter is ENUM_ALL, which enumerates the entire IIS configuration.AdsUtil.vbs cannot display properties of types IPSec, Binary, or NTAcl.AdsUtil.vbs does not display secure properties such as passwords.
(applies to IIS 4.0, IIS 5.0, IIS 5.1, IIS 6.0) 


%SystemDrive%\Inetpub\AdminScripts\ChAccess.vbs
ChAccess.vbs is used to set access permissions at metabase nodes. These access permissions include the AccessRead, AccessWrite, AccessScript, and AccessExecute flags of the AccessFlags property, and the EnableDirBrowsing flag of the DirBrowseFlags property.
(applies to IIS 5.1) 


%SystemDrive%\Inetpub\AdminScripts\SyncIwam.vbs
SyncIwam.vbs is used to update the launching identity of all IIS COM+ application packages that run out of process.There are certain operations that may cause the IWAM account, which is the identity under which out of process IIS applications run, to become out of sync between the COM+ data store and IIS or the SAM. On IIS startup the account information stored in the IIS Metabase is synchronized with the local SAM, but the COM+ applications will not automatically be updated. The result of this is that requests to out of process applications will fail.For more information, open SyncIwam.vbs in Notepad to view the comments.
(applies to IIS 5.1, IIS 6.0) 


%SystemRoot%\System32\IISReset.exe
IISReset.exe is used to safely start, stop, enable, and disable the IIS services. Always use the /NOFORCE option when stopping or rebooting an IIS server.
(applies to IIS 5.1, IIS 6.0) 


%SystemRoot%\System32\ConvLog.exe
ConvLog.exe is used to convert log files to NCSA format. It can also replace IP addresses with Domain Name System (DNS) names during conversion, or it can be used to replace IP addresses with DNS names inside an NCSA Common log file. You can also use ConvLog.exe to convert time offsets.
(applies to IIS 5.1, IIS 6.0) 


%SystemRoot%\System32\IIsApp.vbs
IIsApp.vbs is used to list worker processes. Given an application pool identifier, it an report all of the process identifiers (PIDs) currently running w3wp.exe processes.IIS must be running in worker process isolation mode.This tool uses WMI. It cannot be used to configure a remote IIS server.
(applies to IIS 6.0) 


%SystemRoot%\System32\IIsBack.vbs
IIsBack.vbs is used to backup the metabase, restore the metabase, delete backups, or list all existing backup files.This tool uses WMI. It can be run remotely on any machine that supports WMI, but it must be passed the name of a server running IIS 6.0 or later.
(applies to IIS 6.0) 


%SystemRoot%\System32\IIsCnfg.vbs
IIsCnfg.vbs is used to import, export, copy, or save the IIS metabase configuration information, in whole or in part.This tool uses WMI. It can be run remotely on any machine that supports WMI, but it must be passed the name of a server running IIS 6.0 or later.
(applies to IIS 6.0)  


%SystemRoot%\System32\IIsExt.vbs
IIsExt.vbs is used to manages Web service extensions. When IIS is installed, only HTML Web content is allowed to be served. ASP, ASP.NET, CGI, and ISAPI applications must be enabled.This tool uses WMI. It can be run remotely on any machine that supports WMI, but it must be passed the name of a server running IIS 6.0 or later.
(applies to IIS 6.0) 


%SystemRoot%\System32\IIsFtp.vbs
IIsFtp.vbs is used to stop, start, pause, delete, or query the FTP service, or create an FTP site.This tool uses WMI. It can be run remotely on any machine that supports WMI, but it must be passed the name of a server running IIS 6.0 or later.
(applies to IIS 6.0) 


%SystemRoot%\System32\IIsFtpdr.vbs
IIsFtpdr.vbs is used to create, delete, or query and FTP virtual directory or directory.This tool uses WMI. It can be run remotely on any machine that supports WMI, but it must be passed the name of a server running IIS 6.0 or later.
(applies to IIS 6.0)  


%SystemRoot%\System32\IIsVdir.vbs
IIsVdir.vbs is used to create, delete, or query and Web virtual directory or directory.This tool uses WMI. It can be run remotely on any machine that supports WMI, but it must be passed the name of a server running IIS 6.0 or later.
(applies to IIS 6.0) 


%SystemRoot%\System32\IIsWeb.vbs
IIsWeb.vbs is used to stop, start, pause, delete, or query the Web service, or create a Web site.This tool uses WMI. It can be run remotely on any machine that supports WMI, but it must be passed the name of a server running IIS 6.0 or later.
(applies to IIS 6.0) 

I finally stopped the website with the following command: cscript.exe iisweb.vbs /stop Probe (where Probe is the name of my website to stop).

I thing though is that although the scripts are located in the %SYSTEMROOT%\SYSTEM32 folder, the script did not work outside of this folder. So go into system32 or specify the complete path to the vbs script in the cscript command.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>