Let's SharePoint

PowerShell
  1. HOME
  2. PowerShell
  3. How to update User Profile Picture in SharePoint 2013 using Powershell
April 10, 2015 / Last updated : April 10, 2015 Sethu PowerShell

How to update User Profile Picture in SharePoint 2013 using Powershell

User profiles and user profile properties provide information about SharePoint users currently present in the SharePoint environment. SharePoint User Profile and Users information can be imported from  Active Directory.

SharePoint Server 2013 provides the following APIs to work with User Profiles

1.Server Object Model

2.Client Object Model

a. .NET client object model
b. Silverlight client object model
c.Mobile client object model

3. REST API Services

In this article, I will discuss about the changing the existing user profile picture using Powershell commands. Below are the commands given below.

$spsite = New-Object Microsoft.SharePoint.SPSite($siteurl)
$spcontext = [Microsoft.Office.Server.ServerContext]::GetContext($spsite)

$UserProfManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($spcontext)
$myuser = “domainname\sethu”

if ($UserProfManager.UserExists($myuser))
{
$myprofile = $upm.GetUserProfile($myuser)
$myprofile[“PictureURL”].Value = “http://mysite/User%20Photos/Profile%20Pictures/user.jpg”;
$myprofile.Commit();
}
$spsite.Dispose()

Happy SharePointing 🙂

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)

Like this:

Like Loading...

Related

Categories
PowerShell, SharePoint 2013, and User Profile Services

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Most Popular Items is not Working for SharePoint Document Libraries and Lists
  • How to show List items in SharePoint 2013 Using REST API and Content Editor Web Part

Recent posts

How to insert table in Modern Pages using PnP Powershell in Office 365/Sharepoint Online?

June 7, 2019

How to set up Access Requests in SharePoint online using Powershell?

May 11, 2019

How to change the default SharePoint suite logo in SharePoint 2013/2016/2019?

April 30, 2019

How to add metadata to Document libraries in SharePoint online using powershell.

April 27, 2019

How to get Sharepoint site details using Powershell in Office 365?

April 17, 2019

How to get alerts for a specific policy in Cloud app security using Powershell

April 16, 2019

How to get the list of custom apps in App catalog using Powershell?

April 9, 2019

How to get the list of policies in Microsoft Cloud app security using window powershell?

April 4, 2019

How to get the list of List and Document library item counts in SharePoint online using Pnp Powershell ?

April 4, 2019

How to restore subsite in a Sharepoint online site collection using Pnp Powershell

April 2, 2019

Category

  • Anonymous access
  • Client Object Model
  • Client Side Object Model
  • Customization
    • Customization
  • Designer Workflows
  • Errors & Resolutions
  • Features
  • Google Analytics
  • InfoPath
  • Item Scheduling
  • JSOM
  • Nintex worflows
  • Office 365
  • Office 365 Groups
  • PnP JS Library
  • PowerShell
  • Powershell Online
  • REST API
  • REST API's
  • Server Side Object Model
  • SharePoint 2010
  • SharePoint 2010 Search
  • SharePoint 2013
  • SharePoint 2013 Search
  • SharePoint 2013 Workflows
  • SharePoint 2016
  • SharePoint 2019
  • SharePoint Designer
  • SharePoint Framework
  • SharePoint Online
  • SharePoint Pnp
  • SharePoint Usage Analytics
  • Unique values
  • User Profile Services
  • Windows Powershell
  • Workflow Manager

Archive

  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • January 2016
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • May 2015
  • April 2015
  • March 2015

Copyright © Let's SharePoint All Rights Reserved.

Powered by WordPress & Lightning Theme by Vektor,Inc. technology.

%d bloggers like this: