DeleteSite: function () {
var count=siteUrlArray.length;
var i = 0;
for (i = 0; i < siteUrlArray.length; i++) {
var url = siteUrlArray[i];
var clientContext = new SP.ClientContext(url);
var oweb = clientContext.get_web();
oweb.deleteObject();
}
clientContext.executeQueryAsync(function () { alert("Total site deleted= "+count); }, function () { });
}
-------------
Above functions shows how to delete multiple sites using ECMA Script. If any one is aware of bulk delete by JSOM using REST API plz do share.
var count=siteUrlArray.length;
var i = 0;
for (i = 0; i < siteUrlArray.length; i++) {
var url = siteUrlArray[i];
var clientContext = new SP.ClientContext(url);
var oweb = clientContext.get_web();
oweb.deleteObject();
}
clientContext.executeQueryAsync(function () { alert("Total site deleted= "+count); }, function () { });
}
-------------
Above functions shows how to delete multiple sites using ECMA Script. If any one is aware of bulk delete by JSOM using REST API plz do share.