Share via


SPGlobalAdmin Class

The SPGlobalAdmin class represents the top-level object for administration of a Microsoft Windows SharePoint Services deployment.

System.Object

   Microsoft.SharePoint.Administration.SPGlobalAdmin

Public Constructors

The following table shows the public constructors of the SPGlobalAdmin class and a brief description of each.

Name Description
SPGlobalAdmin Initializes a new instance of the SPGlobalAdmin class.

Public Fields

The following table shows the public fields of the SPGlobalAdmin class and a brief description of each.

Name Description
AdminPortMaxValue Indicates the maximum value that can be used for the administration port.
AdminPortMinValue Indicates the minimum value that can be used for the administration port.
RequestFromAdminPort Indicates a request that is made from the administration port in the Windows SharePoint Services deployment.

Public Methods

The following table shows the public methods of the SPGlobalAdmin class and a brief description of each.

Name Description
AddCustomGlobalWebTemplate Adds a site template to the site template gallery for the collection of site collections in the Windows SharePoint Services deployment.
AddWPPack Enables a Web Part Package that is already installed on the virtual server and adds it to the Web Part gallery, or installs and enables a Web Part Package and adds it to the Web Part gallery.
CheckVirtualServerState Verifies whether the virtual server is in the specified state.
Close Closes the global administration object.
CreateAdminVirtualServer Creates an administration virtual server based on a new or existing application pool in Microsoft Internet Information Services (IIS).
CreateConfigDatabase(String, String, String, String) Creates a configuration database based on the specified database server, database name, account name, and password.
CreateConfigDatabase(String, String, String, String, Boolean, Boolean, String, String) Creates a configuration database based on the specified database server, database name, user name, password, and account information for Active Directory directory services, as well as on a Boolean value that specifies whether to use the host header as the name for a site.
DeleteAdminVirtualServer Deletes the administration virtual server.
DeleteConfigDB Deletes the configuration database and all associated information.
DeleteCustomGlobalWebTemplate Deletes the specified global site template.
Dispose Releases all unmanaged resources used by the global administration object.
EnumWPPacks Verifies whether the specified Web Part Package is currently installed in the Web Part gallery for the virtual server.
ExtendVirtualServer(String, String, String, String, System.Uri, Boolean, String, Boolean, String, String) Extends a virtual server with Windows SharePoint Services and creates a database based on the specified uniform resource identifier (URI), application pool information, and database information.
ExtendVirtualServer(System.Uri, Boolean, String, Boolean, String, String) Extends a virtual server with Windows SharePoint Services based on the specified URI and application pool information.
ExtendVirtualServerInWebFarm Extends a virtual server in a server farm with Windows SharePoint Services.
IIS6EnableSTS Specifies whether to enable Windows SharePoint Services in Microsoft Internet Information Services (IIS) version 6.
IsCurrentUserGlobalAdmin Returns a Boolean value that indicates whether the current user is a member of the SharePoint administrators group account in the Windows SharePoint Services deployment.
IsCurrentUserMachineAdmin Returns a Boolean value that indicates whether the current user is a member of the local administrators group for the computer running Windows SharePoint Services.
ListCustomGlobalWebTemplates Returns a list of the global site templates available for instantiating sites across virtual servers on a front-end Web server.
Log Creates a log that indicates the severity of a problem in the Windows SharePoint Services deployment and provides details.
MigrateUserAccount Migrates a user from one domain account to another domain account.
OpenVirtualServer Opens the virtual server identified by the specified URI.
RefreshConfigCache Refreshes the configuration cache.
RefreshConfigCache(System.Guid, Boolean) Refreshes the configuration cache based on the specified virtual server and on a Boolean value that indicates whether the SharePoint administrators group account is changed.
RefreshConfigCacheOnRemoteServers Refreshes the configuration cache on remote servers in the server farm.
RefreshConfigCacheOnRemoteServers(System.Guid, Boolean) Refreshes the configuration cache on remote servers in the server farm based on the specified virtual server and on a Boolean value that specifies whether the SharePoint administrators group account is changed.
RegisterASPNETClient Installs script files for validating the client computer.
RemoveWPPack Disables the specified Web Part Package and removes it from the Web Part gallery of the server.
SetAdminPort Sets the port number for the administration virtual server.
SetAdminPortAppPool Specifies a new or existing application pool in Microsoft Internet Information Services (IIS) for the administration server.
SetLogThreshold Sets a logging threshold value that specifies the highest level for which messages are logged in usage analysis.
StartDBService Starts the specified database server as a service in the Windows SharePoint Services deployment.
StartTimerService Starts the Microsoft SharePoint Timer service for scheduled background processes in the Windows SharePoint Services deployment.
UnextendVirtualServer(Microsoft.SharePoint.Administration.SPVirtualServer, Boolean) Removes Windows SharePoint Services from the specified virtual server.
UnextendVirtualServer(System.Uri, Boolean) Removes Windows SharePoint Services from the server specified by a URI.
UpdateConfigDatabaseConnection Updates the connection to the configuration database.
UpdateMailSettings Updates the default e-mail settings in the configuration database with the specified values.

