List SMTP Service Configuration Information
Description
Returns information about the configuration of the SMTP server service on a computer running IIS 6.0.
Supported Platforms
Windows Server 2003 |
Yes |
Windows XP |
No |
Windows 2000 |
No |
Windows NT 4.0 |
No |
Windows 98 |
No |
Script Code
strComputer = "." Set objWMIService = GetObject _ ("winmgmts:{authenticationLevel=pktPrivacy}\\" _ & strComputer & "\root\microsoftiisv2") Set colItems = objWMIService.ExecQuery _ ("Select * from IIsSmtpService") For Each objItem in colItems Wscript.Echo "Accept Pause: " & objItem.AcceptPause Wscript.Echo "Accept Stop: " & objItem.AcceptStop Wscript.Echo "Caption: " & objItem.Caption Wscript.Echo "Check Point: " & objItem.CheckPoint Wscript.Echo "Description: " & objItem.Description Wscript.Echo "Desktop Interact: " & objItem.DesktopInteract Wscript.Echo "Display Name: " & objItem.DisplayName For Each strRoute in objItem.DomainRouting Wscript.Echo "Domain Routing: " & strRoute Next Wscript.Echo "Error Control: " & objItem.ErrorControl Wscript.Echo "Exit Code: " & objItem.ExitCode Wscript.Echo "Installation Date: " & objItem.InstallDate Wscript.Echo "Local Domains: " & objItem.LocalDomains Wscript.Echo "Name: " & objItem.Name Wscript.Echo "Path Name: " & objItem.PathName Wscript.Echo "Process Id: " & objItem.ProcessId For Each strRoute in objItem.RoutingSources Wscript.Echo "Routing Sources: " & strRoute Next Wscript.Echo "Service Specific Exit Code: " & _ objItem.ServiceSpecificExitCode Wscript.Echo "Service Type: " & objItem.ServiceType Wscript.Echo "SMTP Service Version: " & _ objItem.SmtpServiceVersion Wscript.Echo "Started: " & objItem.Started Wscript.Echo "Start Mode: " & objItem.StartMode Wscript.Echo "Start Name: " & objItem.StartName Wscript.Echo "State: " & objItem.State Wscript.Echo "Status: " & objItem.Status Wscript.Echo "Tag Id: " & objItem.TagId Wscript.Echo "Wait Hint: " & objItem.WaitHint Next
For online peer support, join the microsoft.public.windows.server.scripting community on the msnews.microsoft.com news server. To provide feedback or report bugs in sample scripts or the Scripting Guide, please contact Microsoft TechNet.
Disclaimer
This sample script is not supported under any Microsoft standard support program or service. The sample script is provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.