Project Description
Console tool created for reghosting SharePoint sites after an upgrade.

This is intended to be used in conjunction with a script to pull all site URL's like the following, and run in a batch file.

' Retrieves all site collections in XML format from MOSS Sites.
Set objShell = CreateObject("WScript.Shell")
Set objExec = objShell.Exec("stsadm -o enumsites -url http://moss/")
strResult = objExec.StdOut.ReadAll

' Load XML in DOM document so it can be processed.
Set objXml = CreateObject("MSXML2.DOMDocument")

For Each objSc in objXml.DocumentElement.ChildNodes
strUrl = objSc.Attributes.GetNamedItem("Url").Text
If Instr(strURL, "ssp") = False Then
WScript.Echo "ECHO Cleaning Up unghosted sites / pages"
WScript.Echo "reghost" + strUrl
End If

Set objShell = Nothing
Set objExec = Nothing
Set strResult = Nothing
Set objXml = Nothing
Set strUrl = Nothing
Set strFileName = Nothing

Last edited Mar 9, 2011 at 1:15 PM by StumpJ, version 2