Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Tethered Management of iOS Devices

9d350fa2294e1192f8f12b0ebf1a1d8b?s=47 Jamf
October 24, 2018

Tethered Management of iOS Devices

Presentation from JNUC 2018, the world's largest rally of Apple IT administrators.

Session:
Tethered Management of iOS Devices

Presented by:
Sal Soghoian, macosxautomation.com

View all session slides, recordings and more at https://www.jamf.com/events/jamf-nation-user-conference/2018/.

9d350fa2294e1192f8f12b0ebf1a1d8b?s=128

Jamf

October 24, 2018
Tweet

Transcript

  1. © JAMF Software, LLC Tethered Management of iOS Devices 11:15

    AM - 12:00 PM UP NEXT
  2. None
  3. © JAMF Software, LLC Sal Soghoian Automation Consultant Nyhthawk Productions

  4. © JAMF Software, LLC Tethered Management of iOS Devices Agenda:

    Create an automated device refresh station macOS computer Tethered iOS devices Minimal user-interaction Easy setup (no code)
  5. None
  6. None
  7. None
  8. One-to-One

  9. One-to-One

  10. One-to-One

  11. One-to-One

  12. Shared-Use

  13. Shared-Use

  14. Shared-Use

  15. Shared-Use One-to-One

  16. Shared-Use One-to-One

  17. Shared-Use

  18. Shared-Use Medical and Healthcare

  19. Shared-Use Retail and Services

  20. Shared-Use Professional

  21. Shared-Use

  22. Shared-Use

  23. Shared-Use Rental·Loaner Kiosks

  24. Shared-Use One-to-One Device Management Device Enrollment Program Volume Purchase Program

  25. Shared-Use One-to-One Device Management Apple Business Manager Apple School Manager

  26. None
  27. None
  28. None
  29. None
  30. None
  31. None
  32. None
  33. None
  34. None
  35. None
  36. None
  37. None
  38. None
  39. None
  40. None
  41. None
  42. None
  43. None
  44. None
  45. None
  46. None
  47. Restore · Erase · Prepare Supervision MDM · Profiles Document

    Ownership
  48. IT Restore · Erase · Prepare Supervision MDM · Profiles

    Document Ownership
  49. IT !

  50. “Accidental Administrators”

  51. None
  52. None
  53. None
  54. None
  55. None
  56. Get Connected Devices

  57. Get Connected Devices

  58. Restore Devices

  59. Restore Devices

  60. Prepare Devices

  61. Prepare Devices

  62. Rename Devices

  63. Rename Devices

  64. Install Wallpaper on Devices

  65. Install Wallpaper on Devices

  66. Install Wallpaper on Devices Rename Devices Prepare Devices Restore Devices

    Get Connected Devices
  67. None
  68. None
  69. None
  70. Home ▶ Library ▶ Scripts

  71. None
  72. None
  73. None
  74. None
  75. None
  76. None
  77. None
  78. Backup Specified Devices Choose Connected Devices Copy Documents to Devices

    Erase Devices Get Connected Devices Install Apps on Devices Install Profiles on Devices Install Wallpaper on Devices New Properties Table for Devices Prepare Devices Prepare Devices using Automated Enrollment Rename Devices Restore Devices Restore Devices from Backups Restore Devices from Specified Backups
  79. Run AppleScript Action AppleScript • AppleScriptObj-C

  80. JavaScript for Automation (JXA) Run JavaScript Action

  81. bash, csh, ash, sh, tcsh, zsh, perl, python, ruby Run

    Shell Script Action
  82. None
  83. None
  84. None
  85. Refresh on Attachment” Automatic setup when connected to a Mac

  86. Refresh on Attachment” Apple Configurator Automator Content Caching Device Management

    Tether Response Chain “
  87. Device Management

  88. None
  89. ************

  90. ************ ************

  91. “Open Enrollment” “Devices” “Blueprints”

  92. Link: https://qwerty.jamfcloud.com

  93. Link: https://qwerty.jamfcloud.com “Access Code”

  94. Link: https://qwerty.jamfcloud.com Link: https://qwerty.jamfcloud.com “Enrollment Link”

  95. “Blueprints”

  96. None
  97. None
  98. None
  99. Refresh on Attachment” Apple Configurator Automator Content Caching Device Management

    Tether Response Chain “
  100. Refresh on Attachment” Apple Configurator Automator Content Caching Device Management

    Tether Response Chain “
  101. Content Caching

  102. Content Caching macOS Sharing Preferences

  103. Content Caching Sharing Preferences > Content Caching

  104. Content Caching Sharing Preferences > Content Caching OK

  105. Content Caching Sharing Preferences > Content Caching

  106. Content Caching Shared content Software updates Apps iBooks Store &

    iTunes U Sharing Preferences > Content Caching Options…
  107. Content Caching Shared content Software updates Apps iBooks Store &

    iTunes U Cache settings Location · Size · Reset Sharing Preferences > Content Caching
  108. Refresh on Attachment” Apple Configurator Automator Content Caching Device Management

    Tether Response Chain “
  109. Refresh on Attachment” Apple Configurator Automator Content Caching Device Management

    Tether Response Chain “
  110. Apple Configurator

  111. Supervision Identity Apple Configurator Preferences

  112. Supervision Identity

  113. Supervision Identity Next

  114. Supervision Identity Skip

  115. Supervision Identity

  116. Supervision Identity Next

  117. Supervision Identity

  118. Supervision Identity

  119. Supervision Identity

  120. Supervision Identity

  121. Supervision Identity

  122. Supervision Identity Next

  123. Supervision Identity

  124. Supervision Identity Done •••••••••••••••• Update Settings

  125. Supervision Identity Show Supervision Identity…

  126. Supervision Identity

  127. Supervision Certificates

  128. Supervision Certificates

  129. Supervision Certificates

  130. Supervision Certificates

  131. Supervision Certificates

  132. Supervision Certificates

  133. Supervision Certificates

  134. Supervision Certificates

  135. Supervision Certificates Save

  136. Supervision Certificates Export

  137. Supervision Certificates

  138. Install Automation Tools

  139. Install Add Helper

  140. None
  141. Commands: activate add-tags backup clear-passcode erase | erase-content exec get

    | get-property get-unlock-token help | usage install-app install-doc | install-document install-profile list | list-devices pair prepare | set-cloud-config remove-app remove-tags rename | set-name restore | update restore-backup revive syslog unpair wallpaper
  142. Install Automation Tools

  143. Configuration Profiles

  144. None
  145. Type Parameters

  146. None
  147. None
  148. None
  149. None
  150. None
  151. None
  152. None
  153. None
  154. None
  155. None
  156. None
  157. None
  158. None
  159. WiFi.mobileconfig MDM.mobileconfig Apple Configurator

  160. Refresh on Attachment” Apple Configurator Automator Content Caching Device Management

    Tether Response Chain “
  161. Refresh on Attachment” Apple Configurator Automator Content Caching Device Management

    Tether Response Chain “
  162. Automator ConfigAutomation.com ▶ “Attached” Workflows

  163. OK ConfigAutomation.com ▶ “Attached” Workflows

  164. ConfigAutomation.com ▶ “Attached” Workflows

  165. None
  166. None
  167. None
  168. None
  169. Begin Attachment Workflow

  170. Begin Attachment Workflow

  171. Erase Devices

  172. Erase Devices

  173. Prepare Devices

  174. Prepare Devices

  175. Wait for Activation

  176. Wait for Activation

  177. Install Profiles on Devices

  178. Install Profiles on Devices

  179. End Attachment Workflow

  180. End Attachment Workflow

  181. End Attachment Workflow Wait for Activation Prepare Devices Erase Devices

    Begin Attachment Workflow Install Profiles on Devices
  182. ⌘S

  183. Home ▶ Library ▶ Workflows Save

  184. None
  185. Attachment Stub ECID

  186. USB Load Balancing

  187. None
  188. None
  189. None
  190. None
  191. None
  192. Attachment Stub

  193. Automator

  194. Refresh on Attachment” Apple Configurator Automator Content Caching Device Management

    Tether Response Chain “
  195. Refresh on Attachment” Apple Configurator Automator Content Caching Device Management

    Tether Response Chain “
  196. Tether Response Chain Attachment agent Command script Automator workflow

  197. None
  198. None
  199. Launch Agent Terminal Session

  200. Launch Agent Terminal Session

  201. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

    <plist version="1.0"> <dict> <key>KeepAlive</key> <true/> <key>Label</key> <string>com.NyhthawkProductions.attachAgent</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/cfgutil</string> <string>exec</string> <string>-a</string> <string>'/Users/otto/Library/Workflows/auto-attachment.command'</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist> Launch Agent
  202. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

    <plist version="1.0"> <dict> <key>KeepAlive</key> <true/> <key>Label</key> <string>com.NyhthawkProductions.attachAgent</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/cfgutil</string> <string>exec</string> <string>-a</string> <string>'/Users/otto/Library/Workflows/auto-attachment.command'</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist> Launch Agent
  203. <key>ProgramArguments</key> <array> <string>/usr/local/bin/cfgutil</string> <string>exec</string> <string>-a</string> <string>'/Users/otto/Library/Workflows/auto-attachment.command'</string> </array> Launch Agent

  204. cfgutil exec -a '/Users/otto/Library/Workflows/auto-attachment.command' Launch Agent Home Library LaunchAgents User

    Name
  205. Launch Agent #!/bin/bash launchctl load -wF /Users/otto/Library/LaunchAgents/auto-attachment-agent.plist #!/bin/bash launchctl unload

    -wF /Users/otto/Library/LaunchAgents/auto-attachment-agent.plist Home Library Scripts .SH .SH
  206. Launch Agent Command File Automator Workflow

  207. #!/bin/bash # set attachPID to Process ID of THIS thread

    export attachPID=$$ # Indicate the path to the Automator workflow file workflowPath=$(echo ~/Library/Workflows/attachment-workflow.workflow) # Execute Automator workflow passing in string containing environment variables automator -i "ECID=$ECID&attachPID=$attachPID&PATH=$PATH&UDID=$UDID&deviceName=$deviceName
 &deviceType=$deviceType&buildVersion=$buildVersion&firmwareVersion=$firmwareVersion&locationID=$locationID" "${workflowPath}" # Check if Cache File exists if [ ! -f ~/Library/Caches/com.apple.configurator.AttachedDevices/$ECID.plist ]; then echo "Cache file not found - Automator Workflow completed successfully" else # Cache file found - Need to check if the PID matches echo "Cache File Found - Test PID" # Get the PID from the file filePID=$(defaults read ~/Library/Caches/com.apple.configurator.AttachedDevices/$ECID.plist attachPID) if test $attachPID -eq $filePID then # The file was created by this PID so the Workflow Failed - Clean up echo "PID Match - Workflow has failed - Clean up" rm ~/Library/Caches/com.apple.configurator.AttachedDevices/$ECID.plist else # Re-Entry - Do Nothing echo "Re-Entry - Do Nothing" fi fi Command File
  208. #!/bin/bash # set attachPID to Process ID of THIS thread

    export attachPID=$$ # Indicate the path to the Automator workflow file workflowPath=$(echo ~/Library/Workflows/attachment-workflow.workflow) # Execute Automator workflow passing in string containing environment variables automator -i "ECID=$ECID&attachPID=$attachPID&PATH=$PATH&UDID=$UDID&deviceName=$deviceName
 &deviceType=$deviceType&buildVersion=$buildVersion&firmwareVersion=$firmwareVersion&locationID=$locationID" "${workflowPath}" # Check if Cache File exists if [ ! -f ~/Library/Caches/com.apple.configurator.AttachedDevices/$ECID.plist ]; then echo "Cache file not found - Automator Workflow completed successfully" else # Cache file found - Need to check if the PID matches echo "Cache File Found - Test PID" # Get the PID from the file filePID=$(defaults read ~/Library/Caches/com.apple.configurator.AttachedDevices/$ECID.plist attachPID) if test $attachPID -eq $filePID then # The file was created by this PID so the Workflow Failed - Clean up echo "PID Match - Workflow has failed - Clean up" rm ~/Library/Caches/com.apple.configurator.AttachedDevices/$ECID.plist else # Re-Entry - Do Nothing echo "Re-Entry - Do Nothing" fi fi Command File
  209. #!/bin/bash # set attachPID to Process ID of THIS thread

    export attachPID=$$ # Indicate the path to the Automator workflow file workflowPath=$(echo ~/Library/Workflows/attachment-workflow.workflow) # Execute Automator workflow passing in string containing environment variables automator -i "ECID=$ECID&attachPID=$attachPID&PATH=$PATH&UDID=$UDID&deviceName=$deviceName
 &deviceType=$deviceType&buildVersion=$buildVersion&firmwareVersion=$firmwareVersion&locationID=$locationID" "${workflowPath}" # Check if Cache File exists if [ ! -f ~/Library/Caches/com.apple.configurator.AttachedDevices/$ECID.plist ]; then echo "Cache file not found - Automator Workflow completed successfully" else # Cache file found - Need to check if the PID matches echo "Cache File Found - Test PID" # Get the PID from the file filePID=$(defaults read ~/Library/Caches/com.apple.configurator.AttachedDevices/$ECID.plist attachPID) if test $attachPID -eq $filePID then # The file was created by this PID so the Workflow Failed - Clean up echo "PID Match - Workflow has failed - Clean up" rm ~/Library/Caches/com.apple.configurator.AttachedDevices/$ECID.plist else # Re-Entry - Do Nothing echo "Re-Entry - Do Nothing" fi fi Command File
  210. #!/bin/bash # set attachPID to Process ID of THIS thread

    export attachPID=$$ # Indicate the path to the Automator workflow file workflowPath=$(echo ~/Library/Workflows/attachment-workflow.workflow) # Execute Automator workflow passing in string containing environment variables automator -i "ECID=$ECID&attachPID=$attachPID&PATH=$PATH&UDID=$UDID&deviceName=$deviceName
 &deviceType=$deviceType&buildVersion=$buildVersion&firmwareVersion=$firmwareVersion&locationID=$locationID" "${workflowPath}" # Check if Cache File exists if [ ! -f ~/Library/Caches/com.apple.configurator.AttachedDevices/$ECID.plist ]; then echo "Cache file not found - Automator Workflow completed successfully" else # Cache file found - Need to check if the PID matches echo "Cache File Found - Test PID" # Get the PID from the file filePID=$(defaults read ~/Library/Caches/com.apple.configurator.AttachedDevices/$ECID.plist attachPID) if test $attachPID -eq $filePID then # The file was created by this PID so the Workflow Failed - Clean up echo "PID Match - Workflow has failed - Clean up" rm ~/Library/Caches/com.apple.configurator.AttachedDevices/$ECID.plist else # Re-Entry - Do Nothing echo "Re-Entry - Do Nothing" fi fi Command File
  211. #!/bin/bash # set attachPID to Process ID of THIS thread

    export attachPID=$$ # Indicate the path to the Automator workflow file workflowPath=$(echo ~/Library/Workflows/attachment-workflow.workflow) # Execute Automator workflow passing in string containing environment variables automator -i "ECID=$ECID&attachPID=$attachPID&PATH=$PATH&UDID=$UDID&deviceName=$deviceName
 &deviceType=$deviceType&buildVersion=$buildVersion&firmwareVersion=$firmwareVersion&locationID=$locationID" "${workflowPath}" # Check if Cache File exists if [ ! -f ~/Library/Caches/com.apple.configurator.AttachedDevices/$ECID.plist ]; then echo "Cache file not found - Automator Workflow completed successfully" else # Cache file found - Need to check if the PID matches echo "Cache File Found - Test PID" # Get the PID from the file filePID=$(defaults read ~/Library/Caches/com.apple.configurator.AttachedDevices/$ECID.plist attachPID) if test $attachPID -eq $filePID then # The file was created by this PID so the Workflow Failed - Clean up echo "PID Match - Workflow has failed - Clean up" rm ~/Library/Caches/com.apple.configurator.AttachedDevices/$ECID.plist else # Re-Entry - Do Nothing echo "Re-Entry - Do Nothing" fi fi Command File
  212. Launch Agent Command File Automator Workflow

  213. Home Library Workflows Home Library LaunchAgents

  214. Refresh on Attachment” Apple Configurator Automator Content Caching Device Management

    Tether Response Chain “
  215. Refresh on Attachment” Apple Configurator Automator Content Caching Device Management

    Tether Response Chain “
  216. Device Refresh Erase and install the Profiles

  217. None
  218. None
  219. None
  220. None
  221. None
  222. None
  223. None
  224. None
  225. None
  226. ⌘R

  227. None
  228. None
  229. Apple Provisioning Utility Professional Shared-Device Deployment

  230. Apple Provisioning Utility  consultingservices@apple.com

  231. Apple Provisioning Utility Professional Environments · Mission Critical · Plug-and-Process

  232. Apple Provisioning Utility Batch process up to 40 iOS devices

    Dynamic dashboard interface Minimal setup (Automator workflow)
  233. None
  234. None
  235. None
  236. None
  237. None
  238. Apple Provisioning Utility Professional Shared-Device Deployment

  239. Tethered Management of iOS Devices

  240. configautomation.com Toolkit: actions · workflow · command · agent MDM

    Jamf | Now Flexible design automated enrollment Tethered Management of iOS Devices
  241. None
  242. IT Tethered Management of iOS Devices

  243. © JAMF Software, LLC Thank you for listening! Give us

    feedback by completing the 2-question session survey in the JNUC 2018 app. UP NEXT Providing the Best Mac Experience Possible, From the Mac CoE Team with — 1:30 PM - 2:15 PM