Category filter
Script to Stop and Restart Windows Audio Service
Windows Audio Service manages all the audio devices on your computer. It is a vital component to enable sound for any program running on the Windows operating system. By default, the audio service starts when you power on your device. But there may occur times when the audio service glitches and stops working. Executing a simple Windows script to restart the audio service might solve the issue. Using Hexnode, you can execute scripts remotely to fix audio issues on your Windows devices.
Batch Script
1 2 3 4 5 |
@echo off Rem To stop audio services net stop audiosrv Rem To start audio services net start audiosrv |
PowerShell Script
1 2 |
Restart-Service audiosrv Write-Host “Windows Audio Service restarted successfully.” |
If you get an error stating “Cannot stop service ‘Windows Audio (audiosrv)’ because it has dependent services”, run the script below:
1 2 |
Restart-Service audiosrv -Force -Confirm Write-Host “Windows Audio Service restarted successfully.” |