Recently the Azure Security Center (ASC) team have released a preview of a new PowerShell module they have been working on, AzureRM.Security. This module is designed to allow you to manage the ASC automatically. You can view the module on the PowerShell gallery here. Below I will show you how to install the module and run a few commands to show you want it does.
First
look
Requirements
To be able to use
this module you will need to make sure you meet the following requirements:
PowerShellGet version
1.6.7 or later
AzureRM.Profile version
5.5.0 or later.
The
Installation
Open PowerShell
in admin mode and type the following to Update
PowerShellGet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now enter this
command to install the correct version of AzureRM.Profile.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now you can
actually install the new module by using:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Open a normal
PowerShell window and type the following to load the correct version of AzureRM.Profile.
(The newest one is not currently supported.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now we can actually use the module. First, you will need to login to your Azure account. You will need to use a user that has access to the ASC.
In the PowerShell
window type the following to connect to Azure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hmm, this one seems broken. Well it is in preview still. Lets try another.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To get a list of the cmdlets use the following command.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I’m Richard Hooper aka Pixel Robots. I started this blog in 2016 for a couple reasons. The first reason was basically just a place for me to store my step by step guides, troubleshooting guides and just plain ideas about being a sysadmin. The second reason was to share what I have learned and found out with other people like me. Hopefully, you can find something useful on the site.
Reading Time: 4minutesShare:Every so often, Microsoft quietly updates an existing docs page and sneaks in a feature that solves a problem you didn’t even realise was fixable. The MaxUnavailable fallback is one of those. I picked it Read more
Reading Time: 8minutesShare:Microsoft recently released a public preview of cert-manager as an Azure Arc Kubernetes extension. The docs focus entirely on Arc-enabled clusters, which makes sense given it shipped under the Arc umbrella. But I wanted to Read more
Reading Time: 7minutesShare:I spotted this in the AKS release notes recently and it is worth paying attention to if you are running multi-zone clusters. Microsoft has added managedNATGatewayV2 as a new outbound type for AKS, and the Read more
0 Comments