Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question
    
is contoso\janedow right? fake users are typically janedoe. –  PirateEric Dec 7 '11 at 16:52
    
@PirateEric The TechNet article used janedow, for whatever reason. As stated, I changed it for use within my organization. –  LCountee Dec 7 '11 at 17:15
add comment

3 Answers

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?

share|improve this answer
    
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. –  LCountee Feb 1 '12 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. –  Sebastian Zander Feb 1 '12 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 Feb 1 '12 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. –  Sebastian Zander Feb 1 '12 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. –  LCountee Feb 2 '12 at 15:17
show 1 more comment
up vote 1 down vote accepted

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.

share|improve this answer
add comment

Can you check this post for a detailed understanding?

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

share|improve this answer
    
I have read that post. It does not help with the error I'm getting. –  LCountee Dec 7 '11 at 16:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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