Onboarding Microsoft Defender for Cloud using PowerShell
You can onboard Microsoft Defender for Cloud and perform the initial configuration steps using PowerShell. These steps include setting the Microsoft Defender for Cloud coverage level, configuring Log Analytics Workspace, and installing an agent.
Getting ready
Before executing Microsoft Defender for Cloud PowerShell commands, you must perform some initial steps. Run PowerShell with administrative privileges. The latest Az modules need to be installed, as follows:
Install-Module -Name Az -AllowClobber -Scope CurrentUser
Ensure that an execution policy has been set:
Set-ExecutionPolicy -ExecutionPolicy AllSigned
Ensure that the Az.Security
module has been installed:
Install-Module -Name Az.Security -Force
How to do it…
To onboard Microsoft Defender for Cloud using PowerShell, complete the following steps: