Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## -- Store all bluetooth named services as an array and stop if running, and disable the startup type if it's not already
- $BTServices = (Get-Service | ?{$_.DisplayName -match "bluetooth"}).Name;
- $BTServices | % {
- $status = (Get-Service -Name $_).Status;
- If($status -ne "Stopped"){Stop-Service $_ -Force};
- $sType = (Get-Service -Name $_).StartType;
- If($sType -ne "Disabled"){Set-Service $_ -StartupType Disabled};
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement