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) …

Scanning XML file from internet – O365 Products

Recently I worked on script for checking if IP address found in ADFS dedicated load balancer logs matches the Office 365 products IP address ranges/subntes. List of products and IP address can be found on office support page and to make things easier XML file is also provided – link. For checking if IP address exists within subnet I let myself use the script from internet: http://www.gi-architects.co.uk/2016/02/powershell-check-if-ip-or-subnet-matchesfits/ We have script …

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 …

Use PowerShell to find specific SSL server certificate

This article might be useful if you have list of servers on which you want to make simple scanning for specific SSL certificate. In this example we will search for certificate which name contains word token. Please note that searching criteria should be based on your internal naming convention for certificates. Certificate location (Cert:\LocalMachine\My): Script can be run also as a verification step after certificate replacement activity. Output: Final script:

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 …

Get list of disabled ADFS relying parties

If you’re working with ADFS and your environment contains lots of Web Applications, this article might be useful for you. You can be asked at your work to get the list of disabled relying parties from ADFS database, especially in bigger companies. First of all we have to ensure that federation services cmdlets are installed. To get list of available modules you can run the following command: Get-Module -ListAvailable Another …

Reboot server remotely via PowerShell

I guess that all of the server administrators had this situation when server was not responding. If you don’t have access to iDRAC, iLO .etc the only way to fix the issue will be rebooting server remotely. So today I would like to show you couple of ways to do that. The easiest way is to run cmd as an administrator and use command: SHUTDOWN /r /f /t 0 /m \\servername /c …

How to export KeyVault certificates from Azure?

Todays article will describe how easly download KeyVault certificates (including private keys) to your computer. It can be very usefull in scenario where you want to authenticate to some web application but certificate is needed. It is not so easy to download certificate, including private key directly from Azure portal – for me it was impossible 🙂 In first way you must define password which will be used to install …

Pull out Azure metrics from each resource

I want to tell you a little bit about Azure metrics and how they can be usefull for you. For instance, if organization already has some monitoring system and don’t want to use Azure alerting for monitoring purpose it can use data from Powershell. Information taken from Powershell can be send via some API to monitoring system and that’s all. You’ve got custom solution without using alerting directly from Azure …

Create your first PowerShell function

For those who are starting their journey with PowerShell I prepared today short article describing how to create first simple function. To makes things a little bit complicated I added if/else conditions to give better functionality to our script. Function name is called Get-Sessions and it will check for Active Directory users sessions and status on some particular server.   I used if/else conditions to make sure that person who …