Introduction This is the 2nd instalment of the Automating OpsMgr series. Previously on this series: Automating OpsMgr Part 1: Introducing OpsMgrExtended PowerShell / SMA Module Few weeks ago, I have also published a post: Collecting ConfigMgr Logs To Microsoft Operation Management Suite – The NiCE Way, which demonstrated how to use an OpInsights integrated OpsMgr management group and NiCE Log File MP to collect ConfigMgr client and server logs into Microsoft Operation Management Suite. The solution I provided in that post included few sealed management packs and a demo management pack which includes few actual event collection rules for ConfigMgrContinue reading
Background The OpsMgrExtended PowerShell and SMA module is a project that I have been working on since August last year. I am very glad that it is now ready to be released to the community. This module is designed to fill some gaps in the current OpsMgr automation solutions provided natively in System Center 2012 suite. This module can be used as a System Center Service Management Automation (SMA) Integration Module, as well as a standalone PowerShell module. Currently, the following products are available when comes to creating automation solutions for OpsMgr: OpsMgr native PowerShell module OpsMgr Integration Pack for SystemContinue reading
Last Friday, I presented in the Melbourne MVP Community Camp day, on the topic of “Automating SCOM Tasks Using SMA”. I have uploaded the session recording to YouTube. You can either watch it here: If you’d like to watch it in full screen, please go to: https://www.youtube.com/watch?v=QW99bVFKg80 Or on YouTube: https://www.youtube.com/watch?v=QW99bVFKg80 You can also download the presentation deck from HERE. And Here’s the sample script I used in my presentation when I explained how to connect to SCOM management group via SDK:
#Script Name: Sample-ConnectMG.ps1
#Load SCOM SDK DLLs from GAC
[System.Reflection.Assembly]::Load("Microsoft.EnterpriseManagement.Core, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")
[System.Reflection.Assembly]::Load("Microsoft.EnterpriseManagement.OperationsManager, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")
[System.Reflection.Assembly]::Load("Microsoft.EnterpriseManagement.Runtime, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")
#Load SCOM SDK DLLs from a folder
#Connect to SCOM Management Group
$ConnectionSetting = New-Object Microsoft.EnterpriseManagement.ManagementGroupConnectionSettings("OpsMgrMS01")
#Optionally, specify username and password
$UserName = "Domain\SCOMAdmin"
$Password = ConvertTo-SecureString -AsPlainText "password1234" -force
$ConnectionSetting.UserName = $Username
$ConnectionSetting.Password = $Password
#Connect to SCOM Management Group
$MG = New-Object Microsoft.EnterpriseManagement.ManagementGroup($ConnectionSetting)
#Get Management Group Administration
$Admin = $MG.Administration
Overall, I think I could have done better – as I wasn’t in the best shapeContinue reading
On next Friday (30th Jan, 2015), I will be speaking at the Microsoft MVP Community Camp Day in Melbourne. I am pretty excited about this event as this is going to be my first presentation since I have become a System Center MVP in July 2014. My session is titled “Automating SCOM tasks using SMA”. Although this name sounds a little bit boring, let me assure you, it won’t be boring at all! The stuff I’m going to demonstrate is something I’ve been working on during my spare time over the last 6 month, and so far I’ve already writtenContinue reading
Background Many Microsoft System Center Orchestrator and Service Management Automation (SMA) users may agree with me, that these two automation platform does not have feature rich end user portals natively. Although System Center Service Manager can be used as a user portal for triggering SCORCH/SMA runbooks, Microsoft SharePoint is also a very good candidate for this purpose. Integrating SharePoint with Orchestrator and SMA is not something new, many people have done this already. i.e. System Center Universe America 2014 – Orchestrating Daily Tasks Like a Pro (by Pete Zerger and Anders Bengtsson) Service Management Automation and SharePoint (by Christian BoothContinue reading
Background Over the years that I’ve been working with OpsMgr, for me, the Microsoft Pinpoint MP Catalog was a one stop shop for getting Microsoft management packs. More information about the Pinpoint MP Catalog can be found in Marnix’s post: http://thoughtsonopsmgr.blogspot.com.au/2010/07/pinpoint-management-pack-catalog.html Based on the information came out in TechEd Europe 2014, looks like there will be changes introduced to the System Center Pinpoint site (http://channel9.msdn.com/Events/TechEd/Europe/2014/Ch9-34, from 09:00 onwards). And it seems the link from Marnix’s post https://pinpoint.microsoft.com/systemcenter is no longer valid. So I’ve decided to do some experiment, see if I can generate and maintain a Microsoft MP catalog on-premise,Continue reading
Over the last couple of days, I’ve spent sometime on Azure Automation (SMA in Azure). The first thing I did was imported and configured the SendEmail and SendPushNotification SMA Integration Modules that I have posted earlier. I created a simple test runbook to send an email and a push notification to my android phone:
#Get the contact details
$ContactName = 'tyang'
Write-Verbose "Getting SMA Address Book entry for $ContactName"
$Contact = Get-AutomationConnection -Name $ContactName
Write-Verbose "Contact: $Contact"
#Get SMTP settings
Write-Verbose "Getting SMTP configuration"
$SMTPSettings = Get-AutomationConnection -Name 'GmailSMTP'
$Subject = "Test message from Azure Automation"
$Message = "Hello, this is a test message from Azure Automation."
Write-Verbose 'Sending email'
$Send = Send-Email -SMTPSettings $SMTPSettings -To $Contact.Email -Subject $Subject -Body $Message -HTMLBody $false
#Android Push Notification
Write-Verbose 'Sending Android push notification'
Send-MobilePushNotification -os "Android" -apikey $Contact.AndroidAPI -Subject $Subject -Application 'Azure Automation' -Body $Message
However, I found 2 issues related to the SendEmail module. I’ll go through both of the issues in this post. Issue 1 When I executed this runbook, it failed to send the email message. I got this error: Cannot find the ‘Send-Email’ command. If thisContinue reading
Background At work, there is an implementation team who’s responsible for building Windows 8 tablets in a centralised location (we call it integration centre) then ship these tablets to remote locations around the country. We use SCCM 2012 R2 and MDT 2013 to build these devices using a MDT enabled task sequence in SCCM. The task sequence use MDT locations to apply site specific settings (I’m not a OSD expert, I’m not even going to try to explain exactly what these locations entries do in the task sequence). In order to build these tablets for any remote sites, before kickingContinue reading
Background For those who knows me, I’m an OpsMgr guy. I spend a lot of time in OpsMgr and I am very used to the way OpsMgr sends notifications (using notification channels and subscribers). In OpsMgr, I like the idea of saving the SMTP configuration and notification recipients’ contact details into the system so everyone who has got enough privilege can use these configurations (when configuring alert subscriptions). Over the last few months, I have spent a lot of time on SMA (Service Management Automation). As I started building more and more runbooks and integration modules, I really miss theContinue reading
Background I noticed an issue while I was writing a SMA integration module. I once made an mistake in the .json file and I noticed I couldn’t import the updated module back to SMA even after I firstly deleted the old version. I’ll explain this issue using a sample dummy module. Reproducing The Issue To reproduce the issue, I firstly created a dummy module with 3 files: The module .psm1 and the connection file .json (notice there’s a connection field named “ComputerName” in the .json file): I zipped and imported this module into SMA, everything looks good so far. andContinue reading