Optimized Group Maintenance Mode PowerShell for OpsMgr: 2012 R2 Edition

Below is the latest sample of optimized group maintenance mode for System Center Operations Manager (SCOM), which leverages the .ScheduleMaintenanceMode function, which allows for the inclusion of a request for recursion….the implementation of the “this object and contained objects”. This minimizes SDK calls and processing overhead for large groups. Syntax: GroupMaintMode -ScomServer “mmsscom01” -GroupDisplayName “SQL … Continue reading “Optimized Group Maintenance Mode PowerShell for OpsMgr: 2012 R2 Edition”

Free E-book: Inside the Microsoft Operations Management Suite

Tao (@MrTaoYang), Stan (@StanZhelyazkov), Anders (http://contoso.se)  and I have been working on a project for the last few weeks. We wanted to bring a learning resource for the MS Operations Management Suite to the community that is complete, comprehensive, concise…and free (as in beer). While we finish final editing passes over the next couple of weeks, we … Continue reading “Free E-book: Inside the Microsoft Operations Management Suite”

Centralized Logging Strategy for Azure Automation Hybrid Worker with OMS

Many System Center Orchestrator administrators longed for centralized logging of Orchestrator runbook events and results. With no native centralized logging facility, many administrators used a simple SQL database as a centralized logging repository. While not ideal, this method is functional for a single data center. Think about the challenges of implementing this strategy on a … Continue reading “Centralized Logging Strategy for Azure Automation Hybrid Worker with OMS”

How to Query Azure SQL Databases via PowerShell with SMO

In previous articles, I have demonstrated how to create Azure SQL Server and database instances via PowerShell in: How to Create an Azure SQL Instance via PowerShell How to Create an Azure SQL Database via PowerShell Certainly you could create both your Azure SQL Server instance and the database in the Azure Portal, so do … Continue reading “How to Query Azure SQL Databases via PowerShell with SMO”

How to stop and start Azure VMs in bulk

Starting and stopping Azure VMs in bulk is pretty easy in PowerShell, but you want to filter your VMs based on the correct property. VMs have a Status property that includes StoppedDeallocated, Stopped, RoleReady, etc. If you are attempting to identify VMs based on status, your PowerShell will have to write your script to filter on … Continue reading “How to stop and start Azure VMs in bulk”

How to find if an Azure VM exists via PowerShell

One task that can be help to optimize deployments in Azure is checking for the existence of a VM before you attempt to deploy. This can be particularly useful when you attempt to restart a failed deployment of multiple VMs. Because every VM in Azure resides within a cloud service, checking for a VM can … Continue reading “How to find if an Azure VM exists via PowerShell”

How to Create an Azure SQL Database via PowerShell

As I mentioned yesterday in “How to Create an Azure SQL Instance via PowerShell“, Azure SQL provides some cost advantages over running SQL in Azure VMs for scenarios where all you need is a database. In yesterday’s article, we created an Azure SQL database instance, as well as a firewall rule on the instance to … Continue reading “How to Create an Azure SQL Database via PowerShell”

How to Create an Azure SQL Instance via PowerShell

I wanted to share a bit about Azure SQL (PaaS) in Azure, as I believe it will commonly used by IT Pros in the future, particularly as a logging and reference databasew when working with Azure Automation. One compelling reason to Azure SQL instance of SQL Server in Azure VMs is cost. If you just … Continue reading “How to Create an Azure SQL Instance via PowerShell”

Retrieve the latest version of a Gallery Image in Azure PowerShell

Here is a handy snippet I use fairly often. When you retrieve an Azure gallery image by name, you will find there are multiple versions of the image. You will typically find at least two versions of each image, which can be differentiated by date, as shown below. Label       PublishedDate —–   … Continue reading “Retrieve the latest version of a Gallery Image in Azure PowerShell”