1

I setup a task schedule to run ps1 to update photo store. I notice that photos aren't being updated. But when I to run the update-spprofilephotostore manually then photos are updated?

http://www.sysadminsblog.com/microsoft/scheduling-the-update-spprofilephotostore-command/

$mysitesUrl = "http://mysite.company.org"
$mySitesHost = Get-SPSite –Identity $mySitesUrl
Update-SPProfilePhotoStore –MySiteHostLocation $mySitesHost –CreateThumbnailsForImportedPhotos $true
0

http://www.brandonclaps.com/?p=37

I had to create a new schedule task instead of importing an existing one. I followed the above link and it worked. Also make sure Add-snapin sharepoint is in the sp1 file.

Add-PSSnapin Microsoft.SharePoint.PowerShell
Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation http://mysitehostlocation/MySite/

Save the file as a .ps1 file on your SharePoint 2010 server – C:\Scripts\UpdateSPPhotos.ps1

Create a daily scheduled task on the SharePoint 2010 server that runs at the SharePoint Farm Administrator account.

Configure the action as follows

Program/script: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

Arguments: -NonInteractive -NoProfile -File "C:\Scripts\UpdateSPPhotos.ps1"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.