Saturday 14 December 2019

Creating a new Web Application Pool For hosting SharePoint Web application

Today I am providing the Power Shell Script that will create a new application pool that can be used with a SharePoint Web application as per user input and requirement.

Inputs
Username - User name as Domain\username that will be used as application pool identity.
Password - Password of application pool identity
Application Pool name - Name of the application pool that you want to create.

Outputs
Script will Create a new application pool on the Server where the script is executed. You have to run this script in all wfe servers where ever you web application will be executed with same application pool name and user name.

Example-
To show result in power shell screen
.\scriptname.ps1

Dependencies –
This script should be executed from a WFE Machine
Make sure SharePoint Management Shell, Powershell or Powershell ISE what ever you are using to run this script must be started as administrator.
For executing this script User must be a Local Machine Administrator.
How to execute -
Copy this script and paste in Note pad.
Save this file as .ps1.
Run this script in SharePoint Online Management Shell/Power shell/ Power shell ISE.
Follow on screen instructions.

Get the script from following link -
https://drive.google.com/file/d/1bKMsUnOQ8LCG45vGtpi7KJiL5dy2BEvz/view?usp=sharing

Wednesday 6 September 2017

Update List/Library url in SharePoint Online

Today I am providing the Power Shell Script that will update the Title and URL of a given List/library in a SharePoint online site as per user input and requirement.

Inputs
Username - User name to connect to the site. User should be global admin and must have full control on the site
Password - Password for the given user
siteURL - URL of the site where list/library exist
listtitle - Library title 
listtitlenew - Please enter the new display name for given list/Library. Enter same name as above if you dont want to change the title
newurl - Enter new url without space

Outputs
Script will update the title and url of the given list/library.

Example-
To show result in power shell screen
.\scriptname.ps1
 to get output in a file
.\scriptname.ps1 | out-file “FilePath\Filename.txt”

Dependencies –
This script sould be executed from a Machine where SharePoint Online Management Shell is installed.
Machine should be connected to Internet.
Make sure SharePoint Management Shell, Powershell or Powershell ISE what ever you are using to run this script must be started as administrator.
For executing this scipt User must be a global admin in Office 365 and must have contribute permission on the list/library.
How to execute -
Copy this script and paste in Note pad.
Save this file as .ps1.
Run this script in SharePoint Online Management Shell/Power shell/ Power shell ISE.
Follow on screen instructions.

FOR ANY HELP ON THIS SCRIPT USE "GET-HELP .\SCRIPTNAME.PS1 --FULL" AFTER SAVING THIS FILE.
https://drive.google.com/open?id=0BznVpoE_ln0AdFV0Y2kzLWt0c2s

Friday 20 January 2017

Find the size of your Farm, Web application, Site collection or the site

Today I am providing the Power Shell Script that is useful to show or get the size of each and every site and site collection as per user input and requirement.

Inputs
Other inputs - Script will ask different input on the basis of user choice. Please follow the instructions

Outputs
At the end of the script user will get the size of all sites/Site collection/web application/Farm.

Example-
To show result in power shell screen
.\scriptname.ps1
 to get output in a file
.\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.
https://drive.google.com/file/d/0BznVpoE_ln0AamFkQ0g2VlVYY00/view?usp=sharing

Saturday 14 January 2017

Upload files to SharePoint from a Client Machine


Today I am providing the Power Shell Script that is useful to upload all the files from a given folder to a given library from a client machine. This script does not need any power shell management shell or power shell remoting.

Inputs-
Destination Library - Enter the web url of the library where you want to upload files.
File path - Path the folder where the files are kept for uploading. All files in this folder will be uploaded in SharePoint library.
Credentials - as we are connecting to SharePoint we will need to provide credentials to upload files to library. User should have Contribute access to library and Read access to site.

Outputs-
All the files of given folder will be uploaded in the given library.

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

Dependencies –
For executing this script user must have read access on the site and contribute access on the Library.

How to execute -
Copy this script and paste in Note pad.
Save this file as .ps1.
Run this script in Power shell from any client machine where SharePoint is accessible.
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_ln0AdFV0Y2kzLWt0c2s/view?usp=sharing

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.