Get a UserProfile
[void][reflection.assembly]::Loadwithpartialname(“Microsoft.Office.Server”);
$site=new-object Microsoft.SharePoint.SPSite(“http://sharepoint-site-url”);
$serviceContext = Get-SPServiceContext $site;
$site.Dispose();
$upm = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($serviceContext);
$userProfile = $upm.GetUserProfile(“domain\username”);Set property value
$userProfile[“property_internalname”].Value = “property value”;
$userProfile.Commit();

![[FIX] BizTalk Server 2010, 2013, 2013 R2 & 2016 errors “Class not registered (WinMgmt)” or “Access denied”](https://blogit.create.pt/wp-content/uploads/2018/07/access-black-and-white-blur-270514-218x150.jpg)




















