Installing and testing the new Azure Security Center Preview Cmdlets
UPDATE 23.09.2018: New Version 0.2 available. Works with the most current AzureRM.Profile now
CAUTION: This post handles pre-release software. Please test carefully in your Lab/Test environment first!
Last week the Azure Security Center (ASC) team released a preview of a new PowerShell module: AzureRM.Security center that allows for managing ASC automatically.
The current version contains these Cmdlets:
Name | Version |
Get-AzureRmDiscoveredSecuritySolution | 0.1.0 |
Get-AzureRmExternalSecuritySolution | 0.1.0 |
Get-AzureRmJitNetworkAccessPolicy | 0.1.0 |
Get-AzureRmSecurityAlert | 0.1.0 |
Get-AzureRmSecurityAutoProvisioningSetting | 0.1.0 |
Get-AzureRmSecurityCompliance | 0.1.0 |
Get-AzureRmSecurityContact | 0.1.0 |
Get-AzureRmSecurityLocation | 0.1.0 |
Get-AzureRmSecurityPricing | 0.1.0 |
Get-AzureRmSecurityTask | 0.1.0 |
Get-AzureRmSecurityWorkspaceSetting | 0.1.0 |
Remove-AzureRmJitNetworkAccessPolicy | 0.1.0 |
Remove-AzureRmSecurityContact | 0.1.0 |
Remove-AzureRmSecurityWorkspaceSetting | 0.1.0 |
Set-AzureRmJitNetworkAccessPolicy | 0.1.0 |
Set-AzureRmSecurityAlert | 0.1.0 |
Set-AzureRmSecurityAutoProvisioningSetting | 0.1.0 |
Set-AzureRmSecurityContact | 0.1.0 |
Set-AzureRmSecurityPricing | 0.1.0 |
Set-AzureRmSecurityWorkspaceSetting | 0.1.0 |
Start-AzureRmJitNetworkAccessPolicy | 0.1.0 |
With this module, you can configure important parts of your ASC automatically (e.g. enable Auto Provisioning, get ASC Alerts etc.).
Requirements
This module has some requirements:
- It needs the latest version (1.6.7) of PowerShellGet
- It needs a specific version of the AzureRM.Profile (5.5.0)
Install the module
To test this module, you have to follow these steps:
Open an admin PowerShell console
Update PowerShellGet
PS>Install-Module -Name PowerShellGet -Force
Install the right AzureRM.Profile version (in addition to newer versions that might already exists on your system)
PS>Install-Module -name AzureRM.Profile -requiredversion 5.5.0
Install the new ASC module
PS>Install-Module -Name AzureRM.Security -AllowPrerelease
Close the PowerShell
Test the new module
Open a new PowerShell console
Import AzureRM.Security
PS>import-module AzureRM.Security
Log on to Azure with an Account that has access to ASC
PS> Connect-AzureRmAccount
Test the Cmdlets, e.g.
PS> Get-AzureRmSecurityAlert
Happy testing!
If you notice any issues or have questions, please visit the PowerShell Gallery: https://www.powershellgallery.com/packages/AzureRM.Security/0.1.0-preview