As SP2016 farm administrator, I am trying to work on user profile with PowerShell. Found several examples that use
$profileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($context)
But when doing for each on the enumerator, I get the error:
UserProfileDBCache_WCFLogging :: ProfileDBCacheServiceClient.GetUserData threw exception: Access is denied.
I also added myself to the service with full control and I am SysAdmin on the SQL instance.