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.