Showing posts with label Sub Sites. Show all posts
Showing posts with label Sub Sites. Show all posts

Saturday, 5 November 2016

Delete Site/site collections in bulk

Today I am providing the Power Shell Script that will delete multiple sites/site collections from the given list. List will be provided in the form of a csv file. The columns in csv file will be siteurl, type. Here in type, Provide s if given url is for sub site or sc for site collection.

.Inputs
Path - Provide csv file with path that will be used as input for this script.

.Outputs
Sites will be deleted as per the list in csv file.

Example-
.\scriptname.ps1
.\scriptname.ps1 | out-file “FilePath\Filename.txt”

Dependencies –
For executing this script user must be added in site collection administrators in the sites.
User should have Shell Admin rights to run the scripts.
Run Management Shell as an Administrator.
How to execute -
Copy this script and paste in Note pad.
Save this file as .ps1.
Run this script in SharePoint Management Shell. You can run this script in PowerShell as well.
Follow on screen instructions.

FOR ANY HELP ON THIS SCRIPT USE "GET-HELP .\SCRIPTNAME.PS1 --FULL" AFTER SAVING THIS FILE.


Go to above link to get the script.
Csv template link –




Thursday, 7 April 2016

Power Shell Scripts

In This blog you will found use full Power Shell Scripts

  1. Using Task Scheduler to automate PowerShell Scripts
  2. Safely Install/Uninstall/Update a SharePoint Solution
  3. Get List of all SharePoint's Web Applications, Site Collections, Sub sites, List/Library
  4. Download All items from SharePoint in Local Farm
  5. Download Content using filter on given Column in Given site and list
  6. Get the list of All Users and Groups of a given site
  7. Get the list of All Users and Groups of Local Farm
  8. Download All solutions (wsp files) in SharePoint
  9. Set Lock State in a Site Collection (Site is in Read Only Mode Solved)
  10. Enable/Disable Save Site as Template Option
  11. Enable/Disable Delete and Save List/Library as template option
  12. Create List/Library
  13. Clear Cache of all severs in one go
  14. Granting permissions to users and groups on item level
  15. Creating a normal or host named Site Collection on given database
  16. Creating a new Content database on a given web application
  17. Modify the Site url of content type hub in Managed Metadata service application
  18. Delete Site/Site collection in bulk using a csv file
  19. View Threshold limit issue in List/Library
  20. Enable Developer Dashboard
  21. Reset BLOB Cache 
  22. Find a given webpart in the given site collection
  23. Map User profile property for Ad Synchronization