Sharepoint - How to change the user profile property value for all users via PowerShell?

You can iterate through all user profiles and update them. The PowerShell script can look like this:

[void][reflection.assembly]::Loadwithpartialname("Microsoft.Office.Server"); 
Add-PSSnapin Microsoft.SharePoint.PowerShell

$site=Get-SPSite "https://yourSitecCollection"
$serviceContext = Get-SPServiceContext $site;            

$upm = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($serviceContext);            
$userProfile = $upm.GetUserProfile("[email protected]");

foreach($userProfile in $upm)
{
  $userProfile["PropertyName"].Value = "Test Value";   
  $userProfile.Commit()
}

Tags:

Powershell