Streamlining Azure Quota Management using PowerShell

Managing Azure resources efficiently requires a keen eye on various factors, one of the more critical being quota limits. Azure quotas dictate the maximum number of resources you can provision within your subscription. While these limits are set to ensure resource availability and performance, they can sometimes hinder your operations if not managed effectively.

In this blog post, I’ll cover how you can streamline the process of monitoring them. Traditional methods of reviewing quota limits through the Azure portal can be time-consuming, especially when dealing with multiple subscriptions. Each category must be loaded individually, leading to tedious navigation and potential oversight.

Fortunately, there’s a solution. I’ve created a PowerShell script designed to simplify and expedite the process of generating a comprehensive report on Azure quota limits. The script allows users to effortlessly gather data on quota limits, current usage, and identify any limits that are approaching or exceeding a predefined threshold.

Continue reading “Streamlining Azure Quota Management using PowerShell”

Enhancing Azure Security: Exporting a Role Assignments Report Easily

Ensuring the security of your Azure resources is paramount. With the ever-evolving threat landscape and the increasing complexity of cloud deployments, maintaining visibility and control over access permissions is crucial for safeguarding sensitive data and preventing unauthorized actions.

Regularly auditing Azure role assignments is a fundamental aspect of maintaining a robust security posture in Azure environments. By reviewing and validating who has access to what resources, organizations can identify and mitigate potential security risks, comply with regulatory requirements, and maintain accountability across their cloud infrastructure.

However, auditing Azure role assignments manually via the portal can be a time-consuming and error-prone process, especially in large-scale deployments with numerous users and resources. This is where automation comes to the rescue.

Continue reading “Enhancing Azure Security: Exporting a Role Assignments Report Easily”

How to Update Azure Resource Group Tags using a CSV & PowerShell

As businesses scale their operations in the Azure ecosystem, ensuring Resource Groups are appropriately tagged becomes a strategic imperative. Yet, merely tagging resources once isn’t enough; regular audits are necessary to maintain alignment with your policies and processes.

Moreover, streamlining this process through automation can significantly enhance operational agility and resource optimization.

Rather than inventing an entirely new tool, why not use the established tools that almost every business already has to hand and which most staff are familiar with?

In this brief article, I’ll cover how to export a list of all Resource Groups and their currently assigned Tags to an Excel CSV file where you can then easily and quickly review it collaboratively with your various resource owners, before using a short PowerShell script to enact any changes across your Azure environment.

Continue reading “How to Update Azure Resource Group Tags using a CSV & PowerShell”

How to Export Azure DevOps Service Connection Details using PowerShell

I’ve recently been looking to report on and remove old unneeded Azure Service Connections found in Azure DevOps and found that any actual information on how to do this or existing scripts to do it for me were sorely lacking. As such I’ve developed a working example, which can be found in the article below.

Continue reading “How to Export Azure DevOps Service Connection Details using PowerShell”

PowerShell – How-To Retrieve SPN’s for all Servers

Yet another short one with little context or reason.

A colleague of mine needed a list of all Service Principal Names assigned to all servers on the estate. Searches online brought us to a few potential solutions, most of which included the use of some difficult to use and understand .NET classes which appeared to be limited to only 1000 results.

So that got me thinking, these are just Active Directory attributes so why not use PowerShells very own Get-ADComputer?

The script below will list every single server in Active Directory and all assigned SPN’s, it will then export the list to a CSV.

Continue reading “PowerShell – How-To Retrieve SPN’s for all Servers”

PowerShell – Locate Inactive Users in Active Directory / Exchange On-Prem

Another short article with little context today.

The PowerShell script below will produce a report showing the Last Logon time of all enabled Active Directory users, it will also connect to Exchange On-Premise and request the last logon date of the mailbox. This can be useful to identify user accounts which are no longer in active use, even in organisations where mailboxes may have been retained once a user left.

There’s also a nifty status update built in that will tell you exactly how far the script has progressed and show an estimated time to completion.

Continue reading “PowerShell – Locate Inactive Users in Active Directory / Exchange On-Prem”

PowerShell – How to Retrieve Specific Events From All Servers

Occasionally you may have to implement something which will improve the security of your organisation but that does introduce a risk. Often the correct way to determine if it will cause issues is to enable logging and then to review those logs.

But what if you don’t have centralised logging?

This article does not replace a fully functional centralised event logging system which I would strongly suggest anybody have, however, it will allow you to retrieve specific logs from all servers in your estate. If your estate is too large then the script can be modified to instead of storing all of the data in the $allEvents variable you could simply append it to an Excel file inside of the for each loop.

Continue reading “PowerShell – How to Retrieve Specific Events From All Servers”