Forum Discussion

LadislavStupak's avatar
LadislavStupak
Brass Contributor
Aug 13, 2021
Solved

PowerShell - SharePoint Server - User Profiles - Access denied

Dear Colleagues,   I can not access User Profiles from SharePoint 2019 on premise through PowerShell.   I am DB Owner on the User Profile Database and Loacal Administartor on the Windows Servers ...
  • LadislavStupak's avatar
    Aug 18, 2021
    1. Add-SPShellAdmin

    I ran Add-SPShellAdmin:

    Get-SPDatabase | ? {$ _. Name -eq "UserProfile Database Name"} | Add-SPShellAdmin -Username Domain\LoginName

    On sharepointcommunity.de I have received a hint for it:
    http://sharepointcommunity.de/forums/p/45151/110614.aspx#110614

    2. User Profile Service Application - Permissions

    I have assigned myself Full Control rights in Central Administration in the User Profile Service Application under Sharing - Permissions.

    (As an administrator, I had already set myself up in the User Profile Service Application. That was not enough.)



    Now I can run the scripts through the user profiles.

Resources