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 […]

Script to remotely enable or disable Firewall on your Mac endpoints.

Customize the Cisco Roaming client's behavior/appearance on a fleet of macOS devices using this script.

The script enables you to modify the date and time on a fleet of devices without direct user interactions.

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 hide or disable the Profiles pane in System Preferences on your macOS devices.

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.

Script to set the time zone of macOS devices over the air seamlessly.

Execute bash scripts to set up proxy configurations including FTP, Web (HTTP), Secure Web, Streaming, Gopher and SOCKS Firewall in macOS devices.

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.

Bash script to enable and disable automatic app updates in the App Store for 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.

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.

Script to disable or enable AirDrop functionality on your macOS devices.

Script to modify and manage time machine configurations to automatically backup the data of 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.

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.

Homebrew is a package manager that downloads libraries, packages, and other dependencies required to execute apps in any environment. Use Hexnode's Execute Custom Script action to deploy Homebrew remotely via scripts on Macs.

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.

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

You can execute custom scripts on Windows 10 running version 1703+, 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 to […]

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.

Adding Windows devices to an Active Directory domain is no more a hassle. You can get it done quickly by creating PowerShell scripts to be executed from the Hexnode portal. It adds the device to the specified domain without requiring direct access to the device. PowerShell script to add a Windows device to the domain […]

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.

As organizations become more application-centric, corporate devices will need to handle more applications over time. Unfortunately, using more applications can lead to extended use of the Random Access Memory (RAM), which can degrade device performance. Restarting a Windows device clears the device’s RAM and improves its performance. Device restart also initiates the installation of pending […]

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.

Many organizations require printers for their daily works. Manually adding printers to employees’ devices is a tedious task. The installation and configuration procedure can be automated to save time and make the process easier. You can manage printers on Windows 10 devices remotely by executing custom scripts via Hexnode. Batch Script Add a network printer […]

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.

Windows 10 has a plethora of ways to back up and restore your data – File History, System Image Recovery, System Restore, just to name a few. However, if you’re someone who wants to doubly secure their data backups just to be on the safe side, you can also achieve the same by executing a […]

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 […]

Ping is a command-line utility that checks if an IP address or host is accessible over a network connection. To check the accessibility of a website, the Ping command sends data packets to the target address and waits for the response. A successful ping is registered if the data packets are returned without damage. IT […]

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.

Managing files and folders on devices becomes easier if they are sorted and easily retrievable. Hexnode UEM allows you to view and list all files and folders on Windows devices using custom scripting feature. PowerShell Commands 1. List of Files and folders

The Get-ChildItem returns a list of all files/folders present in the specified […]

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 […]

A screensaver is set to turn on after a period of inactivity of the user. It is important to protect your devices when unattended as it is vulnerable to potential intruders. A screensaver prevents someone from viewing your personal files and can also be used as a medium to display your brand when idle. You […]

Batch/PowerShell scripts to copy files and folders to a specific location on Windows devices.

Saving too many files on your desktop may slow down the system and make it harder to organize files. In addition, files on the desktop are not as secure as the files in libraries like ‘My Documents’ when you use System Restore or run file-based backup programs. Therefore, it is recommended to create shortcuts on […]

Clearing all caches in Windows usually helps a lot if your device is slowing down or exhibiting suboptimal performance. This usually happens when you’ve been on the internet for a while, installed Windows updates, or haven’t reset your computer in a long time. For a variety of reasons, clearing your cache on a regular basis […]

Windows device logs are detailed records of events in the operating system or the installed applications. As a system administrator, you can analyze these logs to troubleshoot any particular issue that occurs on the device. With Hexnode’s Execute Custom Script action, you can push custom scripts to remotely fetch the device logs on your Windows […]

Hexnode UEM automates the execution of proactive IT tasks on Windows 10 with the help of custom scripts. For example, you can create Batch file scripts or PowerShell scripts to perform necessary operations, which can be executed on the devices remotely from the Hexnode console. This doc helps you create custom scripts to change the […]

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.

Cisco Umbrella is a cloud-based security service that provides a wide range of security functions in a single platform. With the help of the Umbrella roaming client, enterprises can extend its protection to all users even outside the corporate network. Cisco Umbrella offers command-line installation of the roaming client on Windows devices and allows customization […]

Batch/PowerShell commands to collect 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 […]

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