Friday, 9 December 2016

Get list of Master Pages in Current Farm or in selected Site/Site Collection

Today I am providing the Power Shell Script that is useful to find out all the used master pages(custom/outofbox) in complete (selected site/farm) as per user input.

Inputs
Path - Enter the file name with path to save the report (Enter file name with csv extension)
Other inputs - Script will ask different input on the basis of user choice. Please follow the instructions

Outputs
A CSV file will be generated with the URL of sites and the master pages used in the site.

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

Dependencies –
Run this script with Farm Account. Farm account is the user who installed SharePoint.
User should be Site collection administrator 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. You can run this script in PowerShell as well after adding SharePoint snapin (Add-pssnapin *.sharepoint.*).
Follow on screen instructions.

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

Thursday, 8 December 2016

Generate deployed solutions lists in the farm (OOB and custom)

Today I am providing the Power Shell Script that will find out a given solution in a given hive in the farm.

Inputs
Path - Provide log file path to save the solution report.
Installation Hive - Enter the hive (14/15) to get the solutions installed for that hive, you can enter * for getting list of all solutions in all hives
Solution name - Enter the Solution name, Name is case sensitive (Use wild card (*) if you want to match a particular string in name like you can use *bp* to get the list of all page that contains any solution which contains bp in its name or provide * to get the list of all solutions

Outputs
A CSV file will be generated with the name of solutions and their installed hives with solution ID.

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

Dependencies –
Run this script with Farm Account. Farm account is the user who installed SharePoint.
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.

Wednesday, 16 November 2016

Changing the Style in a view of List/Library using powershell

Today I am providing the Power Shell Script that give the report of the style applied on a view and will update the view style as per user choice. To know the details of styles available in view visit this link http://splimitationsbyabhi.blogspot.in/2016/11/view-style-in-sharepoint-listlibrary.html
This script can also be used to update the view style to default using script. 


Inputs
Site collection URl - Where you want to change the style or report will be generated for this site collection only.
List name - Where this change will be applied or report will be generated for the selected list. (Name is case sensitive) (Use Wild card (*) if you want to match a particular string in name like we can use *bp* and you get list of all List that have bp in their names), Alternatively you can use * as input to get the list of all list and library.
View name - Where this change will be applied or report will be generated for the selected View. (Name is case sensitive) (Use Wild card (*) if you want to match a particular string in name like we can use *bp* and you get list of all List that have bp in their names), Alternatively you can use * as input to get the list of all list and library.
Path - Report file path with file name and extension as .csv
Option - Enter R for getting the report of View Style and U for updating the View Style
Styleid - Style Id to be applied if you want to update the Style (Enter d for default) visit http://splimitationsbyabhi.blogspot.in/2016/11/view-style-in-sharepoint-listlibrary.html for style id.

Outputs
A report with applied style will be generated and if user want this script will update the Style in the views.

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

Dependencies –
User should have Site Collection Admin rights for executing this script.
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.

Sunday, 6 November 2016

Export list of all Web applications, Site Collections and their sub sites and their List/library and their columns in a sharepoint farm


Today I am Providing the Power Shell Script that will create a csv file that contain the list of all Web applications, Site Collections and their sub sites and their List/library and their columns in current SharePoint farm where the script will be executed.

Script will accept the reports file path where it will generate the csv files with following names -

Inputs - Following are the Input for the script.

Report File Path - Path for saving the files.
Report Type - Select for the types of the reports.
W for Web Applications
SC for Site Collections
SS for Sub Sites
L for Lists
C for Columns

I for Items
A for All Reports
Outputs - Following output files will be generated on provided Report File Path and Report Type.
Webapplications.csv - List of all Web applications
Sitecollection.csv - List of All site collections of all the Web Applications
Subsites.csv - List of All Sub Sites of All Site Collections of all the Web Applications
Lists.csv - List of All lists of All Sub Sites of All Site Collections of all the Web Applications 
Columns.csv - List of all Columns of All lists of All Sub Sites of All Site Collections of all the Web Applications
List of items will be crated with the name of the their respective list/library in their respective folder according to their respective site URL in the given path.

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.

Download all files of the Sharepoint farm


Today I am providing the Power Shell Script that will download all the documents of all the Libraries under each sites/site collections/web application in to your file system. It is useful if you want to take backup of SharePoint in current SharePoint farm where the script will be executed. 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.

Report File Path - Path for saving the files.


Outputs - 
Following output files will be generated on provided Report File Path, with their respective name and under the folder structure of the site.

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_ln0ARjRGXzZfWHBYdDA/view?usp=sharing

Go to above link to get the script.

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.