R – How to delete a sharepoint web application using stsadm tool

sharepoint

Is there a command to delete the entire web application (database, iis sites etc) using the Sharepoint admin tool?

I know the same can be done in the central admin, but i have a need to automate this process as we want our build servers to rebuild the sharepoint site from scratch each night.

Best Answer

You should be able to do that with the stsadm unextendvs operation.

stsadm -o unextendvs -url http://MySite -deletecontent -deleteiissites
Related Topic