Link to home
Start Free TrialLog in
Avatar of Member_2_6492660_1
Member_2_6492660_1Flag for United States of America

asked on

Sharepoint 2010 Health Report need help with

SharePoint 2010 SP2 Farm 64 bit


Title  People search relevance is not optimized when the Active Directory has errors in the manager reporting structure.
Severity 2 - Warning  
Category Configuration  
Remedy Specify the company leaders explicitly. Use the following PowerShell commands: $upap = Get-SPServiceApplicationProxy [appid]; Add-SPProfileLeader $upap [Domain]\[UserName]. Run 'Get-SPProfileLeader $upap' to check whether the leader was successfully added. As a last step, run a full crawl on the content source containing the start address (URL) of the user profile application. For more information about this rule, see "http://go.microsoft.com/fwlink/?LinkID=2401800".
Failing Servers    
Failing Services UserProfileService
Rule Settings View  

Found this

http://sharepoint.stackexchange.com/questions/19233/how-do-i-fix-people-search-relevance-is-not-optimized-when-the-active-directory


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

Ran this

PS C:\> Get-SPProfileLeader -ProfileServiceApplicationPro
xy $upaProxy
Get-SPProfileLeader : Cannot validate argument on parameter 'ProfileServiceAppl
icationProxy'. The argument is null. Supply a non-null argument and try the com
mand again.
At line:1 char:52
+ Get-SPProfileLeader -ProfileServiceApplicationProxy <<<<  $upaProxy
    + CategoryInfo          : InvalidData: (:) [Get-SPProfileLeader], Paramete
   rBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Offic
   e.Server.UserProfiles.PowerShell.SPCmdletGetLeader

PS C:\> Add-SPProfileLeader $upap mydom\spserv
Add-SPProfileLeader : Cannot validate argument on parameter 'ProfileServiceAppl
icationProxy'. The argument is null. Supply a non-null argument and try the com
mand again.
At line:1 char:20
+ Add-SPProfileLeader <<<<  $upap mydom\spserv
    + CategoryInfo          : InvalidData: (:) [Add-SPProfileLeader], Paramete
   rBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Offic
   e.Server.UserProfiles.PowerShell.SPCmdletAddLeader

PS C:\>


What am I missing?

Thanks

Tom
Avatar of Mohit Nair
Mohit Nair
Flag of India image

I am not sure if you executed the script properly.
Please execute this way
Get-SPServiceApplicationProxy   (This will list the GUID for the proxy. Copy the GUID for User profile service application)

$upaProxy = Get-SPServiceApplicationProxy <AppId> (Appid you would get from Step 1)

Get-SPProfileLeader -ProfileServiceApplicationProxy $upaProxy (This will return the Company Leader names)

Add-SPProfileLeader -ProfileServiceApplicationProxy $upaProxy -Name "<Domain\UserName>"

Replace the username with the one listed from Step 3.  If there is more than 1 users repeat step 4.
Avatar of Member_2_6492660_1

ASKER

Mohit

Thanks for the update

I ran that and it shows this see attached

Which one shoud I use ? All of them?  or just one?

Also I installed teamviewer on the server I am ready when ever you are
getsp.txt
Did you get this output on executing the first script ? Are you using SharePoint management shell ?
Mohit

Did you get this output on executing the first script ?
yes ran this  Get-SPServiceApplicationProxy     and the output was in the attached txt file above

Are you using SharePoint management shell ?   YES
Run this.. This is ur app id and then follow the other steps
$upaProxy = Get-SPServiceApplicationProxy 898a761d-8bf1-4bdd-bd7c-9ee19838906d
Mohit

here are the results it found a null is that correct?

PS C:\> get-spserviceapplicationproxy

DisplayName          TypeName             Id
-----------          --------             --
Business Data Con... Business Data Con... 2fc857a3-b913-49ef-a061-dc6a2b9dfdb6
Word Automation S... Word Automation S... 6189fcae-9eac-4da1-97f2-23c180dc27f7
State Service        State Service Proxy  e5d6b655-96cb-4a0c-be16-48cd98efc718
Access Services      Access Services W... 54f415ed-a12a-4e94-a473-1a938b1c1139
Application Regis... Application Regis... 0e22602a-ab01-46f8-be04-9891bb65c17e
Managed Metadata ... Managed Metadata ... e09bcabf-5848-4ad0-8d1b-2771e734d895
PerformancePoint ... PerformancePoint ... 23335d88-2628-457a-915a-86ac5a49286f
Secure Store Service Secure Store Serv... 180928d5-d05e-4107-a88c-168cc26ed5f2
Search Service Ap... Search Service Ap... 75ca7371-105f-44d9-a9b6-fd31034b33ab
Web Analytics Ser... Web Analytics Ser... 9d10b74f-146f-4ca3-9791-320235b918d5
Application Disco... Application Disco... cb1bf63a-8d7a-40d1-bd2d-5054d535b5fd
User Profile Serv... User Profile Serv... 898a761d-8bf1-4bdd-bd7c-9ee19838906d
Connection to TGC... Visio Graphics Se... b5bd6b5a-9a88-4121-8ac8-f6676c80c87b
Visio Graphics Se... Visio Graphics Se... c629ff28-7b05-4181-8969-ea6dbb2ae368
Excel Services Ap... Excel Services Ap... 510a433c-3b12-49d2-ae77-fcc67ce6c6ce
Usage and Health ... Usage and Health ... 399aadc5-2df5-460f-a311-ff819a7a1b9e


