Get Azure VNET private IPs which are in use

In my previous article I showed you how to set IP restirctions on WebApp. Today I want to show you how to get Azure VNET private IPs which are in use. Recently I was looking for PowerShell script which will help me to find VNET IPs which are already in use. The only command which I found was Test-AzureRmPrivateIPAddressAvailability. Unfortunately command can only check if specific IP address is available …

free disk space

Get free disk space from remote computers

One of the things that you have to monitor in your environment is free disk space. In this short article I want to share with you some code lines which help to create disk report. Free disk space Script is based on Get-WmiObject cmdlet which gets instances of Windows Management Instrumentation (WMI) classes or information about the available WMI classes. For more information please refer to Microsoft docs page. Script …

Get and set Azure WebApp IP restrictions using PowerShell

Today I want to share with you my 2 functions which will help you to manage Azure WebApp IP restrictions using PowerShell. IP restrictions in Azure WebApp allows define IPs from which WebApp / API will be available. All requests which will not match IPs defined in IP restrictions will be blocked. How functions works? Both functions are using Azure Resource Manager module in order to gather and set all …

PowerShell Tip of the Week: Compare two CSV files

In this article I wanted to show you how to compare two CSV files using Compare-Object command. It might be useful if you run some scans on regular basis and want to check if they contains the same data. Compare-Object Script is based on Compare-Object cmdlet which compares two sets of objects. One set of objects is the “reference set,” and the other set is the “difference set.” The result …

Get AD System info remotely using PowerShell function

In this post you will find out how to get basic AD system information using PowerShell function. There are multiple articles on our blog describing plenty of Active Directory aspects. This time I want to show you another great function which helps discover useful data from remote systems. Get AD System Using below function you can get the following information: – Computername – DomainDNSName – DomainShortName – ForestDNSName – IsNativeMode …

How to add progress bar in your PowerShell scripts?

Today you will learn how to add progress bar in your code. In last post I described how to combine CSV files and this time I’m gonna show how to use those files and add cool feature to script. Progress bar Script is based on Write-Progress cmdlet which displays a progress bar in a Windows PowerShell command window that depicts the status of a running command or script. You can …

PowerShell Tip of the Week: Combine multiple CSV files

Recently I had to combine multiple files and count unique users from them. Script is pretty simple but it might me useful in some troubleshooting sessions. Below you can find two examples about how can this be done. Combine CSV files I created folder called Files on my desktop and pasted there user lists in CSV format. Files contains multiple columns but I was focusing only on Samaccountname: File example …

Access Azure subscription using context

Recently I was a little bit annoyed by logging each time to Azure subscription, so I’ve preperaed the script to Access Azure subscription using context. What is context? Azure Context are metadata used to authenticate Azure Resource Manager requests. For more details please visit Microsoft docs site. How script works? Function which I prepared is used to save all contexts of Azure subscriptions assgined to account. As the input parameter …