OMS – Error "Run Login-AzureRMAccount to Login" e.g. OMS Cmdlets

error-red-key-595x335

I wanted to play with the OMS cmdlets which are part of the AzureRM modules. The OMS / OperationsInsights module itself is called AzureRM.OperationsalInsights. A good place to start with OMS native PowerShell cmdlets is a blog post on the Building Clouds blog. So what is the exact issue? Well, I tried to query my workspace for installed solutions. First I logged in using the Login-AzureRmAccount  cmdlet which succeeded quite nicely..

image

…after I authenticated I ran a cmdlet to get the solutions from OMS…

image

..no matter which cmdlet I tried, I always received the error above.

After some time, I tried to update the modules, running Update-Module which ended in this error…

image

Next step, I tried to install the entire ARM modules by running Install-Module AzureRM –AllowClobber, which ended in a similar error…

image

Continue reading

SMA Authoring Toolkit – Some Runbooks Are Not Showing Up

untitled

When you are creating runbooks in SMA (Service Management Automation) and you are using the SMA Authoring Toolkit available on PowerShell Gallery, you might have also have faced a very annoying bug. If you have a certain amount of runbooks in SMA and you are browsing through the runbook list in ISE you simply cannot find certain runbooks. Trying to refresh the list does not work at all.

image

If you open SMA to browse the runbook list you can see them all published and in a “healthy” state. So there is no reason not to show up.

Continue reading

OMS – Custom Solution “SCOM Effective Configuration”

I had been very busy lately so this blog has been quite for few days, but now I would like to provide a custom OMS solution. My goal was to build a solution which shows you the effective configuration of a monitor or rule, based on a group of objects in SCOM. I created two parts, one is a PowerShell module to collect all the data from your SCOM management server and ingest it into your OMS workspace. For visualizing the data I created a OMS view which looks like this…

screenshot

How does it work? Great question, so let’s start with the data collection.

SendEffectiveConfiguration PowerShell Module

I published the module on PowerShell gallery, which you can find here.

The module supports the following parameters:

  • GroupDisplayName

This parameter accepts any existing group in SCOM, that contains objects. E.g. Windows Server 2012 Computer Group.

  • ManagementServer

Set your SCOM management server here.

  • CustomerID

CustomerID is the workspace id where you want to analyze your data.

  • SharedKey

SharedKey ist the primary key for the corresponding workspace.

So the command executed would look like this:

Send-EffectiveConfiguration -GroupDisplayName  “Windows Server 2012 Computer Group” -ManagementServer SCOM -CustomerId [WorkspaceID] -SharedKey [PrimaryKey] –verbose

Continue reading

OMS – Where Can I Find the Sealed OMS MPs / Intelligence Packs?

image

Sometimes you need to have the sealed version of management packs / intelligence packs which get’s downloaded from OMS. You might need them as reference in your custom management pack solutions or maybe just to explore it. You can find the management packs in your C:\Windows\Temp folder on your SCOM server.

image

As you can see the name of the files corresponds to the solutions in OMS.

I hope this quick tip saves you some time.

SCOM – Extensible Network Monitoring Management Pack Generator Tool

image

Microsoft just released the Extensible Network Monitoring Management Pack Generator tool which allows you to build custom SNMP management packs. In my previous post SCOM 2016 TP5 I have written a post about the prototype of this tool which was command line driven. I addressed some missing parts like a GUI, custom SNMP components and handling more complex SNMP values. Guess what?! Microsoft listened and released a GUI based (and also a command line based) tool to create your own SNMP management packs..

Both tool have the following features:

  1. SNMP_MPGenerator tool has an inbuilt MIB browser. Users can load MIB files, search through the Object Identifiers (OIDs) of the component they wish to add workflows for and create rules and monitors.
  2. Users can add monitors and rules for device components such as Processor, Memory, Fan, Temperature Sensor, Power Supply, Voltage Sensor and Custom device components.
  3. This tool would also support custom devices in addition to already supported devices like Switch, Router, Firewall and Load Balancer.
  4. Users can define monitors and rules for multiple devices in a single project file and generate a single Management Pack for all of their devices.
  5. As mentioned above, this tool would also include the command line executive NetMonMPGenerator.exe for users who wish to generate MP through command line interface.

