Showing posts with label update. Show all posts
Showing posts with label update. Show all posts

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.

Saturday, 5 November 2016

Properly Install/Uninstall/Update Sharepoint Solution


Today I am providing the Power Shell Script that will install, uninstall or update a SharePoint solution (wsp file) in SharePoint. It will also activate/deactivate the site collection, Web app feature in SharePoint web application/Site collection.

Inputs
Path - Provide log file path to save the logs of the script.
Action - Select option to be performed - 1 for update, 2 for Install or 3 for Uninstall
webapplication url - provide web application url for installing the wsp file and activating the feature.

Outputs
Solution will be installed, uninstalled and updated on the bases of selected option.if you are selecting uninstall or update solution a backup of existing wsp will be taken from SharePoint in log file path.

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

Dependencies –
Solution and script should be saved in same folder. it will install/uninstall all the solutions.
For activating/deactivating a feature, feature name should contain the name of wsp file in its name.
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.