PowerShell Script to Import and Update Modules from PowerShell Repositories to Azure Automation

PowerShell Gallery has a very cool feature that allows you to import modules directly to your Azure Automation Account using the “Deploy to Azure Automation” button. However, if you want to automate the module deployment process, you most likely have to firstly download the module, zip it up and then upload to a place where the Azure Automation account can access via HTTP. This is very troublesome process. I have written a PowerShell script that allows you to search PowerShell modules from ANY PowerShell Repositories that has been registered on your computer and deploy the module DIRECTLY to the Azure

Command Launching Microsoft Monitoring Agent Control Panel Applet

I have been refreshing my lab servers to Windows Server 2016. I’m using the Non GUI version (Server Core) wherever is possible. When working on Server Core servers, I found it is troublesome that I can’t access the Microsoft Monitoring Agent applet in Control Panel: Although I can use PowerShell and the MMA agent COM object AgentConfigManager.MgmtSvcCfg, Sometime it is easier to use the applet. After some research, I found the applet can be launched using command line:

OpsMgr Alert Tuning using OpsLogix EZalert

OpsLogix has recently released a new product to the market called “EZalert”. It learns the operator’s alert handling behaviour and then it is able to automatically update Alert resolution states based on its learning outcome. You can find more information about this product here: http://www.opslogix.com/ezalert/. I was given a trail license for evaluation and review. Today I installed it on a dedicated VM and connected it to my lab OpsMgr management group. EZalert Walkthrough Once installed, I could see a new dashboard view added in the monitoring pane, and this is where we tune all the alerts: From this view,

New Blogger in the Family

I have been blogging for six and half years and to this moment, I’m still enjoying it. Few months ago my better half has decided to start blogging as well. Although my partner also works in IT as a project manager, her real passions are photography and cooking. She has decided to start a blog focused on food and recipes. By doing this, not only she gets to create her favorite dishes, she also gets to take pictures too. Then there was a lot of preparation to get her started. I helped her registered her chosen domain name, got a

Speaking at ExpertsLive Australia in April

As many of you may already know, the legendary System Center Universe franchise has been merged with ExpertsLive, which is also a popular community event over in Europe. As the result, the upcoming SCU Australia has been renamed to ExpertsLive Australia. Unlike last year, instead of just an one-day event, it is going to be a two day event, with 3 tracks: Cloud, Data Center and Enterprise Client Management. ExpertsLive Australia 2017 is going to be held at Crown Promenade Melbourne on 6th and 7th of April. I will co-present 2 sessions with my friend and MVP veteran Pete Zerger

cPowerShellPackageManagement DSC Resource Updated to Version 1.0.1.0

Few days ago I found a bug in the cPowerShellPackageManagement DSC resource module that was caused by the previous update v1.0.0.1. in version 1.0.0.1, I’ve added –AllowClobber switch to the Install-Module cmdlet, which was explained in my previous post: http://blog.tyang.org/2016/12/16/dsc-resource-cpowershellpackagemanagement-module-updated-to-version-1-0-0-1/ However, I only just noticed that despite the fact that the pre-installed version of the PowerShellGet module on Windows Server 2016 and in WMF 5.0 for Windows Server 202 R2, the install-module cmdlet is sightly different. The pre-installed version of PowerShellGet module is 1.0.0.1, and in Windows 10 and Windows Server 2106, Install-Module cmdlet has the “AllowClobber” switch: In Windows

PowerShell Script to Create OMS Saved Searches that Maps OpsMgr ACS Reports

Microsoft’s PFE Wei Hao Lim has published an awesome blog post that maps OpsMgr ACS reports to OMS search queries (https://blogs.msdn.microsoft.com/wei_out_there_with_system_center/2016/07/25/mapping-acs-reports-to-oms-search-queries/) There are 36 queries on Wei’s list, so it will take a while to manually create them all as saved searches via the OMS Portal. Since I can see that I will reuse these saved searches in many OMS engagements, I have created a script to automatically create them using the OMS PowerShell Module AzureRM.OperationalInsights. So here’s the script: View the code on Gist. You must run this script in PowerShell version 5 or later. Lastly, thanks Wei for

OMSDataInjection Updated to Version 1.2.0

The OMSDataInjection module was only updated to v1.1.1  less than 2 weeks ago. I had to update it again to reflect the cater for the changes in the OMS HTTP Data Collector API. I only found out last night after been made aware people started getting errors using this module that the HTTP response code for a successful injection has changed from 202 to 200. The documentation for the API was updated few days ago (as I can see from GitHub): This is what’s been updated in this release: Updated injection result error handling to reflect the change of the

DSC Resource cPowerShellPackageManagement Module Updated to Version 1.0.0.1

Back in September this year, I published a PowerShell DSC resource called cPowerSHellPackageManagement. This DSC resource allows you to manage PowerShell repositories and modules on any Windows machines running PowerShell version 5 and later. you can read more about this module from my previous post here: http://blog.tyang.org/2016/09/15/powershell-dsc-resource-for-managing-repositories-and-modules/ Couple of weeks ago my MVP buddy Alex Verkinderen had some issue using this DSC resource in Azure Automation DSC. After some investigation, I found there was a minor bug in the DSC resource. When you use this DSC resource to install modules, sometimes you may get an error like this: Basically, it

OMS Search Queries to Extract Rules from Various Assessment Solutions

Currently in OMS, there are 3 assessment solutions for various Microsoft products. They are: Active Directory Assessment Solution SQL Server Assessment Solution SCOM Assessment Solution Few days ago, I needed to export the assessment rules from each solution and handover to a customer (so they know exactly what areas are being assessed). So I developed the following queries to extract the details of the assessment rules: AD Assessment Solution query: Type=ADAssessmentRecommendation | Dedup Recommendation | select FocusArea,AffectedObjectType,Recommendation,Description | Sort FocusArea SQL Server Assessment Solution query: Type=SQLAssessmentRecommendation | Dedup Recommendation | select FocusArea,AffectedObjectType,Recommendation,Description | Sort FocusArea SCOM Assessment Solution query: Type=SCOMAssessmentRecommendation

%d bloggers like this: