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 …

How to use Cloud Shell in Visual Studio Code

Today’s post will not show you any PowerShell script, but hope it will show you how to use cloud shell in Visual Studio Code 😉 What is Cloud Shell? If you follow our blog a little bit longer you can probably read article PowerShell in Azure Cloud Shell now available!. To make long story short, for those who are not familiar with Cloud Shell – it’s an interactive shell available from …

PowerShell Tip of the Week: Check connectivity to multiple servers

You can find multiple articles on our blog about checking connectivity. This time I want to show you how to check it for bunch of servers on specific port. Check connectivity Script will use Test-NetConnection command where you can specify port number. For single machine you can use the following one-liner script: On the beginning you have to provide servers and destination servers againts which you want to check connection: …

Get ADFS token requests remotely using PowerShell

Today I want to share simple script for getting ADFS token requests remotely. It might be useful if you want to ensure that load is equally processed in your farm. ADFS token requests Script is based on Get-Counter command where we have to specify ADFS tokens counter “\AD FS\token requests/sec”. It monitors the number of token requests sent to the federation server including SSOAuth token requests per second. More info …