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
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.
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.