Tag Archives: Central Admin

SharePoint 2010–Use PowerShell to Provision a Central Admin site

Recently I was working on a SharePoint 2010 farm where I accidently removed the last server that hosted Central Admin.  Whoops!  Now I had a farm with no Central Admin UI.  Now the Central Admin SharePoint Service is installed on every WFE by default, but is only enabled on the machines that you identify.  I went ahead tried to run the psconfig on the server and tried to re-add it, however the install checks were telling me that it could not be joined due to a patch level inconsistency (more on that in a different post).  End result was that I was sitting with a farm that did not have a Central Admin site configured…

The following PowerShell command will provide a list of all servers that have the Central Administration service installed, their status, and the Id:

Get-SPServiceInstance | Where-Object {$_.TypeName -eq 'Central Administration'}

TypeName Status Id
——– —— –
Central Administration Disabled 2d35f287-8d0f-4474-8a38-2dc2365c06e7
Central Administration Disabled 2052cc79-fce8-483a-83e4-9802db535237

The service instance can be started using the following PowerShell command, again restricted to the Id of the service instance I want.  Doing this will provision Central Admin on the WFE that it correlates with:

Get-SPServiceInstance | Where-Object {$_.Id –eq ‘2d35f287-8d0f-4474-8a38-2dc2365c06e7’} | Start-SPServiceInstance

Get-SPServiceInstance | Where-Object {$_.Id –eq ‘2052cc79-fce8-483a-83e4-9802db535237’} | Start-SPServiceInstance

This will start provisioning the service instance, which usually means creating the Central Administration website on the web front-end and starting the central admin service instance.  Given a minute or two, the Central Admin will appear on the WFE and can be accessed using the normal http://<machine name>:<admin port> standard.

SharePoint 2010 – Change the Central Admin Port Number

I always try to standardize here I can to make my life easier.  When setting up SharePoint you can choose the port number for Central Admin.  I always suggest using the same port number whenever possible.  So what about when you’re working for a company that already has several SharePoint farms set up?

Our trust PowerShell once again comes to the rescue.  Using the Set-SPCentralAdministration cmdlet, you can change the port hosting your Central Administration web application.

Set-SPCentralAdministration –Port 7000

You can read more about the Set-SPCentralAdministration cmdlet here: http://technet.microsoft.com/en-us/library/ff607832.aspx

While I usually have my farms’ Central Admins bookmarked, sometimes when I’m on a remote computer I just want to type in the address and add the my standard central admin port.  Thanks to PowerShell I can quickly and easily remember my standard port without having to rely on bookmarks.