Friday, August 3, 2018

Find SharePoint Server Name hosting Central Admin site using powershell.

Took me sometime to figure this out. I am using two commands in a single line statement to fetch the server name which is hosting central administration website in a SharePoint farm.

Note-: Output of this will show you two servers in case you have configured central admin on two servers in a farm.


Get-SPServer |where {(Get-SPServiceInstance -Server $_.Address |Where {$_.Status -eq "online" -And $_.TypeName -eq "Central Administration"}) }


No comments:

Post a Comment