Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article explains how to download and install the Defender for Cloud command-line interface (CLI) on supported operating systems. You can use the CLI to run scans and automate security workflows.
Download the CLI
The Defender for Cloud CLI is distributed as a standalone executable. Download the binary that matches your operating system and CPU architecture.
| Operating system | Architecture | Download URL |
|---|---|---|
| Windows | x64 (64-bit) | https://aka.ms/defender-cli_win-x64 |
| Windows | x86 (32-bit) | https://aka.ms/defender-cli_win-x86 |
| Windows | ARM64 | https://aka.ms/defender-cli_win-arm64 |
| macOS | Apple silicon (M-series) | https://aka.ms/defender-cli_osx-arm64 |
| macOS | Intel | https://aka.ms/defender-cli_osx-x64 |
| Linux | x64 | https://aka.ms/defender-cli_linux-x64 |
| Linux | ARM64 | https://aka.ms/defender-cli_linux-arm64 |
Set execution permissions (Linux and macOS)
On Linux and macOS, you must grant the downloaded binary permission to run.
Grant execution permission to the Defender binary so it can run on your system:
chmod +x defender
Tip
On macOS, you might see a Developer cannot be verified warning when running the CLI for the first time. To allow the binary, go to System Settings > Privacy & Security, and then select Open Anyway.
Add the CLI to your PATH (recommended)
Adding the CLI to your system PATH lets you run the defender command from any directory.
Linux and macOS
Move the Defender binary to /usr/local/bin, which is a standard location in your PATH. This lets you run the command from any directory:
sudo mv defender /usr/local/bin/defender
Windows
To add the Defender CLI directory to your Windows PATH, complete the following steps:
Create a folder. For example,
C:\tools\defenderMove
defender.exeinto that folder.In Windows Search, select Edit the system environment variables.
Select Environment Variables, then edit the Path variable under System variables.
Add the path to the folder you created. For example,
C:\tools\defenderSave your changes.
Verify the installation
Verify that Defender is installed and available in your PATH by checking the version:
defender --version
If the CLI is installed correctly, the command returns the current version.