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: 2minutesAzure Kubernetes Service (AKS) has rolled out a new feature in preview: the AKS Security Dashboard. This dashboard centralizes security insights, making it easier for cluster administrators and resource owners to identify and address vulnerabilities Read more…
Reading Time: 4minutesAlright, I’ll admit it, I’m a bit biased towards Azure AKS. It’s hard not to be, given the depth of automation and integration it offers. But that doesn’t mean I can’t appreciate a solid effort Read more…
Reading Time: 3minutesAzure Kubernetes Service (AKS) has just released a new preview feature called Optimize for undrainable node behavior, designed to make the upgrade process smoother. This feature lets you control how upgrades handle nodes that can’t Read more…
0 Comments