The tool is free and comes with a detailed documentation how to build an MP. I just have clicked through the tool and it seems to be very self-explaining. The GUI has basically two parts, the MIB browser which let’s you import MIBs and browse/search through the MIB tree and the editor part were you can add components, rules and monitors. The MIB browser is just for finding the proper OID for each component and then you are able to copy/paste the value to the proper place in the editor. For the command line tool you need to configure a XML file as input.

I think it is a very nice approach and let’s see how it will perform in some upcoming projects download the tool here.

SCOM 2016 RTM – What’s (REALLY) New

image

Up to the final release of SCOM 2016 it was not clear what will be within this box. There were even some surprises, like the new web console (almost) without Silverlight. I thought I will write a post, were I put all this information together and link it to blog post which I have previously written or other community members provided, so you will have a single spot to find detailed information. I used the TechNet overview from here and pimped it with additional information. I hope you find it useful.

Improve desktop console performance

  • With the release of System Center 2016 – Operations Manager, we have made performance improvements to state and diagram views in the Operations console to improve load performance (these improvements are in addition to the alert view optimizations).

[Stefan Roth] I have not tested SCOM 2016 in a large environment, but in my lab in feels like Microsoft improved these experiences drastically.

Send E-mail notifications with external authentication

  • Operations Manager now supports sending notifications from an e-mail server, either within the organization or external and configuring a Run As account to authenticate against an external messaging system.

image

[Stefan Roth] If you check your Channel configuration you can find a new setting, which allows you to specify a RunAs Profile to specify an account for authenticating against external mail server.

Non Silverlight Web console (except Dashboard views)

  • With the release of System Center 2016 – Operations Manager, we have removed the Silverlight dependency from all the Web console views except Dashboard views. This feature provides the following value:
    • No more Silverlight prerequisite to access Operations Manager Web console
    • Operations Manager Web console can be accessed from multiple web browsers like Edge, Chrome and Firefox
    • Performant experience
    • Dashboard views are still dependent on Silverlight, which can be accessed through Internet Explorer with Silverlight plug in.

[Stefan Roth] Fellow MVP Marnix Wolf has already written a blog post about. I hope this console gets updated and finally all Silverlight parts will be replaced with some upcoming URs.

Access Schedule Maintenance Mode from Monitoring pane and maintenance mode from client side

  • Schedule Maintenance mode is a feature released in System Center 2016 – Operations Manager to suspend monitoring of an object during regular software or hardware maintenance activities, such as software updates or hardware replacements. Entities can be put to maintenance in older versions of Operations Manager, but they cannot be put into maintenance mode at a future time. The newly created Maintenance Mode Scheduling wizard gives the ability to choose different types of entities to put into maintenance and to schedule maintenance at a future time.
  • With the release of System Center 2016 – Operations Manager, Operators can access the “Maintenance Schedules” feature from the monitoring pane without the dependency on administrators to schedule maintenance at a future time. We now supports allowing a server administrator to set the agent-managed computer in maintenance mode directly from the computer itself, without needing to perform this from the Operations console. This can be performed with the new PowerShell cmdlet Start-SCOMAgentMainteannceMode.

image

[Stefan Roth] Microsoft moved the Maintenance Schedules to the Monitoring section so Operators are able to set schedules. In previous TP versions it was placed within the Administrator section which would not have allowed to schedule maintenance modes other than administrators.

Continue reading

Quick Post – Linux + PowerShell + DSC Blog Posts @ Hey, Scripting Guy! Blog

image

I would like to make you aware of a 3-part blog post series, which I have written for THE Microsoft Hey, Scripting Guy! Blog .  Because I really like these blog post series and of course the blog itself a lot , I want to share it with you.

The first part shows you, how to use Bash on Windows 10 and how you can connect to a Linux server to install OMI CIM server and the DSC for Linux packages. The second part installs .NET Core and PowerShell for Linux on the system using DSC for Linux. In addition, I show you how to connect via PowerShell and WSMan protocol from your Windows 10 to the OMI CIM server. The last post is applying a DSC configuration from Azure Automation DSC to Linux and executing a PowerShell script to send user data to Azure Log Analytics HTTP Data Collector API .

You can find the post here:

Part 1 – Install Bash on Windows 10, OMI CIM Server, and DSC for Linux

Part 2 – Install .NET Core and PowerShell on Linux Using DSC

Part 3 – Use Azure Automation DSC to Configure Linux and Executing PowerShell Script

 

I hope you like it as much as I do, have fun!