PS C:\> $upaproxy = get-spserviceapplicationproxy 898a761d-8bf1-4bdd-bd7c-9ee19838906d
PS C:\>
PS C:\> get-spprofileleader -profileserviceapplicationproxy $upaproxy
get-spprofileleader : No User Profile Application available to service the request. Contact your farm administrator.
At line:1 char:20
+ get-spprofileleader <<<<  -profileserviceapplicationproxy $upaproxy
    + CategoryInfo          : InvalidData: (Microsoft.Offic...CmdletGetLeader:
   SPCmdletGetLeader) [Get-SPProfileLeader], UserProfileAppl...ilableException
    + FullyQualifiedErrorId : Microsoft.Office.Server.UserProfiles.PowerShell.
   SPCmdletGetLeader

PS C:\>

If this is correct then next step is to add
Add-SPProfileLeader -ProfileServiceApplicationProxy $upaProxy -Name "<Domain\UserName>"

But no name was given

Thoughts?
ASKER CERTIFIED SOLUTION
Avatar of Mohit Nair
Mohit Nair
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Mohit

Should I do that for all the services?
I added it to User Profile Service application is that all I need?
Mohit

ran it again same results

PS C:\> $upaproxy = get-spserviceapplicationproxy 898a761d-8bf1-4bdd-bd7c-9ee19838906d
 PS C:\>
 PS C:\> get-spprofileleader -profileserviceapplicationproxy $upaproxy
 get-spprofileleader : No User Profile Application available to service the request. Contact your farm administrator.
 At line:1 char:20
 + get-spprofileleader <<<<  -profileserviceapplicationproxy $upaproxy
     + CategoryInfo          : InvalidData: (Microsoft.Offic...CmdletGetLeader:
    SPCmdletGetLeader) [Get-SPProfileLeader], UserProfileAppl...ilableException
     + FullyQualifiedErrorId : Microsoft.Office.Server.UserProfiles.PowerShell.
    SPCmdletGetLeader

 PS C:\>


I added spfarm to User Profile Service Application full rights also my user id has full rights

thoughts
Mohit

Update

I did more research on this and found what I was missing I forgot to add the user that I am logged onto the SP server.
That account is the domain admin account I added that account to the permissions

Now when I run

PS C:\> $upaproxy = get-spserviceapplicationproxy 898a761d-8bf1-4bdd-bd7c-9ee19838906d
PS C:\> get-spprofileleader -profileserviceapplicationproxy $upaproxy
PS C:\>

Looks like I got past the errors but no output was given it did not list any Company Leader names


Thoughts?
Mohit

Ran this and now it is working

$upaProxy = Get-SPServiceApplicationProxy 7643a5c2-a6ae-49eb-8ba0-de2f32a890ba

Add-SPProfileLeader -ProfileServiceApplicationProxy $upaProxy -Name "our\thomas r grassi jr"
 
Get-SPProfileLeader -ProfileServiceApplicationProxy $upaProxy
 

PS C:\> $upaproxy = get-spserviceapplicationproxy 898a761d-8bf1-4bdd-bd7c-9ee19838906d
PS C:\> Add-SPProfileLeader -ProfileServiceApplicationProxy $upaProxy -Name "xxx\thomas r grassi jr"

Confirm
Are you sure you want to perform this action?
Performing operation "Add-SPProfileLeader" on Target "our\thomas r grassi jr".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help
(default is "Y"):y
User 'xxx\thomas r grassi jr' added as a leader.
PS C:\> Get-SPProfileLeader -ProfileServiceApplicationProxy $upaProxy

AccountName                       Valid ManagerAccountName          ReportCount
-----------                       ----- ------------------          -----------
xxx\thomas r gra...                True                                       0


PS C:\>


Now need to run a full crawl


Thanks
I asked to add both the users i.e farm admin and also your account . As per your previous reply , you added your account as Profile Leader which is fine.
Do let me know if the error repeats.
Mohit

Just checked all is well with this problem.

I updated all my active directory users that are using SharePoint at this time with the manager information in
They all report to me.

Will add the remainder later,

I can add the farm account as well but right now that account reports to me also.

I think it is better to have more than one as you indicated.

Thanks again
Mohit

Trying to add SPFARM now
PS C:> $upaproxy = get-spserviceapplicationproxy 898a761d-8bf1-4bdd-bd7c-9ee19838906d

PS C:\> Add-SPProfileLeader -ProfileServiceApplicationProxy $upaProxy -Name "xxx\spfarm"

Confirm
Are you sure you want to perform this action?
Performing operation "Add-SPProfileLeader" on Target "xxx\spfarm".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help
(default is "Y"):y
Failed. User 'xxx\spfarm' does not exist.


What am I missing here

You can check this out via TeamViewer?