disable windows service

list

Get-Service  | Format-List

Get-Service -Name DNS*,DHCP*

stop

Stop-Service -name Dnscache -force

disable

Set-Service -name Dnscache -startupType disabled

verify

Get-Service -name Dnscache | Select Name, Status, StartType

https://techexpert.tips/powershell/powershell-disable-service/

$targets =  @('DoSvc' ,'WdiSystemHost' ,'WdiServiceHost' ,'MapsBroker' ,'CscService' ,'cloudidsvc' ,'edgeupdate' ,'edgeupdatem' ,'UsoSvc' ,'uhssvc' ,'PcaSvc' ,'SCardSvr' ,'ScDeviceEnum' ,'SDRSVC' ,'WbioSrvc' ,'WpnService' ,'WaaSMedicSvc' ,'WSearch' ,'wuauserv' ,'XblAuthManager' ,'XblGameSave' ,'XboxGipSvc' ,'XboxNetApiSvc', 'BITS')


Foreach ($item in $targets) {
    Stop-Service -name $item -force
    Set-Service -name $item -startupType disabled
}


Foreach ($item in $targets) {
    Get-Service -name $item | Select DisplayName ,Name, Status, StartType, Description
}

DisplayName : Delivery Optimization
Name        : DoSvc
Status      : Stopped
StartType   : Disabled
Description : Performs content delivery optimization tasks

DisplayName : Diagnostic System Host
Name        : WdiSystemHost
Status      : Stopped
StartType   : Disabled
Description : The Diagnostic System Host is used by the Diagnostic Policy Service to host diagnostics that need to run in a Local System context.  If this service is stopped, any diagnostics that
              depend on it will no longer function.

DisplayName : Diagnostic Service Host
Name        : WdiServiceHost
Status      : Stopped
StartType   : Disabled
Description : The Diagnostic Service Host is used by the Diagnostic Policy Service to host diagnostics that need to run in a Local Service context.  If this service is stopped, any diagnostics
              that depend on it will no longer function.

DisplayName : Downloaded Maps Manager
Name        : MapsBroker
Status      : Stopped
StartType   : Disabled
Description : Windows service for application access to downloaded maps. This service is started on-demand by application accessing downloaded maps. Disabling this service will prevent apps from
              accessing maps.

DisplayName : Offline Files
Name        : CscService
Status      : Stopped
StartType   : Disabled
Description : The Offline Files service performs maintenance activities on the Offline Files cache, responds to user logon and logoff events, implements the internals of the public API, and
              dispatches interesting events to those interested in Offline Files activities and changes in cache state.

DisplayName : Microsoft Cloud Identity Service
Name        : cloudidsvc
Status      : Stopped
StartType   : Disabled
Description : Supports integrations with Microsoft cloud identity services.  If disabled, tenant restrictions will not be enforced properly.

DisplayName : Microsoft Edge Update Service (edgeupdate)
Name        : edgeupdate
Status      : Stopped
StartType   : Disabled
Description : Keeps your Microsoft software up to date. If this service is disabled or stopped, your Microsoft software will not be kept up to date, meaning security vulnerabilities that may arise
              cannot be fixed and features may not work. This service uninstalls itself when there is no Microsoft software using it.

DisplayName : Microsoft Edge Update Service (edgeupdatem)
Name        : edgeupdatem
Status      : Stopped
StartType   : Disabled
Description : Keeps your Microsoft software up to date. If this service is disabled or stopped, your Microsoft software will not be kept up to date, meaning security vulnerabilities that may arise
              cannot be fixed and features may not work. This service uninstalls itself when there is no Microsoft software using it.

DisplayName : Update Orchestrator Service
Name        : UsoSvc
Status      : Stopped
StartType   : Disabled
Description : Manages Windows Updates. If stopped, your devices will not be able to download and install the latest updates.

DisplayName : Microsoft Update Health Service
Name        : uhssvc
Status      : Stopped
StartType   : Disabled
Description : Maintains Update Health

DisplayName : Program Compatibility Assistant Service
Name        : PcaSvc
Status      : Stopped
StartType   : Disabled
Description : This service provides support for the Program Compatibility Assistant (PCA).  PCA monitors programs installed and run by the user and detects known compatibility problems. If this
              service is stopped, PCA will not function properly.

DisplayName : Smart Card
Name        : SCardSvr
Status      : Stopped
StartType   : Disabled
Description : Manages access to smart cards read by this computer. If this service is stopped, this computer will be unable to read smart cards. If this service is disabled, any services that
              explicitly depend on it will fail to start.

DisplayName : Smart Card Device Enumeration Service
Name        : ScDeviceEnum
Status      : Stopped
StartType   : Disabled
Description : Creates software device nodes for all smart card readers accessible to a given session. If this service is disabled, WinRT APIs will not be able to enumerate smart card readers.

DisplayName : Windows Backup
Name        : SDRSVC
Status      : Stopped
StartType   : Disabled
Description : Provides Windows Backup and Restore capabilities.

DisplayName : Windows Biometric Service
Name        : WbioSrvc
Status      : Stopped
StartType   : Disabled
Description : The Windows biometric service gives client applications the ability to capture, compare, manipulate, and store biometric data without gaining direct access to any biometric hardware
              or samples. The service is hosted in a privileged SVCHOST process.

DisplayName : Windows Push Notifications System Service
Name        : WpnService
Status      : Stopped
StartType   : Disabled
Description : This service runs in session 0 and hosts the notification platform and connection provider which handles the connection between the device and WNS server.

DisplayName : Windows Update Medic Service
Name        : WaaSMedicSvc
Status      : Stopped
StartType   : Disabled
Description : Enables remediation and protection of Windows Update components.

DisplayName : Windows Search
Name        : WSearch
Status      : Stopped
StartType   : Disabled
Description : Provides content indexing, property caching, and search results for files, e-mail, and other content.

DisplayName : Windows Update
Name        : wuauserv
Status      : Stopped
StartType   : Disabled
Description : Enables the detection, download, and installation of updates for Windows and other programs. If this service is disabled, users of this computer will not be able to use Windows
              Update or its automatic updating feature, and programs will not be able to use the Windows Update Agent (WUA) API.

DisplayName : Xbox Live Auth Manager
Name        : XblAuthManager
Status      : Stopped
StartType   : Disabled
Description : Provides authentication and authorization services for interacting with Xbox Live. If this service is stopped, some applications may not operate correctly.

DisplayName : Xbox Live Game Save
Name        : XblGameSave
Status      : Stopped
StartType   : Disabled
Description : This service syncs save data for Xbox Live save enabled games.  If this service is stopped, game save data will not upload to or download from Xbox Live.

DisplayName : Xbox Accessory Management Service
Name        : XboxGipSvc
Status      : Stopped
StartType   : Disabled
Description : This service manages connected Xbox Accessories.

DisplayName : Xbox Live Networking Service
Name        : XboxNetApiSvc
Status      : Stopped
StartType   : Disabled
Description : This service supports the Windows.Networking.XboxLive application programming interface.

DisplayName : Background Intelligent Transfer Service
Name        : BITS
Status      : Stopped
StartType   : Disabled
Description : Transfers files in the background using idle network bandwidth. If the service is disabled, then any applications that depend on BITS, such as Windows Update or MSN Explorer, will be
              unable to automatically download programs and other information.
posted @ 2023-04-15 11:57  fndefbwefsowpvqfx  阅读(101)  评论(0编辑  收藏  举报