Get SharePoint Central Admin URL in PowerShell

In PowerShell script writing, I had to get the central admin URL of the SharePoint farm. Tried various approaches and found the below to get SharePoint 2010/SharePoint 2013 Central Administration site URL using PowerShell:

#sharepoint 2010 powershell get central admin url
Get-SPWebApplication -includecentraladministration | where `
  {$_.IsAdministrationWebApplication} | Select -ExpandProperty URL

Alternatively,  you can use:

[Microsoft.SharePoint.Administration.SPAdministrationWebApplication]::Local.URL

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

One thought on “Get SharePoint Central Admin URL in PowerShell

  • Do you know if this works with SharePoint 2016? I ran it in Powershell and Powershell ISE on one of the web servers, but it returned errors. Can I run it on any server in the farms to get the URL or does it have to be on the one hosting CA? Thank you

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *