How to turn off Bluetooth adapter via command line or script?

I'm trying to write a batch script that will be able to turn on/off any connected Bluetooth adapters.
In the "Bluetooth Settings" window, how can I change the "Turn off Bluetooth adapter" setting via command line or script?
Due to my account not being verified yet, I cannot post a screenshot.  I will update this thread as soon as my account is verified.

get-service -DisplayName 'Bluetooth Support Service' | Stop-Service
¯\_(ツ)_/¯

Similar Messages

  • Turn off FTP service via command line

    We are running a Mt Lion server.  The FTP Service quit working properly.  Instead of directing users to the FTP folder specified, users are just sent to the root of the OS drive.  We attemped to turn off FTP service in the Server.app, but FTP stays running even when Server.app lists it as off. 
    Is there a way to turn off FTP via the command line?   We can't seem to find it. The instructions we found online for 10.7 don't work.  We've tried rebooting the server and repairing permissions but the same problem exists.

    Finally, tracked it down thanks to the good people at CrushFTP http://crushftp.com
    Here is the command for anyone else that may be looking.
    sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist

  • [SOLVED] How to Crop an MP4 Video via Command-line?

    I have ffmpeg, mpg123, and mencoder. Does anyone know of a way I could use any of those to crop an mp4 video via command-line? I am trying to take off the black space above and below a video. Thanks in advance!
    Last edited by tony5429 (2009-04-12 00:12:57)

    I don't think it's possible to crop without re-encoding, but you can crop from the command line with ffmpeg and mencoder. Not sure about mpg123 - I think that's for playing audio but I could be wrong there.
    Anyway, with ffmpeg you can do cropping by using -croptop, -cropbottom, -cropleft, and -cropright. So if you wanted to crop 16 pixels off of the top and the bottom, your command line would look something like this:
    ffmpeg -i <input file> -croptop 16 -cropbottom 16 <video encoding options> <audio encoding options> <output file>
    With mencoder you use the "crop" video filter, like this:
    mencoder <input file> -o <output file> -vf crop=320:208:0:16 <other options>
    where the "320:208:0:16" means that the resulting picture is 320 pixels wide, 208 pixels high, and the 0:16 is the x,y position of the cropped area.
    These command lines are just really very basic examples - ffmpeg and mencoder have a LOT of options. Way too many to explain here. If you don't believe me, just try reading through the mencoder man page sometime. (There's an online version of it at: http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.html)
    Hope this helps!!

  • Turning on location services via command line

    It is possible in Mountain Lion or Mavericks to turn on location services via a shell script as might be used via Apple Remote Desktop or DeployStudio or similar. An example script to do this is listed below.
    #!/bin/sh
    /bin/launchctl unload /System/Library/LaunchDaemons/com.apple.locationd.plist
    uuid=`/usr/sbin/system_profiler SPHardwareDataType | /usr/bin/grep "Hardware UUID" | /usr/bin/cut -c22-57`
    /usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd.$uuid LocationServicesEnabled -int 1
    chown -R _locationd:_locationd /var/db/locationd
    /bin/launchctl load /System/Library/LaunchDaemons/com.apple.locationd.plist
    exit 0
    The script turns location services off, finds the Macs unique hardware UUID number, sets the preference file for this Mac which has a file name unique to this Mac because the file name includes the UUID number, restores ownership of the file as the defaults command will have possibly changed the owner, and then turns location services back on.
    As mentioned the above will work for Mountain Lion and Mavericks. Unfortunately Lion even though it also has location services its method of confuguring is totally different.
    Does anyone have a similar command line solution to enable location services for Lion (aka OS X 10.7).

    THis should work:
    #!/bin/sh
    launchctl unload /System/Library/LaunchDaemons/com.apple.locationd.plist
    defaults write /System/Library/LaunchDaemons/com.apple.locationd Disabled -bool false
    launchctl load /System/Library/LaunchDaemons/com.apple.locationd.plist
    exit 0

  • How to change "open with" defaults via command line?!?

    folks,
    i know that if i get info on a file -- in this case, a filemaker 5.5 file -- i can choose the default "open with" settings and apply those settings to all files of that kind. see the attached image for what i mean.
    but how do i do that via the command line?
    thus far, here's what i've got: i know that i can open a document called "scrubbing shell.sh" on my desktop WITH either MS Word of TextEdit by calling:
    open -a textedit /Users/david/Desktop/scrubbing-shell.sh
    or
    open -a Microsoft\ Word /Users/david/Desktop/scrubbing-shell.sh
    no sweat. BUT....how do i set the defaults so that it ALWAYS opens with that app in the future when double-clicking via the GUI?
    many thanks, ya'll!
    david koff
    associate systems admin
    the j. paul getty trust
    dkoff AT getty DOT edu

    Hi David,
       OK, I investigated the new format and treatment. It appears that the first entry in the property list file that matches the file being opened wins. The Finder may still honor the new format; when I moved my old Panther file into Tiger it seemed to work. However, in other ways, the Finder doesn't recognize the old format, which is the format of the FileMaker entries you posted.
       The Finder puts all of the new format entries at the beginning of the property list file. If you change a preference that was controlled by an old format entry, the Finder won't edit that entry. What it will do is to create a new entry in the new format closer to the beginning of the file than any of the old-format entries. SInce the new entry comes first, the old one doesn't apply. If you then edit the preference and change it back to what it was before, the Finder will edit the new entry. Consider the following sequence of events and commands:
    % cp ~/Library/Preferences/com.apple.LaunchServices.plist ~/Library/Preferences/com.apple.LaunchServices_copy.plist
    I change all GIF files to be opened by GraphicConverter instead of Preview, which is an old setting in the old format.
    % plutil -convert xml1 ~/Library/Preferences/com.apple.LaunchServices.plist
    % diff --text ~/Library/Preferences/com.apple.LaunchServices.plist ~/Library/Preferences/com.apple.LaunchServices_copy.plist
    404,409d403
    <      <dict>
    <         <key>LSHandlerContentType</key>
    <         <string>com.compuserve.gif</string>
    <         <key>LSHandlerRoleAll</key>
    <         <string>com.lemkesoft.graphicconverter</string>
    <      </dict>
    Then I change all the GIF files to be opened by Preview again.
    % plutil -convert xml1 ~/Library/Preferences/com.apple.LaunchServices.plist
    % cp ~/Library/Preferences/com.apple.LaunchServices.plist ~/Library/Preferences/com.apple.LaunchServices_copy2.plist
    % diff --text ~/Library/Preferences/com.apple.LaunchServices.plist ~/Library/Preferences/com.apple.LaunchServices_copy.plist
    404,409d403
    <       <dict>
    <          <key>LSHandlerContentType</key>
    <          <string>com.compuserve.gif</string>
    <          <key>LSHandlerRoleAll</key>
    <          <string>com.apple.preview</string>
    <       </dict>
    % diff --text ~/Library/Preferences/com.apple.LaunchServices.plist ~/Library/Preferences/com.apple.LaunchServices_copy2.plist
    408c408
    <          <string>com.apple.preview</string>
              <string>com.lemkesoft.graphicconverter</string>
       Note that I had to change the file to text after every change because the Finder converted the file to binary format every time it edited it. I didn't have to logout or reboot; the property list file change less than a second after the preference was set. I'm guessing that because you were just looking at the old-format entry, you missed the real changes to your property list file. Did it change from text to binary format? Try the command line tools that I used above.
       Note that this means that it matters where you put your entries in the property list file if you edit it.
    Gary
    ~~~~
       There are only 10 kinds of people in the world. Those
       who understand binary numbers and those who don't.

  • How to turn off measurements when using the line tool

    Hello.  I'm sorry to trouble you with this small thing but its driving me nuts.  I'm using a shared computer at a university and we just upgraded to CS6.  When I use the line tool while making a mask a box pops up which measures the line's length and angle.  I want to turn it off, and it blocks being able to see what I am trying to mask.  I've tried looking this up online and in Photoshop help but I just don't know the correct terminolgy, i.e. what to call it, to find out how to turn it off.  Thank you so much so much for any help!
    here is a jpg screenshot: https://www.dropbox.com/s/njena5x9ppajzqq/linetool.jpg

    That looks like the on-image displays that were added to photoshop cs6
    You should be able to turn that off in Photoshop>Preferences>Interface>Show Transformation Values and set Never as the value.

  • How do you either set "Show More Tiles" or Start Screen rows via command line or script for Windows 8.1?

    Is there a method to change the Start Screens number of rows (similar to Windows 8.0's use of the Explorer\Scaling\MonitorSize in registry). Possibly by forcing the switch for "Show More Tiles" via script etc? This is to enable the device with
    Windows 8.1 to be built using a deployment methodology like SCCM and have the Tiles correctly configured as required for a standard look and feel across devices. I do not know why all these switches are not represented in either WMI or the registry to enable
    the customization of look and feel out of the box for enterprise deployments.
    Thanks for any assistance possible.

    Hi,
    You can try steps in this article.
    How to Change Number of Apps Tile Rows on "Start" Screen in Windows 8 and Windows 8.1
    http://www.eightforums.com/tutorials/2690-start-screen-metro-apps-change-number-rows-windows-8-a.html
    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore,
    Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you
    completely understand the risk before retrieving any software from the Internet.
    Hope this could be helpful.
    Kate Li
    TechNet Community Support

  • Command to turn off Bluetooth via ARD

    I'd like to turn off Bluetooth and Airport via ARD on all of my Macs (all running Leopard) that don't need them.
    I can do this for Airport using networksetup -setairportpower off, but I can't find a similar command for Bluetooth. I don't really want to completely disable it so I'd like to leave the kernel extensions intact, just turn it off. Does such a command exist?

    you can install bueutil on all macs and use that.
    http://www.frederikseiffert.de/blueutil/
    I don't know any other way to turn bluetooth off/on from command line.

  • How to completely turn off Bluetooth and Wireless

    Hey everybody,
    I'm running Windows XP SP3 via Boot Camp and I was wondering if anyone can assist me in how to completely turn off Bluetooth and Wireless connectivity so that I can reserve as much batter life while being in class taking notes without a plug-in source, but not uninstall. I know there is a Bluetooth control panel and I disabled it there but under "connect to" its still remains there. Basically I want to have the Bluetooth and Wireless turned off completely when I startup and still have the icons shown in the taskbar to let me know that they are still there.
    Thanks!

    Joergen Thomson, I can see that you have the same thoughts like I do, I wish they could release a software that is stable and better then this.
    I dont have the energi or time to report all flaus back to cisco, this product have taking to much of my time and frustration already. Thank you so much for all the time you spend to try get this product stable and hopefully a good product.
    I have a costumer that have a webservice that is IP restricted, For now I have to define more then 93 policys openening for the same service because this doesnt handle address list and groups. And all the times I had to set it back to factory default becasue of HTTP Admin server stopped, VPN Problem, Firmware Upgrades, "Packet Loss" and so on takes alot of time becasue I need to reconfig policies back.
    For now to they release a firmware is stable I have take this piece off the network and put the back a old Fortinet 60 box.

  • Command Line to emulate Turn-Off Bluetooth Switch Function

    We are looking to initially turn-off the bluetooth function on our deployed computers unless the user specifically needs it. We have already tested two command options: Turn off Bluetooth support service and Disable Bluetooth adapter. Neither of these will
    toggle the switch found in Metro's PC and Device Settings, so the device still shows as ON and confuses the user. 
    Can someone help us find the command line to execute that will emulate triggering this switch to Off?

    Hi,
    Based on my research, thereis a poershell cmdlets that used to manage Device should be helpful with your requirement:
    https://gallery.technet.microsoft.com/scriptcenter/Device-Management-7fad2388
    It provide a command to disable device:
    Enabling / Disabling Devices
    PowerShell
     $deviceName = Read-Host -Prompt 'Please enter the Name of the Device to Disable'; Get-Device | Where-Object -Property Name -Like $deviceName | Disable-Device
    Roger Lu
    TechNet Community Support

  • How to turn off voice over command in mac book pro 10.6.8

    how to turn off voice over command in mac book pro 10.6.8

    Open Universal Access preferences and disable it there.

  • I play music from my iPhone via Bluetooth on the car radio. The phone also connects over the radio. Can I turn off Bluetooth for phone and leave it on for music?

    I play music from my iPhone via Bluetooth on the car radio. The phone also connects over the radio. Can I turn off Bluetooth for phone and leave it on for music?

    I haven't tried it yet, but I believe this would disconnect Bluetooth for both the phone and music. I have a 2013 Hyundai Sonata if this will help.

  • How to turn off command voice?

    How to turn off voice command?

    Yes.
    This link will download a manual for you.
    iPad User Guide (For iOS 5.0 Software)
    Matt

  • Why IPhone is getting hot when downloading via wifi and how to turn off itunes 11.1 launch automatically when plugged in Iphone to the PC

    Why IPhone is getting hot when downloading via wifi and how to turn off itunes 11.1 launch automatically when plugged in Iphone to the PC

    My brother with the iPhone 4 suffers from that too.
    My iphone 5 doesnt however.
    But to Stop Launch when your apple device is connected, 1. connect your iPhoneto your computer, 2.Go to the Summary Page, 3. uncheck the box "Open iTunes when this iPhone is connected" and then your good for that device.

  • Ugh! How to navigate when you have a dead Mouse / Trackpad or accidentally turned off bluetooth

    Wow...
    Did a stupid thing and turned off bluetooth on my Mac and watched as my Apple Magic Mouse and Apple Magic Trackpad dissapeared and left me stranded.
    For those of you dead in the water unable to navigate your Mac here are some tips:
    Reboot your Mac and Zap your PRAM which will force the Mac to turn on bluetooth again.  Shut down the computer by holding the power button.  Hold down Command (the Apple icon 4 leaf clover key), Option, P and R keys together and hold them all down after you turn on the Mac.  If you do this before the grey screen you'll see the Mac chime and restart.  You can now let go of your keys and see if BlueTooth can now discover your devices.
    If you haven't already swapped out batteries in your Mouse, Keyboard or Trackpad please do so.  Be sure to not mix batteries of different types in the device.
    If you have keyboard access, but not your mouse or trackpad you can press the Option Key 5 times and then your numeric pad should move the mouse allowing you to navigate to things like System Preferences, Bluetooth to turn it back on!
    If you have a USB mouse you can plug it in, navigate your mac and turn bluetooth back on.
    If you have Apple Screen Share or Apple Remote Access you can use another Mac to log into your Mac and turn on bluetooth.
    Serious Accessbility Feature Requests for Apple (and yes I know this isn't the forum or place to put this, but it needs to be said):
    You need to go back and fix 10.8.4 to allow complete navigation of a Mac with a keyboard only.  You can use Command + SpaceBar and type System Preferences and then type BlueTooth, but once you are in the Bluetooth settings you can't use your keyboard to navigate to the ON option.
    You can't also navigate into System Preferences / Accessibility to turn Enable Mouse Keys (you need a mouse to turn this option on!).  The Mouse & Trackpad options should be made so that a keyboard could turn on/off this feature, because a lot of people trying to turn on this feature are folks like me who lost mouse/trackpad access!!
    Hopefully this helps others!  Hopefully Apple will do some basic UI improvements to bring back OS navigation for users who only have access to a keyboard or just a mouse/trackpad (no physical keyboard).  These kinds of tests should be part of every major OS release!

    http://apple.com/feedback/macosx.html

Maybe you are looking for

  • Clearing in previous year

    Hi there I have an issue in resetting (using FBRA) clearing GL document which belongs to 2007. This clearing doc has few line items, which were generated while clearing other GL docs . While I thought it might be due to a closed period, I tested in m

  • Lockbox - not all payment applied

    We have a unique situation here. When we upload our lockbox file, customer has two open items, one item was applied because the reference number matched, and the other payment was not applied because the reference number does not match. But instead o

  • Patch 7303030  FAILED: file cst4274743.sql on worker  1 for product bom use

    Hello I'm a noob to the Oracle world, and are trying to update our system from 12.0.4 to 12.1.3 I got to the point of installing patch 7303030 and I keep get this FAILED: file cst4274743.sql on worker 1 for product bom username BOM. I have looked in

  • My ipad mini is disabled. if i know my password is there a way i can fix it with out restoring it and losing my data? i have not done a backup.

    my ipad mini got disabled due to my little sister who used the wrong password. if i know my password is there a way i can fix it with out restoring it and losing my data? i have not done a backup. help me please!

  • AWM not doing Aggregation

    My Environment Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production ALL the required patches For AWN are applied. Analytical Workspace Manager - 9.2.0.4.1D ========================================= I have created a simple Star Schema Dimension