A guide to turn off the printer sharing on Mac devices using Microsoft Intune
In this post, I will show you how to disable printer sharing on macOS using Intune policy. Using a DisablePrinterSharing.zsh shell script, you can turn off the macOS printer sharing feature via Microsoft Intune.
When you enable printer sharing on a Mac, it is set up as a print server to accept print jobs from other computers. Apple recommends using a dedicated print server or direct IP printing instead of printer sharing.
An organization recently approached me about stopping Mac users from enabling and using the printer sharing feature. Thankfully, the Mac devices in the enterprise were enrolled in Intune. However, they couldn’t locate a setting to turn off printer sharing for Mac in the settings catalog.
When I did some research, I discovered that there is no option to disable printer sharing for Mac devices in the settings catalog. So, I had to either use a script or a custom template to get this done. Thankfully, Microsoft provides a DisablePrinterSharing.zsh shell script to disable printer sharing, which I used and it worked.
https://flotte-plotter-otter.de/viewtopic.php?t=30007
https://flotte-plotter-otter.de/viewtopic.php?t=17572
https://flotte-plotter-otter.de/viewtopic.php?t=16652
https://flotte-plotter-otter.de/viewtopic.php?t=20937
https://winda.top/viewtopic.php?f=17&t=385381
https://winda.top/viewtopic.php?f=17&t=365189
https://winda.top/viewtopic.php?f=17&t=148750
https://winda.top/viewtopic.php?f=17&t=149723
https://jake2701.net.au/phpBB3/viewtopic.php?t=351
https://jake2701.net.au/phpBB3/viewtopic.php?t=14358
https://jake2701.net.au/phpBB3/viewtopic.php?t=26615
https://jake2701.net.au/phpBB3/viewtopic.php?t=2575
https://tucmas.fi/phpBB/viewtopic.php?t=102758
https://tucmas.fi/phpBB/viewtopic.php?t=104243
https://tucmas.fi/phpBB/viewtopic.php?t=101974
https://tucmas.fi/phpBB/viewtopic.php?p=221588
https://themastergames.com/mybb/thread-neuramap-2020--20971
https://www.2742bbs.com/forum.php?mod=viewthread&tid=4330
Prerequisites
Ensure that the following prerequisites are met when composing shell scripts and assigning them to macOS devices:
- Devices should be running macOS 12.0 or later.
- macOS devices must be enrolled and managed by Intune.
- The Mac devices are connected directly to the Internet. Connection through a proxy is not supported.
- Shell scripts begin with #! and must be in a valid location, such as #!/bin/sh or #!/usr/bin/env zsh.
- Command-line interpreters for the applicable shells are installed.
For deploying shell scripts using Intune, refer to my guide on how to run shell scripts on macOS devices in Intune.
Download DisablePrinterSharing.zsh Shell Script
Microsoft provides a shell script called ‘DisablePrinterSharing.zsh‘ that disables printer sharing on Mac devices. Download the latest version of this script from the Intune GitHub repository.
Disable Printer Sharing on macOS using Intune Policy
Follow the below steps to upload the DisablePrinterSharing.zsh shell script to Intune and create a policy that will disable printer sharing on macOS devices.
- Sign in to Microsoft Intune Admin Center.
- Navigate to Devices > macOS and select Shell Scripts.
- Click the Add button to upload the DisablePrinterSharing.zsh script for macOS.
Enter a name for the profile in the Basics tab of the Add Script pane. Add a brief description about the policy.
For instance, you can enter the following information for the Shell script:
https://www.2742bbs.com/forum.php?mod=viewthread&tid=1095
https://www.2742bbs.com/forum.php?mod=viewthread&tid=5223&extra=
https://www.2742bbs.com/forum.php?mod=viewthread&tid=11298&extra=
https://carpentryforums.com/showthread.php?tid=1802
https://www.forum.mybahaibook.com/showthread.php?tid=12288
http://googleseomastermind.com/viewtopic.php?t=21156
http://googleseomastermind.com/viewtopic.php?t=15482
http://googleseomastermind.com/viewtopic.php?t=36365
http://googleseomastermind.com/viewtopic.php?t=16995
https://amodsus.com/threads/transfer-admission-essays.10658/
https://foro.muelendhir.com/showthread.php?tid=24369
https://ekvall.co/showthread.php?tid=85882
- Name: Turn off printer sharing on Mac
- Description: Disable printing on a macOS that is managed by Intune
- Click Next.
On the Script Settings tab, upload the shell script. Click on the Browse icon and select the DisablePrinterSharing.zsh script.
If you’re using a custom script, keep in mind that the macOS shell script file that you upload must be less than 200 KB in size. You can view the script that has been uploaded, but you cannot edit or modify the script at this time.
Comments
Post a Comment