SHARE
TWEET

Untitled

a guest Aug 13th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## -- Store all bluetooth named services as an array and stop if running, and disable the startup type if it's not already
  2. $BTServices = (Get-Service | ?{$_.DisplayName -match "bluetooth"}).Name;
  3.  
  4. $BTServices | % {
  5.     $status = (Get-Service -Name $_).Status;
  6.     If($status -ne "Stopped"){Stop-Service $_ -Force};
  7.     $sType  = (Get-Service -Name $_).StartType;
  8.     If($sType -ne "Disabled"){Set-Service $_ -StartupType Disabled};
  9.     };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top