Sunday, 6 November 2016

Download Content using filter on a given Column


Today I am providing the Power Shell Script that will download all the Documents of the given Library of given Site on the bases of filter on a given Metadata column. It is useful if you want to take backup of documents of SharePoint on the bases of some filter of Taxonomy column. Folder structure will be the same as in SharePoint and Site url will be converted as folder to identify the sites.

Script will accept the reports file path where it will create the folder and download the files there -

Inputs - Following are the Input for the script.

Web site - Url of the site where library exists
Library title - Title of the library that you want to download
File path - Path the files where script will download all the files.
Column - Internal name of the column where you want filter
Value - Value to be filtered

Outputs - 
Items of of the list will be downloaded under the name of the list folder

Dependencies -
For executing this script user must be added in site collection administrators in all 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.
Follow on screen instructions.



FOR ANY HELP ON THIS SCRIPT USE "GET-HELP .\SCRIPTNAME.PS1 --FULL" AFTER SAVING THIS FILE.https://drive.google.com/file/d/0BznVpoE_ln0ASGtLRlRWd1RWS1E/view?usp=sharing

Go to above link to get the script.

List of users and groups in a given site


Today I am providing the Power Shell Script that will display a list of all Security Group and Users and also can generate a txt file for the same

Inputs - 
Site URL - Url of the site for which you need the user and group list.

Outputs –
This script will display the list of all the groups and their users in the given site.

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

Dependencies -
For executing this script user must be added in site collection administrators in all 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.
Follow on screen instructions.



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

https://drive.google.com/file/d/0BznVpoE_ln0AY0pqYlB2aFBXRlE/view?usp=sharing

Go to above link to get the script.

List of users and groups in a complete Farm


Today I am providing the Power Shell Script that will display a list of all Security Group and Users in the local Farm and also can generate a txt file for the same

Inputs - No Input

Outputs –This script will display the list of all the groups and their users in the Local Farm.

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

Dependencies -
For executing this script user must be added in site collection administrators in all 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.
Follow on screen instructions.



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

https://drive.google.com/file/d/0BznVpoE_ln0AOEI0WENhTVVpQnM/view?usp=sharing

Go to above link to get the script.

Enable/Disable Save Site as Template


Today I am providing the Power Shell Script that will enable or disable Save site as template option on the given Site.

Inputs
Site URL - Url of the site that where you want to perform task
Option - Provide E for enable and D for disable the Save site as template.

Outputs
Save site as template on the given site will be enabled or disabled on the bases of given inputs.

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

Dependencies -
For executing this script user must be added in site collection administrators given site.
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.
Follow on screen instructions.

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

https://drive.google.com/file/d/0BznVpoE_ln0AcG1IcVJWMVlDVlk/view?usp=sharing

Go to above link to get the script.

Saturday, 5 November 2016

Enable/Disable Delete and Save List/Library as template option


Today I am providing the Power Shell Script that will enable or disable Delete and Save list/library as template on the given List/Library.

Inputs
Site URL - Url of the site that where you want to perform task
List - Where you want to perform the operation.
Option - Provide E for enable and D for disable the Save site as template.

Outputs
Delete and Save list/library as template on the given List/Library will be enabled or disabled on the bases of given inputs.

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

Dependencies -
For executing this script user must be added in site collection administrators given site.
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.
Follow on screen instructions.

FOR ANY HELP ON THIS SCRIPT USE "GET-HELP .\SCRIPTNAME.PS1 --FULL" AFTER SAVING THIS FILE.
https://drive.google.com/file/d/0BznVpoE_ln0AODZ0RVJiNkxGY3M/view?usp=sharing
Go to above link to get the script.
 Used when Delete option or Save List as template or Save Library as Template is not visible in a List or Library.

Create List/Library


Today I am providing the Power Shell Script that will create a new list/library on the bases of given custom template on the given site/subsite.

Inputs
Site URl - Url Where You want to create list
Title - Name of the List
Description - Description of the List
List Template - Template that will be used for creating the list

Outputs
This script will create a new list/library on the bases of given template and given url.

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

Dependencies -
For executing this script user must be added in site collection administrators given site.
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.
Follow on screen instructions.

FOR ANY HELP ON THIS SCRIPT USE "GET-HELP .\SCRIPTNAME.PS1 --FULL" AFTER SAVING THIS FILE.
https://drive.google.com/file/d/0BznVpoE_ln0ANWU2dG9saUl0SkU/view?usp=sharing
Go to above link to get the script.
This script can be used when a template is uploaded in the site and is hidden from Add new list page.

Set Lock State in a Site Collection


Today I am providing the Power Shell Script that will fire the lock state selected during execution on the given site collection.

Inputs
Site Collection - Url Where you want to apply the Lock State.
Lock State - The state that you want to set for the above url.

Outputs
This script will fire the lock state selected during execution on the given site collection.

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

Dependencies -
For executing this script user must be added in site collection administrators given site.
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.
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.

This Script is useful if the Site Collection has gone in read only mode because of any reason such as an interrupted backup process.