Showing posts with label PowerShell. Show all posts
Showing posts with label PowerShell. Show all posts

Sunday, December 28, 2014

Tune your SharePoint Farm for better performance Part 3: Warm-Up your farm every morning

One of the best recommendations to improve performance in your farm is to run warm-up script every morning.

I recommand the script of  Jeff Jones  :  https://spbestwarmup.codeplex.com/


I use it every morning after resetting IIS, the script can also create a daily planified task in Task Scheduler.

See Also:

Tune your SharePoint Farm for better performance Part 2

Tune your SharePoint Farm for better performance Part 1





Wednesday, December 3, 2014

How do I import active directory photos and sync them with my site collections?

Be sure that you have basic user profile synchronization working:


1- Import PictureUrl mapping: Go to your Central Admin site "Manage Service Applications --> User Profile Service Application --> Manager User Properties --> Picture" and select "thumbnailPhoto" as the attribute. Choose the "Import" direction". Be sure that the edit settings are "Do not allow users to edit values for this property" if you do not want photos from SharePoint Site to export to active directory. Click "OK".


2- Run a full profile sync: on the central admin site go to "Manage Service Applications -> User Profile Service -> Start profile synchronization" and select "Full".


3- Give your user permission to push photos to MySite : Go to Central Admin --> "Manage Service Applications". This time select the "User Profile Service Application" row and not the link. On the ribbon go to "Service Applications --> Sharing --> Permissions". Add your user account and give it "Full Control" permission.


4- Push the photos to MySite - This step requires that you have a MySite setup (Setup MySite). Open a powershell window and enter


Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation "http://YourServerName/my"


Enjoy...


Tuesday, February 11, 2014

New Web Part not appearing in Web Part Gallery - SharePoint

A recurrent problem is that new webparts doesn't appear after deployment on the SharePoint server

First of all be sure that your new webparts are included in the feature (left side) and that the scope of your feature is right

You tried to update your solution.wsp  :

Update-SPSolution –Identity solution.wsp –LiteralPath “C:\solution.wsp” –GacDeployment


You  tried to retract , delete and then add and install your solution but no result :

Uninstall-SPSolution –Identity solution.wsp –WebApplication http://mysite/  

Remove-SPSolution –Identity solution.wsp 

Add-SPSolution -LiteralPath C:\sharedfolder\Release\solution.wsp

Install-SPSolution -Identity "solution.wsp" -webapplication "http://mysite/" -GACDEployment



The solution for this problem is to disable your feature before retracting and then enabling it after installation :



Disable-SPFeature -Identity solution_Feature1 -url "http://mysite/" 

Uninstall-SPSolution –Identity solution.wsp –WebApplication http://mysite/  

Remove-SPSolution –Identity solution.wsp 

Add-SPSolution -LiteralPath C:\sharedfolder\Release\solution.wsp.wsp

Install-SPSolution -Identity "solution.wsp" -webapplication "http://mysite/" -GACDEployment

Enable-SPFeature -Identity solution_Feature1 -url "http://mysite/"

Wednesday, January 22, 2014

How to stop deployment or retraction of your solution- Sharepoint 2013

To stop current deployment you can use the Stsadm tool for command-line administrationYou must be an administrator on the local computer to use Stsadm.

Stsadm is located at the following path on the drive where SharePoint Products and Technologies is installed: C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\BIN



two steps for this :

******** To see the deployment-status (pending etc.):
stsadm -o enumdeployments

******** To cancel the deployment:
stsadm -o canceldeployment –id “id”


Tuesday, January 21, 2014

Some PowerShell cmdlets that help you manage features and solutions in a SharePoint 2013 farm

Programmer , administrator , architect you need at least these cmdlets to manage your solution and deployement

-- To check the deployment status and the last operation done
Get-SPSolution | Select Name, LastOperationResult, LastOperationEndTime, LastOperationDetails

Add-SPSolution -LiteralPath C:\MySolution.wsp

Install-SPSolution -Identity "MySolution.wsp" -webapplication "http://Siteurl" -GACDEployment 

Enable-SPFeature  -Identity MySolution_Feature1 -url "http://Siteurl "

Update-SPSolution  –Identity MySolution.wsp –LiteralPath “C:\MySolution.wsp” –GacDeployment

-- Disable Feature from Web Application
Disable-SPFeature  -Identity MySolution_Feature1 -url http://Siteurl 

-- Remove Web Part from Web Application
Uninstall-SPSolution –Identity MySolution.wsp –WebApplication http://Siteurl

Remove-SPSolution –Identity MySolution.wsp

-- Remove Solution from Central Administration
Remove-SPSolution "MySolution.wsp"

--To see all features for a Web Application:
Get-SPFeature -WebApplication http://Siteurl 

--To see all features for a Site Collection:
Get-SPFeature -Site http://sitecollection

--To see all features for a Site:
Get-SPFeature -Web http://siteurl

//Remove Solution from All Web Application
Uninstall-SPSolution -Identity SPEnableDeploy.wsp -allwebapplications

//Remove Solution from Central Administration using Force Command
Remove-SPSolution -Identity MySolution.wsp -force

//Again Add Solution 
Add-SPSolution  -LiteralPath C:\MySolution.wsp

//Install Solution using Force Command
Install-SPSolution -Identity TestWebPart.wsp -webapplication http://Siteurl -GACDeployment -force

 I hope it will help you...