In Fleet you can execute a custom script to remediate an issue on your macOS, Windows, and Linux hosts.
Shell scripts are supported on macOS and Linux. All scripts will run in the host's (root) default shell (`/bin/sh`). Other interpreters are not supported yet.
PowerShell scripts are supported on Windows. Other types of scripts are not supported yet.
Script execution is disabled by default. Continue reading to learn how to enable scripts.
## Execute a script
You can execute a script using the `fleetctl` command-line interface.
To execute a script, we will do the following steps:
1. Enable script execution
2. Write a script
3. Run the script
### Step 1: Enable script execution
If you use Fleet's macOS MDM features, scripts are automatically enabled for macOS hosts that have MDM turned on. You're set!
If you don't use MDM features, to enable scripts, we'll deploy a fleetd agent with scripts enabled:
1. Generate a new fleetd agent for macOS, Windows, or Linux using the `fleetctl package` command with the `--enable-scripts` flag.
2. Deploy fleetd to your hosts. If your hosts already have fleetd installed, you can deploy the new fleetd on-top of the old installation.