Copy managed disks between Azure subscriptions using PowerShell

Hey Folks! In todays article I want to show you how to copy managed disks between Azure subscriptions using PowerShell. Script is very easy in use. The only things which you should provide are variables on the beginning like subscription ids, resource groups etc. As a result .vhd file will be created under destination container on storage account. Remember that Azure account under which script for copy managed disks between …

Get domain role and PC type from remote computers

Today I want to show how to get domain role and PC type using PowerShell function. You can get this information easily using 1 liner script but results will be presented as numbers. Domain role and PC type Function is based on Get-WmiObject command and it query Win32_computersystem class. To get “PC type” and “Domain Role” using just one command we have to use Select-Object cmdlet after the pipeline: Unfortunelty …

ADFS_product_version

Get ADFS product version using PowerShell

In this short arcticle you’re gonna find out how to check ADFS product version on multiple remote servers. Recently I had to scan my environment for auditing purpose. One of the tasks was to compare ADFS service product version. ADFS product version To check it on single machine we can use Get-Item cmdlet: It getting a little bit more complicated if you have plenty of severs and they are Server …

PowerShell Tip of the Week: Create Invoke-WebRequest from Chrome

This week PowerShell tip will show you how to create Invoke-WebRequest from Chrome. Each scripter who wanted to properly use Invoke-WebRequest command to access some url knows that it is not so easy. Every time headers or some additional settings must be adjusted to properly gather all the data. Last update of Chrome web browser gives awesome functionality for PowerShell developers. In Chrome Dev Tools option to copy whole Invoke-WebRequest …

Get Azure Webjobs failed runs using PowerShell

Todays article will show you how to get Azure webjobs failed runs using PowerShell. Recently I was asked to prepare monitoring for Azure webjobs. I thought it will be quite simple and Application Insights can be used for this purpose. Unfortunetly to use Application Insights for this purpose additional development (telemetry implementation inside code) is needed. How script work? To get Azure webjobs failed runs script is connectig via API …

Get Azure subscription quota limits using PowerShell

Today I want to show you function to gather Azure subscription quota limits. Recently for one of the customer I had a problem with quota limit for static IP addresses. Standard limit was reached quite quickly and I had to create support request in Azure to increase this limit. To be more proactive in the future I’ve created script which gather all Azure subscription quota limits and show usage in …

Create Azure VNET peering using PowerShell

Today I want to show you how in easy way create Azure VNET peering using PowerShell. What is VNET peering? VNET peering allows to connect virtual networks to each other. When virtual networks are peered, all resourcses inside those networks are able to communicate the same way and with the same bandwidth if the resources will be created in the same virtual network. Script: Example of usage: I hope it …

How to create dump files remotely (ProcDump) using PowerShell?

Recently I had to create memory dump files for multiple remote servers. I found great tool called ProcDump on Microsoft page which can do it. Unfortunately it can’t be run remotely so I had to combine this tool features with PowerShell commands. ProcDump ProcDump is a command-line utility whose primary purpose is monitoring an application for CPU spikes and generating crash dumps during a spike that an administrator or developer …

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 …