Category Filter

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.

Creating user accounts on all of your employee devices can be time-consuming for a large workforce. However, IT admins can remotely create admin accounts on their work devices with Hexnode’s custom scripting feature.

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.

Script to enforce an enterprise-grade passcode criterion on your macOS devices.

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.

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.

Script to hide or disable the different panes in System Preferences on your macOS devices.

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.

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 admin might need to shut down devices remotely. Hexnode allows admins to shut down Windows 10 devices by deploying scripts. The admin can delay the action according to their wish. This document contains the code snippets for shutting down the device. Batch Script

Powershell Script

Enterprise apps are apps that are tailored to meet the needs of an organization. Hexnode users can deploy scripts to download and install such apps on Windows 10 devices. Batch Script

E.g., To install a program ‘application.exe’ in the Desktop of the user Deborah, bitsadmin.exe /transfer “transfer123” http://download.url/application.exe C:\Users\Deborah\application.exe Start C:\Users\Deborah\application.exe PowerShell Script


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.

A user belonging to the ‘Users’ group does not have complete access to the device. Suppose you want to enable the administrator privileges to a user. You can easily get it done by writing commands to remove the users from the ‘Users’ group and add them to the ‘Administrators’ group. These commands can be embedded […]

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.

This article will tell you how to deploy scripts to find the login information of the last logged-in user on your Windows device. Many organizations have devices that are being used by multiple users. As an organization, have you ever wanted to monitor who’s logging into your Windows device and when? Monitoring and managing these […]

Block access to harmful websites to ensure a safe browsing experience for Windows users by executing a custom script.

It is simple to create a file or folder on a device. However, creating files and folders on a large number of devices in a specified location becomes a time-consuming task. Hence, you can simplify this process on Windows devices by deploying custom scripts from Hexnode. Create Files Batch Script

Create a file after […]

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.

Knowledge about files and folders on your devices helps you manage them easily. These scripts help you list all types of files and folders on your device.

Deploying trusted CA certificates to the devices in a work environment is crucial since certificates enable streamlined access to various services. They act as credentials, authenticate clients, perform encryption/decryption and can also be used to sign messages digitally. Though the uses may vary, organizations might be looking out for possible ways to install them without […]

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.

The script helps administrators to set up specific time zone on Windows devices remotely.

PowerShell script to enable users to automatically log in to the device without entering any 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 […]

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.

Low disk space on a device is a significant issue that can negatively impact the performance and productivity of the endpoints. Administrators would want to keep track of the available disk space on a device to check if a required amount of space is present, for instance, to push major OS updates or other company […]

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.

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.

Oh Sorry!, nothing matched with your search terms. Please try again with some different keywords.