Start SharePoint Central Administration service using PowerShell

[Fixed]: Start SharePoint Central Administration Using PowerShell

No comments

Loading

Start SharePoint Central Administration service using PowerShell – as we know SharePoint Central administration site is the heart of everything in SharePoint on-premise when it comes to managing the SharePoint farm, this site generally gets hosted in the application server and it runs by the “Central Administration ” service.

This can be managed through the SharePoint central administration site “Central Administration -> Manage Services on the server” navigation.  But, remember when your central administration site itself does not open – it throws the “Internet Explorer cannot display the webpage” error which means due to some reason or accidentally  “Central Administration” has been stopped in the SharePoint farm.

In this article, we will learn about how to start the SharePoint central administration service using the PowerShell script. Before that, let’s have an overview of the SharePoint Central Administration Service and what it offers.

An Overview of SharePoint Central Administration Service

SharePoint Central Administration is a pivotal component of the SharePoint Server architecture, serving as the primary interface for managing and configuring a SharePoint environment. It provides a centralized location where administrators can perform a wide range of tasks, from managing farm configurations and services to monitoring system health and performance. This article explores the various aspects of SharePoint Central Administration, its functionalities, and best practices for its use.

What is SharePoint Central Administration?

SharePoint Central Administration is a web-based interface designed for SharePoint administrators to manage and configure SharePoint farms. It is installed automatically on the first server in a SharePoint farm and can be extended to other servers as needed. Central Administration offers comprehensive tools and features for managing the entire SharePoint environment, ensuring that administrators can maintain optimal performance, security, and user experience.

Key Features and Functionalities

  1. Farm ManagementCentral Administration allows administrators to manage the overall configuration of the SharePoint farm. This includes:
    • Configuring farm settings such as incoming and outgoing email settings.
    • Managing farm solutions and features.
    • Performing backups and restorations of farm components.
  2. Service Application ManagementSharePoint relies on various service applications to provide functionalities like Search, Managed Metadata, and User Profiles. Central Administration enables the creation, configuration, and management of these service applications, ensuring they are correctly provisioned and operating efficiently.
  3. Web Application ManagementAdministrators can manage web applications from Central Administration. This includes:
    • Creating new web applications.
    • Configuring authentication methods.
    • Managing site collections and their associated settings.
  4. Monitoring and ReportingCentral Administration provides tools for monitoring the health and performance of the SharePoint farm. This includes:
    • Viewing health reports and alerts.
    • Configuring usage and health data collection.
    • Monitoring resource usage and performance metrics.
  5. Security ManagementSecurity is a critical aspect of any SharePoint environment. Central Administration offers features to manage security settings at various levels, including:
    • Configuring service accounts and permissions.
    • Managing user policies and permissions for web applications and site collections.
    • Implementing security policies and compliance settings.
  6. Upgrade and Patch ManagementKeeping the SharePoint environment up-to-date with the latest updates and patches is essential for security and performance. Central Administration facilitates the application of service packs, cumulative updates, and other patches.

Navigating SharePoint Central Administration

Central Administration is organized into several sections, each focused on a specific aspect of SharePoint management. Here’s a brief overview of the main sections:

  1. Application Management
    • Manage service applications.
    • Create and manage web applications and site collections.
    • Configure service application associations.
  2. System Settings
    • Manage servers in the farm.
    • Configure outgoing and incoming email settings.
    • Configure farm settings and manage servers.
  3. Monitoring
    • View health reports and configure health rules.
    • Monitor usage and health data.
    • Set up diagnostic logging.
  4. Backup and Restore
    • Perform farm backups and restores.
    • Manage recovery scenarios.
  5. Security
    • Manage farm administrators and service accounts.
    • Configure security settings for web applications and site collections.
    • Implement information management policies.
  6. Upgrade and Migration
    • Manage upgrade status and schedule upgrades.
    • Review and apply available updates and patches.
  7. General Application Settings
    • Configure general settings for various service applications.
    • Manage workflow settings and InfoPath Forms Services.

