This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Add-UserProfilePicture | |
{ | |
<# | |
.Synopsis | |
This is a simple approach to uploading a binary file into an active directory users AD object. | |
.Example | |
C:\> Add-UserProfilePicture -user "Joe Bloggs" -picture "C:\images\Joe_Bloggs.jpg" | |
.Notes | |
Name: Add-UserProfilePicture | |
Author: Petro Margaritis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you are unsure what the names of your OABs you can run the following command | |
Get-OfflineAddressBook | |
# This will list all of the attributes for the OAB | |
(Get-OfflineAddressBook “Default Offline Address Book”).ConfiguredAttributes | sort-Object name, type | |
# If you want to change the type assigned to the ThumbnailPhoto, you will first need to remove it | |
($thumbAtt = (Get-OfflineAddressBook "Default Offline Address Book").ConfiguredAttributes).Remove("thumbnailphoto,Indicator") | |
# Update the Offline Address Book | |
Set-OfflineAddressBook "Default Offline Address Book" -ConfiguredAttributes $thumbAtt | |
# Add the new type for the thumbnailPhoto attribute | |
$thumbAtt.Add("thumbnailphoto,Value") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This will create thumbnails from the user profile images saved in the My Sites User Profile pictures library | |
Update-SPProfilePhotoStore –MysiteHostLocation http://mysites -CreateThumbnailsForImportedPhotos 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Restart-SPTimerService | |
{ | |
<# | |
.Example | |
C:\>Restart-SPTimerService -serverName "SharePoint1" | |
This script will restart the Timer Server on the nominated server (-serverName) and will created a log.txt file with the result | |
.Notes | |
Name: Restart-SPTimerService | |
Author: Petro Margaritis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$BDCProxy = Get-SPServiceApplicationProxy | where | |
{ | |
$_.GetType().FullName -eq ('Microsoft.SharePoint.BusinessData.SharedService.' + 'BDCServiceApplicationProxy') | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-SPBusinessDataCatalogThrottleConfig –Scope Database –ThrottleType Items –ServiceApplicationProxy $BDCProxy | Set-SPBusinessDataCatalogThrottleConfig –Maximum 100000 –Default 50000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-SPBusinessDataCatalogThrottleConfig –Scope Database –ThrottleType Items –ServiceApplicationProxy $BDCProxy |