Domanda

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.

È stato utile?

Soluzione 2

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.

Altri suggerimenti

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?

Can you check this post for a detailed understanding?

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top