Configure PowerShell remoting for Azure VMs

Hey scripters, in todays article I want to show you how to configure PowerShell remoting for Azure VMs. Recently I wanted to run the script which will check installed software on all of my Azure VMs. Unfortunately I received following error from each of the machine. I thought that it is only the problem with firewall configuration on Azure VM, so I configure additional rulles to allow connection on port …

Get Office 365 users licenses

Hey scripters, today I want to show you how in easy way get Office 365 users licenses. Script which I’ve prepared connect to Office 365 tenant and in first step check all licenses. Once it is done all users which have attribute isLicensed flagged as True are gathered. In next steps script is filtering users base on license name and export those information to CSV files. Note: Remember to install …

PowerShell in Azure Cloud Shell now available!

On Ignite conference Microsoft announced public preview of PowerShell in Azure Cloud Shell! It’s really good news for Microsoft Azure Cloud and PowerShell enthusiasts 🙂 Till now only Bash was available in Cloud Shell, now end user can choose what is best for him. Probably some of you may ask “What is the difference between using PowerShell with Azure module on desktop and via Cloud Shell?” Here are some points …

How to create Azure Automation runbook

Today I will not show you any script, but will guide you how to create Azure Automation runbook. For those who didn’t heard about Azure Automation I strongly recommend to check Microsoft documentation – link. To make long story short – Azure Automation is the service in Azure cloud, which allow to automate repetitive tasks in your environment using Powershell :). Not only standard work which can be done on …

How to convert Azure VM to use managed disks

Did you ever hear about Azure managed disks? Do you know how to convert Azure VM to use managed disks? If for both question your answer is no, let me help you to explain what managed disks are and for which purpose they are use. Managed disks are new type of storage which is recommended to be used by Azure Virtual Machines. Managed Disks offer two types of storage options: …

Azure invoices are now available via API!

Today I want to talk about Azure invoices. Till now Azure invoices was available to download only from Azure Management Portal, but since last week it was changed. Now user which has proper access to subscription (Billing Reader and proper administrative access) can download Azure invoices programatically. However there are some limitations. API does not allows to download invoices for following subscription types: • Enterprise agreements • Support • Azure …

Create Azure VM using Powershell

Create Azure VM using Powershell is simpler than you think. In this article I want to show you how to do it in less than 20 lines of code. Let’s do it 🙂 First of all you must login to Azure Account and select subscription in which you want to create new VM. In next define 3 variables which will be used for storage account name, resource group name and …

Managing Azure Blobs snapshots

Let’s talk a little bit about managing Azure blobs snapshots on storage account. For those who are not familiar with storage account I reccomend to check Microsoft documentation https://docs.microsoft.com/en-us/azure/storage/storage-dotnet-how-to-use-blobs Backup management for files stored on blobs it’s not so easy as for other components like for example WebApps, where backup can be configured in Azure portal just by few clicks. But thankfully we have Powershell 🙂 To start backup (snapshot) …

Set your Azure WebApps backup schedule with Powershell

Recently I received a task to set Azure WebApps backup schedule. In normal way it will require to create storage account, containers for each application and Storage Access signature for each container. Until all prerquisites are not met we can’t set schedule on application. Hopefully we’ve got Powershell which is also usefull in this case. All work (including all prerequisites) can be done with one script. Below you can find …

Service principal – your service account to access Azure resources

Everytime you want to schedule some repeatable script which needs to use some specific permission you use service account. In on-premises environments it’s quite easy. You provide name of the account, add proper permission and set password to never expires. Everything can be done via Acitve Directory Users and Computers or Powershell. To do the same for cloud base environments you should register new application in Azure Active Directory with …