views:

610

answers:

1

I am looking to get the GUID of the Central Administration page in SharePoint but not sure how I can get it, any help would be appreciated.

I need to be able to get this dynamically using the API / Object Model

Thanks

Phill

+4  A: 

Try

Microsoft.SharePoint.Administration.SPAdministrationWebApplication

SPAdministrationWebApplication adminWebApp = (SPAdministrationWebApplication)SPWebApplication.Lookup(myUri);

SPAdministrationWebApplication.Local

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spadministrationwebapplication.aspx

John Liu
Thank you John, I will check it out once I have fixed a bug I am working on (D'oh!)
Phill Duffy
SPAdministrationWebApplication.Local.Sites[0].ID , thanks
Phill Duffy