Friday, April 11, 2014

How to get the Central Admin Site URL in SharePoint Farm

Method1:

Get-ItemProperty -Path ‘HKLM:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\WSS\’ -Name CentralAdministrationURL | select CentralAdministrationURL

Method2:

Get-SPWebApplication -includecentraladministration | where {$_.DisplayName -eq "SharePoint Central Administration v4"} | select Url

Method3:

$caApp = [Microsoft.SharePoint.Administration.SPAdministrationWebApplication]::Local
$caurl = $caApp.Sites[0].Url

No comments:

Post a Comment