' File: DetectCustomErrorsDisabled.vbs
' Version 3.1
' Copyright Microsoft Corp. 2010
' Author: Nazim Lala
'
' This script will list all paths on a server that have ASP.Net
' customErrors turned off in a web.config file.
'
' Usage:
' cscript DetectCustomErrors.vbs [RemoteServerName]
'
' NOTE: THIS SCRIPT USES THE FILESYSTEM AND SHELL OBJECT AND SHOULD BE
' RUN AS AN ADMINISTRATOR
'
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
OPTION EXPLICIT
ON ERROR RESUME NEXT
DIM strServer
DIM objWebService, objWebServer, objDir, objFileSys
DIM physicalPath, dir, xmlDoc, nodeList, node, ret
DIM configFile, configFilePath, configLine
DIM childNodes, ErrPage500, ErrPage404, errFound
DIM index, errCount
dm3281
Member
24 Points
4 Posts
DetectCustomErrorsDisabled.vb - Powershell?
Sep 23, 2010 04:27 PM|LINK
What? No Powershell?
' File: DetectCustomErrorsDisabled.vbs
' Version 3.1
' Copyright Microsoft Corp. 2010
' Author: Nazim Lala
'
' This script will list all paths on a server that have ASP.Net
' customErrors turned off in a web.config file.
'
' Usage:
' cscript DetectCustomErrors.vbs [RemoteServerName]
'
' NOTE: THIS SCRIPT USES THE FILESYSTEM AND SHELL OBJECT AND SHOULD BE
' RUN AS AN ADMINISTRATOR
'
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
OPTION EXPLICIT
ON ERROR RESUME NEXT
DIM strServer
DIM objWebService, objWebServer, objDir, objFileSys
DIM physicalPath, dir, xmlDoc, nodeList, node, ret
DIM configFile, configFilePath, configLine
DIM childNodes, ErrPage500, ErrPage404, errFound
DIM index, errCount
strServer = "localhost"
Nai-Dong Jin...
All-Star
41630 Points
3558 Posts
Re: DetectCustomErrorsDisabled.vb - Powershell?
Sep 30, 2010 04:29 AM|LINK
Hi,
What's you exact problem?