Getting error while creating Object of UserProfileManager RRS feed

  • Question

  • Hi All,

    We are running PowerShell script with Farm Account to create object of UserProfileManager but getting below user.

    Exception calling ".ctor" with "1" argument(s): "UserProfileApplicationNotAvailableException_Logging :: UserProfileApplicationProxy.ApplicationProperties ProfilePropertyCache does not have 18991fbb-6198-4555-bf0e-35c551583c6b"SPSite Url=https://mysite

    $context = Get-SPServiceContext($site) is also coming as 0000.

    Here is the script we are using

        $site = Get-SPSite "https://mysite"
        $context = Get-SPServiceContext($site)
        $pm = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($context)

    Can any buddy guide us on issue.

    Thanks in Advance!

    Thursday, February 18, 2016 4:12 PM

All replies

  • Do you have Full Control over the User Profile Service Application? Typically this is a permissions issue.

    Trevor Seward


    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Thursday, February 18, 2016 4:15 PM
  • Thanks Trevor,

    I am logged in server as using farm account and running powershell through farm account only.
    Farm account have full control to User Profile Service Application.

    Still its not working
    Thursday, February 18, 2016 4:24 PM
  • Hi Jaydev Deshmukn,

    For troubleshooting this issue, please check the things below:

    1. Check if the distributed cache account (AppFabric service account) has full control to the User Profile service. Since this Distributed Cache service would be running under a service account that was different from the farm account, try to run the PowerShell with the AppFabric service account. The Distributed Cache service is dependent on the AppFabric Caching Windows Service.

    2. Check IIS setting:

    1) Open IIS manager and click on the server name.

    2) Double-click Authentication

    3) Click Anonymous Authentication and click the Edit link.

    4) Select the “Specific User:” option and click the Set button

    5) Check whether IUSR lists there.

    If not, enter “IUSR” (without quotes) as the user name and do not provide a password. Click ok to apply that change at the IIS level and all inheriting levels.

    A blog with the similar issue for your reference:


    Best regards,

    Linda Zhang

    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Friday, February 19, 2016 7:51 AM