Hello,
I am preparing a tool to check the daily Domain Healt Report.
Now I am currently checking for the GPO health I have a VB script to execute a , Please find the script below:
On Error Resume Next
Set myobj = CreateObject("Scripting.FileSystemObject")
Set mywriteFile = myobj.CreateTextFile("C:\temp\saras\DC_GPO_Info"& 10000*Year(Date)+100*Month(Date)+Day(Date) &".htm", true)
WScript.Echo "Inside"
mywriteFile.WriteLine "<Table>"
mywriteFile.WriteLine "<p align=Center><font size=10 face=Cambria MT color=#003333><B><u>Anglo Domain Group Policy Health Report</u></B></font></p>"
mywriteFile.WriteLine "<H1><p align=Center><font size=6 face=Cambria MT color=#330033><B><u><i>Find Orphaned GPOs In SYSVOL</i><u></B></font></p></H1>"
Dim objShellSet
objShell = WScript.CreateObject("WScript.Shell")
WScript.Echo "Inside1"
objShell.Run "cscript C:\temp\tom\findorphanedGPOsInSYSVOL.wsf /Domain:testlabs.local >>C:\temp\saras\mywriteFile.WriteLine "DC_GPO_Info.*"
WScript.Echo "Inside3"
Set objShell = Nothing
But for some reason the output is able to creating but the resule is not getting printed.Can anybody suggest weathe this script is correct or it needs some modification.