Best Practices for Using SharePoint Central Administration

  1. Regular Backups
    • Schedule regular backups of the SharePoint farm and its components to prevent data loss and ensure quick recovery in case of failures.
  2. Monitor System Health
    • Regularly check health reports and performance metrics to identify and resolve issues promptly.
  3. Apply Updates and Patches
    • Stay current with updates and patches to protect against vulnerabilities and enhance system performance.
  4. Implement Security Policies
    • Configure robust security settings to safeguard sensitive data and ensure compliance with organizational policies.
  5. Document Configurations
    • Maintain thorough documentation of all configurations and changes made through Central Administration to facilitate troubleshooting and audits.

Start SharePoint Central Administration service using PowerShell

####The below script is used to start the SharePoint central administration service.

cls

$PSshell = Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorVariable err -ErrorAction SilentlyContinue 
if($PSshell -eq $null)
{
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}

$fileName = "StartCentralAdministrationService_using_PowerShell"

#'yyyyMMddhhmm yyyyMMdd
$enddate = (Get-Date).tostring("yyyyMMddhhmmss")
#$filename = $enddate + '_VMReport.doc'
$logFileName = $fileName +"_"+ $enddate+"_Log.txt"
$invocation = (Get-Variable MyInvocation).Value
$directoryPath = Split-Path $invocation.MyCommand.Path

$directoryPathForLog=$directoryPath+"\"+"LogFiles"
if(!(Test-Path -path $directoryPathForLog))
{
New-Item -ItemType directory -Path $directoryPathForLog
#Write-Host "Please Provide Proper Log Path" -ForegroundColor Red
}
#$logPath = $directoryPath + "\" + $logFileName

$logPath = $directoryPathForLog + "\" + $logFileName

$isLogFileCreated = $False

function Write-Log([string]$logMsg)
{
if(!$isLogFileCreated){
Write-Host "Creating Log File..."
if(!(Test-Path -path $directoryPath))
{
Write-Host "Please Provide Proper Log Path" -ForegroundColor Red
}
else
{
$script:isLogFileCreated = $True
Write-Host "Log File ($logFileName) Created..."
[string]$logMessage = [System.String]::Format("[$(Get-Date)] - {0}", $logMsg)
Add-Content -Path $logPath -Value $logMessage
}
}
else
{
[string]$logMessage = [System.String]::Format("[$(Get-Date)] - {0}", $logMsg)
Add-Content -Path $logPath -Value $logMessage
}
}

##############The below code is used to start the 'Central Administration' service in SharePoint on-premise##################################

Try
{
#Pass the 'Central Administration' as the service name, however, you can pass any service name which you want to start.
Get-SPServiceInstance | Where-Object {$_.TypeName –eq 'Central Administration'} | Start-SPServiceInstance
}
Catch
{

$ErrorMessage = $_.Exception.Message +"in starting the central administration service in SharePoint on-premise!:" 
Write-Host $ErrorMessage -BackgroundColor Red
Write-Log $ErrorMessage

}

###The below code is used to start the 'Central Administration' service in SharePoint on-premise - ends here####

Once you run the above script, the central administration site should open, however, if you still face the same issue, it might be the reason that the timer job service is not running on the server, so start the SharePoint timer job service in the application server.

Then run the below command:


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

The status before we run the command will be in the “Disabled” state, then the status will be changed to “Provisioning” and finally to “Online“.

Now, if you try to open the SharePoint central administration site in the browser it should open.

Summary: Start SharePoint Central Administration service

Thus, in this article, we have learned about how to start the central administration service in SharePoint using the PowerShell script.

SharePoint Central Administration is an indispensable tool for SharePoint administrators, offering a comprehensive suite of features for managing, configuring, and monitoring SharePoint farms. By leveraging the capabilities of Central Administration and adhering to best practices, administrators can ensure a secure, efficient, and reliable SharePoint environment, supporting the collaboration and productivity needs of their organization.

See Also: SharePoint PowerShell Tutorials

You may also like the following SharePoint PowerShell tutorials:

Buy the premium version of SharePoint Online & Office 365 administration eBook from here:

Buy SharePoint Online & Office 365 Administration eBook

 

 

 

 

About Post Author

Do you have a better solution or question on this topic? Please leave a comment