Public Properties

The following table shows the public properties of the SPGlobalAdmin class, the data type of each property, and a brief description of each.

Name Data Type Description
AccountCreationModeEnabled Boolean Gets a Boolean value that indicates whether account creation mode for Active Directory directory service is enabled.
AdminFormDigest String Gets the security validation that is used for a request in a global administration page.
AdminPortApplicationPoolId String Gets the administrative application pool ID.
AdminPortIISInstanceId Int32 Gets the administrative ID of the instance of Microsoft Internet Information Services (IIS).
AdminPortUrl System.Uri Gets the administration port used on the administration virtual server.
AllowUnsafeUpdates Boolean Gets or sets a Boolean value that specifies whether to allow updates to the database as a result of a GET request or without requiring a security validation.
ApplicationPools System.Collections.IDictionary Gets the Microsoft Internet Information Services (IIS) application pools for the virtual server.
Config Microsoft.SharePoint.Administration.SPGlobalConfig Gets a global configuration object that contains configuration settings in the Windows SharePoint Services deployment.
ConfigDatabase Microsoft.SharePoint.Administration.SPConfigDatabase Gets the configuration database in the Windows SharePoint Services deployment.
ConfigDatabaseName String Gets the name of the configuration database.
ConfigDatabaseServer String Gets the name of the configuration database server.
ConfigDatabaseUser String Gets the user name of the administrator account for the configuration database.
InstalledLanguages Microsoft.SharePoint.SPLanguageCollection Gets the collection of languages installed in the Windows SharePoint Services deployment.
MailCodePage Int32 Gets the language code page used for e-mail messages.
MailFromAddress String Gets the From address used for e-mail in the Windows SharePoint Services deployment.
MailReplyToAddress String Gets the To address used for e-mail in the Windows SharePoint Services deployment.
OutboundSmtpServer String Gets the name of the Simple Mail Transfer Protocol (SMTP) server used for e-mail in the Windows SharePoint Services deployment.
ServerCulture System.Globalization.CultureInfo Gets information about the culture represented on the virtual server.
ServerLanguage Microsoft.SharePoint.SPLanguage Gets the language used on the virtual server.
TimeZones Microsoft.SharePoint.SPTimeZoneCollection Gets the collection of time zones implemented in the Windows SharePoint Services deployment.
UsageSettings Microsoft.SharePoint.Administration.SPUsageSettings Gets a usage settings object that encapsulates the settings for logging and usage processing.
UseHostHeaderAsSiteName Boolean Gets a Boolean value that indicates whether the host header is used as the name for the site collection on the virtual server.
UseNtAuthenticationForDatabase Boolean Gets a Boolean value that indicates whether Microsoft Windows NT authentication is used for the database.
Version System.Version Gets the version of Windows SharePoint Services installed in the Windows SharePoint Services deployment.
VirtualServerNames String[] Gets the names of the virtual servers in the Windows SharePoint Services deployment.
VirtualServers Microsoft.SharePoint.Administration.SPVirtualServerCollection Gets the collection of virtual server objects in the Windows SharePoint Services deployment.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

Remarks

Use the GlobalAdmin property of the SPGlobalConfig class, or use the SPGlobalAdmin constructor to create a global administration object that allows you to manage the current Windows SharePoint Services deployment, as follows: SPGlobalAdmin globAdmin = new SPGlobalAdmin();.

Example

The following code example displays the SharePoint administrators group account, the host name for the specified virtual server, and usage information for all SharePoint sites on the server.

This example assumes the existence of a label control on a .aspx page.

Requirements

Namespace: Microsoft.SharePoint.Administration

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services (in Microsoft.SharePoint.dll)

Security: Code Access Security