Stops a running service.
Snap-In: Microsoft.PowerShell.Management
Syntax:
Stop-Service
[-Name] <String[]> [-Force] [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-WhatIf] [-Confirm]
Stop-Service
[-Force] [-PassThru] -DisplayName <String[]> [-Include <String[]>] [-Exclude <String[]>] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-WhatIf] [-Confirm]
Stop-Service
[-Force] [-PassThru] [-Include <String[]>] [-Exclude <String[]>] [-InputObject <ServiceController[]>] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>] [-WhatIf] [-Confirm]
Description:
The stop service Cmdlet stops a running service. The service will be switched o ff and not function.
NOTE: There may be services that are dependent on the service being stopped. In that case they may cease to work. You should be aware o f service dependencies before using this cmdlet.