Before stopping the SharePoint services, it's probably worth running the following to see what state they are in (e.g. running, stopped, etc.):
Get-WmiObject Win32_Service | Where-Object {$_.Name -eq 'ssosrv' -or $_.Name -eq 'dclauncher' -or $_.Name -eq 'dcloadbalancer' -or $_.Name -eq 'osearch' -or $_.Name -eq 'spsearch' -or $_.Name -eq 'sptimerv3' -or $_.Name -eq 'sptrace' -or $_.Name -eq 'spwriter'} | Format-Table name, state, status -auto
To stop all the services related to SharePoint 2007, simply run the following PowerShell commands on the services you'd like to stop:
Stop-Service ssosrv
Stop-Service dclauncher
Stop-Service dcloadbalancer
Stop-Service osearch
Stop-Service spadmin
Stop-Service spsearch
Stop-Service sptimerv3
Stop-Service sptrace
Stop-Service spwriter
And to start them again:
Start-Service ssosrv
Start-Service dclauncher
Start-Service dcloadbalancer
Start-Service osearch
Start-Service spadmin
Start-Service spsearch
Start-Service sptimerv3
Start-Service sptrace
Start-Service spwriter
If you wanted to be a bit more clever about it, and not get any error messages if services are already stopped/started/disabled or not installed, you could use:
function StopIfStarted([string]$ServiceName) {
$Service = Get-WmiObject Win32_Service -Filter "name='$ServiceName'"
if (!$Service) {
# Service is not installed
Write-Host "$ServiceName is not installed on this machine."
} else {
# Service is installed
if ($Service.State -eq "Running") {
if ($Service.StartMode -eq "Disabled") {
Write-Host "Cannot stop service $ServiceName as it is disabled."
} else {
Write-Host "Stopping service $ServiceName ..."
Stop-Service $ServiceName
}
} else {
Write-Host "$ServiceName is already stopped."
}
}
}
StopIfStarted "ssosrv"
StopIfStarted "dclauncher"
StopIfStarted "dcloadbalancer"
StopIfStarted "osearch"
StopIfStarted "spadmin"
StopIfStarted "spsearch"
StopIfStarted "sptimerv3"
StopIfStarted "sptrace"
StopIfStarted "spwriter"
and:
function StartIfStopped([string]$ServiceName) {
$Service = Get-WmiObject Win32_Service -Filter "name='$ServiceName'"
if (!$Service) {
# Service is not installed
Write-Host "$ServiceName is not installed on this machine."
} else {
# Service is installed
if ($Service.State -eq "Stopped") {
if ($Service.StartMode -eq "Disabled") {
Write-Host "Cannot start service $ServiceName as it is disabled."
} else {
Write-Host "Starting service $ServiceName ..."
Start-Service $ServiceName
}
} else {
Write-Host "$ServiceName is already running."
}
}
}
StartIfStopped "ssosrv"
StartIfStopped "dclauncher"
StartIfStopped "dcloadbalancer"
StartIfStopped "osearch"
StartIfStopped "spadmin"
StartIfStopped "spsearch"
StartIfStopped "sptimerv3"
StartIfStopped "sptrace"
StartIfStopped "spwriter"
These script files are attached.
To see which services are running, you can use:
Get-WmiObject Win32_Service | Where-Object {$_state -eq 'Running'} | Format-Table name, state, status -auto
Note:
Microsoft Single Sign-On service = ssosrv
Office Document Conversions Launcher service = dclauncher
Office Document Conversions Load Balancer service = dcloadbalancer
Office SharePoint Server Search service = osearch
Windows SharePoint Services Administration service = spadmin
Windows SharePoint Services Search service = spsearch
Windows SharePoint Services Timer service = sptimerv3
Windows SharePoint Services Tracing service = sptrace
Windows SharePoint Services VSS Writer service = spwriter
|
|
||||||
|
This Month
Month Archive
About Me
Login
|
Stop and Start Microsoft SharePoint Services with PowerShell
Comments
FM TRANSMITTER
IPod purpose expands not possessing restrict - the brand new HLLY <a href="http://www.fmheroes.org/25mw-fm-transmitter_3_1.htm">25mW FM TRANSMITTER</a> which specifically produced for IPod in your car. HLLY producer consists of an exclusive location amid the fm transmitter field, some type like Belkin. I employed to possess three fm transmitters which were totally produced by HLLY. Three kinds have completely different energy and functions, range.
Today, with the developing of the technology, more and more people have their own car, and every car does charge a music system. There are abounding means in which one can fit in acceptable music system. The latest trend in this area is of a car mp3 radio <a href="http://www.fmheroes.org/20w-fm-transmitter_4_1.htm">20W FM TRANSMITTER</a>.To apperceive what is pll fm transmitter you actually should apperceive what is PLL. Able-bodied the PLL is basically short for Phase-Locked Loop. FM TRANSMITTER
IPod purpose expands not possessing restrict - the brand new HLLY [url=http://www.fmheroes.org/25mw-fm-transmitter_3_1.htm]25mW FM TRANSMITTER[/url] which specifically produced for IPod in your car. HLLY producer consists of an exclusive location amid the fm transmitter field, some type like Belkin. I employed to possess three fm transmitters which were totally produced by HLLY. Three kinds have completely different energy and functions, range.
Today, with the developing of the technology, more and more people have their own car, and every car does charge a music system. There are abounding means in which one can fit in acceptable music system. The latest trend in this area is of a car mp3 radio [url=http://www.fmheroes.org/20w-fm-transmitter_4_1.htm]20W FM TRANSMITTER[/url].To apperceive what is pll fm transmitter you actually should apperceive what is PLL. Able-bodied the PLL is basically short for Phase-Locked Loop. |
Search
Recent Articles
Favourite blogs
|
||||
|
||||||
