Sample Script Repository
With Hexnode UEM, you may remotely execute scripts on devices running macOS 10.11 and above. This document equips you with a collection of shell scripts that Mac admins may find useful in their workflows. Echo command
The echo command writes arguments to the standard output. When you manually run the script on the Mac […]
The script enables you to modify the date and time on a fleet of devices without direct user interactions.
Script to set the time zone of macOS devices over the air seamlessly.
Customize the Cisco Roaming client's behavior/appearance on a fleet of macOS devices using this script.
The script helps to remotely shut down macOS devices along with providing granular control and automation over the shut down power option.
Run this script to remotely configure sleep settings such as display timeout period and scheduling sleep/wake-up events on macOS devices.
Execute this shell script to remotely open apps on your macOS devices by specifying the app name or identifier.
Script to force close an unresponsive app and all its running processes on a macOS device.
Script to uninstall applications and remove all associated app files from your macOS device.
This bash script can be used to remotely create files or folders on your Mac via Hexnode’s Execute Custom Script action.
Remotely open any file or folder on your macOS device by running this bash script via Hexnode’s Execute Custom Script action.
Script to copy a file or folder to a different location on your macOS device.
Script to move a file or folder to a different location on your macOS device.
Execute scripts from the Hexnode console to delete files/folders that are no longer needed on the devices. The given scripts use the rm command with the path to the file/folder to remove them selectively.
With Hexnode's Execute Custom Script action, run commands to remotely set up user accounts on a Mac. Also, assign admin privileges to these accounts and add them to specific groups as needed.
Remotely fetch the list of all users and their details from macOS devices by running this script from Hexnode UEM.
Want to change the user passwords on your Mac endpoints? Run this bash script using Hexnode’s Execute Custom Script action to remotely modify the login password associated with any user account on a Mac.
Script to remotely enable or disable Firewall on your Mac endpoints.
Want to upgrade to the latest available OS? Execute this bash script to remotely update your macOS devices using Hexnode’s Execute Custom Script action.
Using Hexnode UEM, admins can execute a simple Bash command to copy a given text to the clipboard on macOS devices.
Remotely configure wallpaper on your macOS device by running a Bash command through Hexnode UEM.
Remotely execute a custom Bash script to change the computer name, local hostname, and hostname of a macOS device using Hexnode’s Execute Custom Script action.
Filevault encryption protects sensitive corporate info against data breaches. You can ensure data encryption is active on workplace Macs and fetch its status with Hexnode's Execute Custom Script action.
Use Hexnode’s Execute Custom Script action to remotely grant or revoke admin privileges to users for handling those tasks that need admin access, from managing apps and accounts to other system-wide changes.
Hexnode allows IT admins to run commands remotely to turn off Wi-Fi on Macs using the Execute Custom Script action.
Bash script to install fonts to Font Book in macOS devices saves you the time-consuming process of making a particular font available to each user.
Bash script to fetch the login history of all the users that have been logged in to your macOS devices in the past few days and to check the last logged-in time of a particular user.
Bash script to check the Bluetooth power state and turn it on/off without involving direct user interaction in macOS devices.
Execute bash scripts to set up proxy configurations including FTP, Web (HTTP), Secure Web, Streaming, Gopher and SOCKS Firewall in macOS devices.
Bash script to set an empty string as the login password for your Macs, enabling users to log in to the device by clicking "Enter" without any password.
By executing a Bash script through Hexnode UEM, administrators can enforce the password requirement whenever the device wakes up from sleep or resumes from the screensaver.
Admins can remotely configure Wi-Fi connections on multiple devices simultaneously by executing a Bash script through Hexnode UEM.
Deploy a script to check the code signature of any app installed on macOS devices by using the Execute Custom Script action of Hexnode UEM.
Script to hide or disable the Profiles pane in System Preferences on your macOS devices.
Run this bash script using Hexnode’s Execute Custom Script action to activate remote ring on your misplaced macOS devices.
Use this bash script to delete a specific user account and all the files associated with the account.
IT admins can prevent users from adjusting the brightness levels on workplace Macs using Hexnode's Execute Custom Script action. Run customized commands to set the screen brightness on all macOS devices remotely.
Fetch the list of installed extensions on the Chrome browser and check if a specific extension is in use with Hexnode's Execute custom script action.
Bash script to enable and disable automatic app updates in the App Store for macOS devices.
With Hexnode UEM, admins can remotely customize the login window on the user's device by executing a Bash script. Hide user list and power options like shutdown, restart, and sleep on the login window.
Script to disable or enable AirDrop functionality on your macOS devices.
Easily create new users on Macs by deploying this script to the devices from the Hexnode portal.
Manually checking the file or folder size on multiple endpoints is tedious. Instead, IT admins can remotely fetch this info by running a custom script on the endpoint devices using Hexnode UEM.
On Macs, each file or folder is tied to a user account. However, manually altering file ownership can be tedious. Admins can change file ownership remotely using Hexnode's Execute Custom Script action.
Use Execute Custom Script action and run commands to list files from a specified path, view hidden files, and sort files in all subdirectories on a Mac.
Use Hexnode’s Execute Custom Script action on a Mac device to quickly find the path to a particular file using the file name.
Prevent users from restoring deleted files by overwriting the vacant space on a device. Erase free space on macOS drives by running custom scripts through Hexnode using the Execute Custom Script action.
Provide limited and private access to a Mac without a password for a new user using a guest user account. Admins may enable the Guest User option remotely with Hexnode UEM using Execute Custom Script action.
Execute a Bash script to remotely monitor the battery status of macOS devices.
Run a simple Bash script to remotely execute Disk Utility operations on macOS devices.
Remotely execute a simple Bash script to list all the applications running in the foreground on macOS devices.
Remotely create a sharing-only user account on the macOS devices by executing a Bash script.
Remotely retrieve all the required system information by executing a bash script on macOS devices.
Admins can remotely inspect the disk usage on end-user devices by utilizing Hexnode’s custom script functionality.
Configure printer settings to deploy and remove network printers using bash script in macOS devices.
Bash Script to easily track down and identify the apps and processes connected to the internet in macOS devices.
Script to lock and unlock files on your macOS devices to prevent and enable file modification using the chflags utility.
Permit and deny access to specific websites or URLs on the macOS devices using custom scripts.
Script to modify and manage time machine configurations to automatically backup the data of your macOS devices.
Schedule a periodic restart at the specified time on macOS devices using a bash script.
System administrators may have requirements to disable the different panes in System Preferences on an employee’s Mac to prevent users from making unwanted changes. With Hexnode’s Execute Custom Script action, admins can remotely hide or disable any System Preferences pane by executing the bash scripts below. Scripting Language – Bash File extension – .sh Disable […]
Bash script to enable and disable Notification Center for the currently logged-in user on macOS devices.
Admins can remotely customize Dock preferences for multiple endpoints by executing a custom Bash script through Hexnode UEM.
Enable Remote Management in Macs and let remote users manage the device with the help of the Apple Remote Desktop with Hexnode’s Execute Custom Script action.
Admins can remotely delete the browsing history of users stored on Google Chrome and Firefox applications by executing a Bash script through Hexnode UEM.
Fetch a list of admin user accounts and remotely check if a particular user has admin access by executing scripts using Hexnode's Execute Custom Script action.
Hide the VPN icon from the menu bar on macOS devices by executing a bash script through the Execute Custom Script action on Hexnode UEM.
This script lets you check if the users have signed in using an Apple ID and fetch the Apple IDs signed in by each user, if any, on Mac.
You can easily manage the device Wi-Fi settings by executing scripts. The Execute Custom Script lets you run them remotely.
Script to automatically launch required applications when users log in to their Macs.
Script to check if Find My Mac is enabled/disabled on macOS devices.
Add security certificates to Mac by initiating the download on the devices using the CURL command.
Execute this script to remotely install Rosetta 2 on Macs with Apple silicon chips.
Use customized commands to fetch the code requirement of an app remotely from macOS devices using Hexnode's Execute Custom Script action.
Using customized scripts to set Safari Homepage on all endpoint Macs using Hexnode’s Execute Custom Script action
Execute the Bash script to create a file, add contents to the created file and compress it into a zip file with password protection on macOS endpoints.
Use this bash script to list all the apps installed from the macOS App Store.
Use Hexnode's Execute Custom Script action to run a custom script that remotely wipes and reinstalls macOS on Intel and Apple Silicon devices seamlessly.
Bash script to add a secure token for a user account on macOS devices.
Seamlessly modify the system language of a Mac by running customized scripts using Hexnode's Execute Custom script action.
Execute the following script to create a disk image from a folder on the device.
Charging limits are set on macOS devices to extend their battery life. The bash script given in this document can be executed using Hexnode UEM to do so remotely.
Seamlessly change an app's default language on a Mac by running customized commands using Hexnode's Execute Custom script action.
Every user can be granted a combination of read, write and execute permission for each file/folder. Execute the bash script given in this document to modify these permissions using Hexnode UEM’s Execute Custom Script action.
Script to clear all types of cache files on macOS devices.
Finder Preferences can be modified according to the user’s requirement to enhance their experience. Use Hexnode UEM’s Execute Custom Script to execute the given scripts remotely.
Looking to encrypt or decrypt files on a remote macOS device? Deploy scripts to managed macOS devices to achieve this functionality.
Easily find the location, region, coordinates, time zone, region, network operator, postal code etc., of your Mac using its IP address by executing this custom script remotely via Hexnode UEM.
Script to remove badge notifications in macOS devices without any user intervention by deploying them via Hexnode UEM.
Execute scripts to fetch details of loaded kernel extensions on your Mac devices.
Admins can use the Bash scripts provided to retrieve the network info of remote macOS devices.
Location Services can be easily enabled/disabled on macOS devices by executing this custom script remotely via Hexnode UEM.
Admins can display the system usage information on a remote macOS device using the Bash scripts provided in this document.
Script to manage preference panes on macOS Ventura.
Execute this custom script to force enable/disable FileVault on Mac devices.
Hexnode's Execute Custom Script feature enables you to remotely fetch system and app logs from macOS devices using the built-in log command, which is located at /usr/bin/log. Easily troubleshoot system processes and applications with these commands.
The script can be used to deploy a ZIP file to macOS devices through a download URL.
Use these scripts to send custom notification alerts using terminal-notifier to users on their Mac.
Configure trackpad settings on Mac based on your preferences using Hexnode's Execute Custom Script action.
Disable automatic download of OS updates on macOS devices using these scripts.
Deploy these scripts to hide/unhide files and folders on macOS devices.
Change the alert sound and volume as per your preference using these scripts.
Modify the default screenshot configurations of macOS devices by executing the script given in this document with Hexnode UEM’s Execute Custom Script action.
Insufficient storage on corporate devices can hinder productivity as it may lead to performance issues for applications and processes. Among other methods to free up device space, administrators may choose to find and delete files larger than a specified size. If files are periodically backed-up to storage resources, deleting larger files from devices running low […]
Remotely set a screen saver photo slideshow on your macOS device by executing a custom script from the portal.
Oh Sorry!, nothing matched with your search terms. Please try again with some different keywords.
You can execute custom scripts on Windows 10(v1703+) and Windows 11 PCs, enrolled in Hexnode using the Hexnode Installer App. Hexnode supports .bat, .cmd, .ps1 script formats. Here are some sample code snippets for the most commonly executed tasks in Windows that you might find useful: Serial No Script 1 Enable/Disable Firewall 2 Add Windows […]
Execute customized scripts to enable/disable Firewall profiles or block ports for inbound/outbound traffic on your Windows device remotely using Hexnode's Execute Custom Script action.
Easily add Windows devices to an Active Directory domain with custom PowerShell scripts. It helps you add the device to the specified domain without direct access to the device.
An account in the 'Admin' group has total control over the device. To revoke a user's admin privileges, use commands to move users from the 'Admin' to the 'Users' group using Hexnode's Execute Custom Scripts action.
Deploy a custom script to restart Windows devices remotely with Hexnode's Execute Custom Script action. You can specify the time delay until the restart and even display a warning message before the restart.
The Execute Custom Script action for Windows lets you execute Batch or PowerShell script to perform customized operations. Here's a script that will help you shut down Windows devices remotely.
Download EXE files from a given URL and install it to a specific location on a Windows device using Hexnode’s Execute Custom Script action.
Execute this custom script to remove any store apps that you deem unnecessary on your managed Windows devices.
Get rid of unwanted enterprise applications on your managed Windows devices by executing this custom script.
This custom script lets you create user accounts on your Windows devices with the username of your choice and set the passwords remotely.
Use this custom script to add users to a group on Windows 10 devices to facilitate seamless user and group management.
It’s always a good practice to update your device passwords at regular intervals. Check out this custom script that helps you remotely change the passwords of your users on Windows devices.
Need to correct typos or standardize a name for the files on your devices? Here’s a custom script to rename files on your Windows devices as quickly as possible.
Want to free up your disk space or remove duplicate/unwanted files? Check out this script to remotely delete files and folders on your managed Windows devices.
Need to see all the existing user accounts on your devices? Check out this custom script that fetches information about all the available user accounts configured on your Windows devices.
Handling OS updates is no longer tedious when you have the power and flexibility to remotely run scripts via Hexnode UEM to get this job done.
Use this custom script to set the contents of the clipboard on your Windows devices so that users can paste it multiple times at multiple locations.
Use this custom script to download files from a given URL to a specific location on Windows devices over the air.
Keep track of all the networks that your corporate devices connect to. Here’s a custom script to fetch all the previously connected Wi-Fi networks on Windows.
Searching for a particular file? Execute this Batch/PowerShell script to list all the files on your Windows device with a particular extension.
Batch/PowerShell scripts to clear the user account password on Windows devices.
Tired of manually adding printers to your Windows devices? Use these Batch or PowerShell scripts to automate the whole process!
Have any issues with sound or audio on your Windows devices? Try restarting the Windows Audio Service by running these scripts from the Hexnode UEM console.
Certificates are unique, digitally signed documents used to authenticate and identify an organization or an individual. These certificates will expire over time and organizations will need to delete them. Hexnode UEM provides an option to delete certificates remotely on Windows devices by executing these scripts.
There are various ways of performing a backup in a Windows device. Hexnode UEM helps you to remotely backup files and folders to any location of your choice using custom scripts.
An account in the 'User' group has limited control over the device. To give a user admin privileges, use commands to move users from the 'Users' to the 'Admin' group using Hexnode's Execute Custom Scripts action.
Admins can use the Ping command to determine whether a host or IP address is reachable through a remote network connection. Remotely ping a website using Hexnode's Execute Custom Script action.
Use script to find the login information of the last logged-in user on your Windows device using Hexnode’s Execute Custom Script action.
Block access to harmful websites to ensure a safe browsing experience for Windows users by executing a custom script.
Use Hexnode’s Execute Custom Script action and run a custom script to create files and folders on Windows devices at a specified location.
How do you know if the same folder already exists when creating a new one? This script notifies you if a folder with the same name already exists on the specified path and only creates folders if it doesn't.
Data encryption helps maintain the integrity of company data on Windows devices. Check encryption status of drives on remote Windows devices by executing a script through Hexnode UEM.
Admins can retrieve a list of all the files and folders within the specified path on a remote device with the help of custom scripts.
Administrators can streamline user authentication to access various services using certificates. Hexnode UEM helps admins deploy certificates to Windows devices by executing scripts.
Execute a custom script through Hexnode UEM to alter the amount of inactive time that elapses before the pre-installed screensaver appears on the Windows device.
Batch/PowerShell scripts to copy files and folders to a specific location on Windows devices.
Create a folder and add a desktop shortcut to it by running this PowerShell script on your Windows devices.
Is your device slowing you down? Run this Batch/PowerShell script to clear all caches and temporary files on your Windows device.
PowerShell script to access the event logs of a Windows device.
Script to set a desktop wallpaper on Windows devices.
Inspect the users' browsing history across Google Chrome, Firefox and Microsoft Edge by deploying PowerShell scripts on their Windows devices.
Remotely set a screensaver for all users or a specific user on your Windows endpoints by using PowerShell scripts.
Clear the browsing history of Google Chrome on Windows devices by remotely executing the following Batch/PowerShell scripts.
PowerShell script to deploy Cisco Umbrella Roaming Client on your Windows endpoints. Additionally, invoke parameters to customize the appearance and behavior of the roaming client.
Execute Batch or PowerShell scripts to display a specific or comprehensive list of various system information of your Windows devices.
With Hexnode's Execute Custom Script, run customized scripts to fetch the current time zone and set a uniform time zone across devices located in different time zones.
Use Hexnode’s Execute Custom Script action and run a customized script to remotely unlock a Windows device and sign in to it without entering device credentials.
Impose screen time limits for your Windows user by remotely executing a Batch command through Hexnode UEM.
With the Execute Custom Script action, you have a different alternative to change the default system fonts on Windows devices remotely.
PowerShell script to allow users access only to essential third-party applications on your Windows endpoints.
Never compromise on data security when your corporate devices are lost or stolen. Here’s a custom script to completely wipe your Windows devices remotely in just a handful of steps.
Execute PowerShell script from the Hexnode portal to enable/disable Microsoft Accounts on specific or all of your Windows devices.
Execute PowerShell script to prevent the installation of MSI files by disabling Microsoft Installer. Additionally, check out the script to disable a particular user from installing .exe files.
Clear cache data stored on Windows device by browsers using execute custom script action in Hexnode UEM.
This script allows you to delete a specific local user account on your Windows device.
Chrome extensions extend the capabilities of the Google Chrome web browser by improving its functionality and customization. The vast repository of extensions eases our daily chores, from optimizing schedules to blocking unwanted ads. Using Hexnode, you can remotely deploy various custom scripts that let you manage the use of various Chrome extensions on your Windows […]
Admins can use the PowerShell scripts provided to retrieve the login history on remote Windows devices.
Want to configure file or folder permissions on your Windows device? Hexnode provides admins with the script to set permissions on files or folders for Windows users.
Set your preferred format for displaying the date on your Windows devices using this PowerShell script.
Execute Batch/ PowerShell script to turn off automatic updates of Microsoft store apps on Windows devices.
Script to change the default browser on your Windows devices.
Generate MDM logs to help administrators troubleshoot issues on Windows devices enrolled in the Hexnode console.
PowerShell script to download and install driver updates on Windows devices.
Change the device name of your Windows device by executing this PowerShell script using the Execute Custom Script action.
BitLocker is a built-in full volume encryption tool in Windows devices introduced by Microsoft to enhance security by enforcing encryption for system drives, fixed data drives and removable data drives. It prevents unauthorized access of corporate data on lost or stolen Windows devices by encrypting the system volume on the hard disk. The BitLocker recovery […]
Deploy PowerShell and Batch scripts via Hexnode UEM to silently download and install the Google Chrome browser on Windows devices.
Fetching a list of all installed apps on a device helps administrators have a bird’s eye view of all the apps being accessed by a user on the corporate device as well as identify any apps that the user may be lacking. This can also help identify potentially hazardous applications that may threaten the system. […]
Retrieve battery health and charge status of your Windows devices using Hexnode’s Execute Custom Script action.
Script to check the available disk space on Windows devices.
The scripts described here help you fetch a list of running processes on your Windows devices.
Fetch Windows license details with custom PowerShell scripts using Hexnode’s Execute Custom Script action.
These custom scripts let you fetch information about drives on your Windows device to facilitate file management.
Fetch the details of installed certificates on Windows devices with custom PowerShell scripts using Hexnode’s Execute Custom Script action.
Remotely force close apps on your Windows 10/11 devices by deploying PowerShell or Batch scripts via Hexnode UEM’s Execute Custom Script action.
Bash and PowerShell scripts to check the size of all items in a specified folder in Windows devices using custom scripts.
Admins can remotely manage Remote Desktop and Remote Assistance on Windows devices by executing a custom PowerShell script through Hexnode UEM.
Use scripts to configure the homepage in Microsoft Edge on your Windows devices.
PowerShell script to change the Bluetooth state without user interaction on Windows devices.
Deploy PowerShell scripts via Hexnode UEM to install/uninstall software packages on Windows 10/11 devices.
Execute this custom script to convert text from a file to uppercase or lowercase on Windows devices.
Use Hexnode UEM to remotely run a custom script to quickly determine the location, region, coordinates, time zone, network operator, postal code etc., of your Windows device using its IP address.
Check expiration dates of digital certificates present in Windows 10/11 devices using PowerShell and Batch scripts deployed via Hexnode UEM.
Easily retrieve your Windows device’s Mac address by executing Batch or PowerShell scripts remotely using Hexnode’s Execute Custom Script action.
The scripts here help you install and uninstall Firefox on your Windows devices.
Manage your current working directory on Windows devices using these PowerShell scripts.
Deploy PowerShell and batch scripts to hide the restart option on Windows 10/11 devices using the Execute Custom Script action of Hexnode UEM.
Deploy PowerShell scripts to remotely append content to new or existing files stored in Windows devices by using the Execute Custom Script action of Hexnode UEM.
Create self-signed certificates for Windows devices by invoking the New-SelfSignedCertificate command.
Use this custom script to edit the registry key on Windows devices to turn on/off permission to access location services for apps.
Manage registry keys on your Windows devices using Hexnode’s Execute Custom Script feature.
Execute this script to remotely enable/disable Remote Desktop on your Windows device.
Fetch the event logs of shutdown events on your Windows device remotely by executing this custom script via Hexnode UEM.
Script to block unwanted applications on your Windows devices.
Execute this script to remotely uninstall a specific version or any version of Chrome.
Use Hexnode’s Execute Custom Script action to configure and enable BitLocker on Windows devices.
Use Batch or PowerShell scripts to disable BitLocker encryption for a volume on your Windows devices.
Deploy PowerShell and batch scripts to suspend or resume BitLocker protection on Windows 10/11 devices using the Execute Custom Script action of Hexnode UEM.
Automate the process of starting processes on your Windows devices using Hexnode’s Execute Custom Script feature.
Execute a PowerShell script to fetch the location coordinates of your Windows device.
Deploy a script to play a beep sound on Windows devices to notify the user or check their device speaker’s functionality.
Want to protect your files from ransomware? Check out the PowerShell scripts to manage controlled folder access on your Windows devices.
Execute this custom script to hide the Sleep option from the Start menu on Windows devices.
Define the available Sign-in options for users by utilizing this custom script to restrict or allow access to Sign-in options.
Enroll cloud-managed Chrome browsers on your Windows devices using a PowerShell script.
Script to display Firewall profile settings on your Windows devices.
Deploy scripts to play converted text-to-speech output on Windows devices, making it possible to communicate announcements to users.
Manage registry entries on your Windows devices using Hexnode’s Execute Custom Script feature.
Deploy PowerShell and batch scripts to clear cache for the Microsoft Teams app on Windows devices using the Execute Custom Script action of Hexnode UEM.
Deploy this PowerShell script to restart Google Chrome on Windows devices to boost efficiency or when it is time for a Chrome update.
Deploy PowerShell and batch scripts to create and add content to CSV files on Windows devices using the Execute Custom Script action of Hexnode UEM.
Script to allow access to the Downloads folder in File Explorer on a Windows device locked down in a multi-app kiosk mode.
Fetch the Application User Model ID (AUMID) of installed applications in Windows using PowerShell script.
Execute this custom script to hide or unhide the Hibernate option from the Start menu on Windows devices.
Deploy PowerShell scripts to find, remove, or rename files with duplicate filenames on Windows 10/11 devices by using the Execute Custom Script action of Hexnode UEM.
Use the scripts to restrict users from using keyboard shortcuts on Windows and the Microsoft Edge browser.
Schedule custom messages for Windows devices by executing the script given in this document with Hexnode UEM’s Execute Custom Script action.
Modify WinRE configurations on your Windows devices by executing the script given in this document with Hexnode UEM’s Execute Custom Script action.
This script will help you fetch different device parameters that determine the device's performance.
Deploy PowerShell and Batch scripts to set/update active hours on Windows 10/11 devices by using the Execute Custom Script action of Hexnode UEM.
The scripts allow admins to easily monitor the status of Diagnostic Data Viewer, enable or disable its functionality, delete diagnostic data on devices, and control data store capacity.
Windows devices’ master volume can be easily modified by executing this custom script remotely via Hexnode UEM.
Apps can be auto launched in multi-app kiosk modes on Windows devices by executing this custom script remotely via Hexnode UEM.
Enable or disable Windows optional features on your devices by executing the following scripts.
Oh Sorry!, nothing matched with your search terms. Please try again with some different keywords.