0

I want to manually set my organization's leader in SharePoint, using the following script from TechNet. I modified the script to have the correct user profile service application proxy ID, and the correct username.

$upaProxy = Get-SPServiceApplicationProxy 1232b6f7-b9ff-99ad-0cd0-fg1g67h981aq
Add-SPProfileLeader -ProfileServiceApplicationProxy $upaProxy -Name "contoso\janedow"

Seems simple enough, but when I run the script I get an error: "Object reference not set to an instance of an object." What am I doing wrong?

EDIT: This turns out to have been a permissions issue. Once I logged in under an account with higher permissions, the script in my post ran successfully.

2
  • is contoso\janedow right? fake users are typically janedoe. Commented Dec 7, 2011 at 16:52
  • @PirateEric The TechNet article used janedow, for whatever reason. As stated, I changed it for use within my organization.
    – LFurness
    Commented Dec 7, 2011 at 17:15

3 Answers 3

1

LCountee, you wrote that you needed an account with higher permissions. What exact permissions are we talking about? I tried the same with a dedicated Farm Administrator account as well as with my Domain Administrator account that is member of Farm Administrators. I still get the object reference error/null reference exception for both the following commands:

Get-SPProfileLeader -ProfileServiceApplicationProxy $upap
Add-SPProfileLeader -ProfileServiceApplicationProxy $upap -Name domain\coleader

My $upap variable fully returns

Name                 Type                 Id
----                 ----                 --
Benutzerprofildie... Benutzerprofildie... 2106980f-ebff-4a58-82a3-15dc293d0372

where "Benutzerprofildienst-Anwendung(sproxy)" means "User Profile Application (Proxy)"

Any idea what could be wrong instead of the permissions?

6
  • The problem wasn't the level of SharePoint permissions, but rather network permissions. I think the account I originally used either wasn't a domain admin or didn't have enough Active Directory privileges. Also make sure you are running PowerShell as an administrator.
    – LFurness
    Commented Feb 1, 2012 at 14:40
  • @LCountee, thank you for your answer. This is what I don't understand - I ran everything either as a domain or farm administrator; the PowerShell too and from the server directly. It doesn't work nonetheless. I work with SharePoint Server version 14.0.6029.1000 and 14.0.6106.5001 to some extent. Commented Feb 1, 2012 at 14:47
  • If you have a new question, please ask it by clicking the Ask Question button. See How do I ask questions here? for further help.
    – SPDoctor
    Commented Feb 1, 2012 at 15:36
  • It is no new question, since this one here is not really solved. I have the exact some problem, the same symptom. Even if there are more than one solution, they are still to the same question. Commented Feb 1, 2012 at 15:58
  • Sorry, but I don't have any further insight. I would recommend posting a new question as @SPDoctor suggests. Best of luck to you.
    – LFurness
    Commented Feb 2, 2012 at 15:17
1

This turns out to have been a permissions issue. Once I logged in under an account with higher permissions, the script in my post ran successfully.

Edit: To clarify, the problem wasn't the level of SharePoint permissions, but rather network or Active Directory permissions.

0

Can you check this post for a detailed understanding?

http://www.harbar.net/archive/2011/07/06/329.aspx

1
  • I have read that post. It does not help with the error I'm getting.
    – LFurness
    Commented Dec 7, 2011 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.