0

Can you one please provide a sample to script to delete Sitecollection and subsites based on Input file in SharePoint 2003.

Thanks in Advance, Phani

  • Can you please provide some more details about your requirement, is you want to delete the site collection and subsite based on the text file or excel file ? are you using SharePoint 2003 or 2013? – THIVAGAR SEGAR Oct 8 '18 at 13:59
  • Want to delete the sitecollections and sub sites in SharePoint 2003 using csv file or text file. – phani Oct 8 '18 at 14:11
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review – Gaurravs Oct 9 '18 at 9:37
1

Bit of archaeology here. You will need to use stsadm to run it.

Use this command in the script.

$Sites = Get-Content -Path C:\SitesToDelete.csv
ForEach ($s in $Sites)
{
stsadm -o deletesite -url $s
}

You can use PowerShell to script it with your input but remember to use stsadm to interact with SP2003.

You might need to set up stsadm environment path or navigate to correct folder before execution. REF: https://blogs.technet.microsoft.com/sharepointcomic/2008/08/06/stsadm-path-access-stsadm-at-anytime-in-command-prompt/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.