Wednesday, February 25, 2015

SCOM: New version available MP Author SP3

Silect just released a new version, SP3, of MP Author, a free and easy to use tool for creating SCOM management pack.
Soms welcome new features:
- Improved knowledge viewing and editing in multiple language environments
- Improved XML editing
- New feature to "Check for missing display names" (Nice one when MP's are authored by multiple users with different UI locales)
- Added ability to use base classes other than LocalApplication when creating new classes
- Additional MP elements are displayed
- Added a drop down list of $$ parameters for alert messages (less Traffic for Kevin Holman's blog ;))
- Schedule property grid made more user friendly
- Improvements to memory usage
But, the use of notepad, XML editor and Authoring Console still comes in handy. Or use the Visual Studio addins for authoring.

Tuesday, December 16, 2014

Hyper-V: Internet Connection Sharing (ICS) with Hyper-V Virtual Switch

I'm running Hyper-V on a new machine with Windows 8.1 Update 1 and updated with the latest patches. I'm running in to issues sharing internet access from my wireless network with my VM's. This post describes a solution which worked in my case.

Internet access for Hyper-V virtual machine

To give your VM's access to the internet through your computer there are multiple options

  1. Create an external switch and let the guest system connect to the actual network
  2. Create an internal switch and share your internet connection with that Virtual Switch

I prefer option 2 and therefore created a Virtual Switch and shared my Wifi connection with that Virtual Switch.

But for some reason the guest system did not get access to the internet, but did get a DHCP lease from the interface I shared with the Virtual Switch to which the VM was connected.

Searching through the internet only resulted either in sharing your internet with an hosted network on WiFi (adhoc) or describing setting up Internet Connection Sharing (ICS) as it was supposed to work.


The Wi-Fi Hosted Network brought my to the idea that infact the hosted network was also a way to let incoming connection route through the cabled interface of the host.

The command (elevated) to see whether your WLAN driver supports Hosted Network is:
netsh wlan show driver

So what if this command also worked to show details about the LAN interface?
Nope...that command is not supported.

But what DOES work is showing the available LAN interfaces with the command:
netsh ip show interfaces

This showed no information about LAN interfaces, but a statement about the Wired AutoConfig Service.
Aha, currently i'm not connected to a LAN. Actually I always use Wifi whenever possible.

Enable the Wired AutoConfig service through services.msc

After enabling this service, I got some results back from netsh.

WLAN/Wi-Fi ICS with Virtual Switch - another try

Now let's try that second method again to share internet access. (By the way, this also solved another issue on my Hyper-V host when  i want to create Virtual Switches in the first case.)

Follow the steps:
  1. Create an internal virtual switch through the Virtual Switch Manager (give it a descriptive name like vSwitch - Shared)
  2. Share your active internet connection with that vSwitch

  1. Add a network adapter to your VM which connect to that vSwitch
  2. Verify internet access on the guest OS. Yeeh!


What's the cause of this? I think it's maybe because the Wired AutoConfig Service is possibly triggered when using a physical interface and I use a WiFi connection. Haven't tested this yet though.

But after changing the Windows display language from Dutch to English (US) it also seems to be working. Hhmm?
Maybe this is caused by a specific configuration on my system, but if this post works for you, than I'm glad I shared this.

Tuesday, November 11, 2014

Powershell: Searching for special characters? Get them all!

Today I wanted to see if I could add a checkbox like character to a custom table from Powershell.

Because of the nature of a command line script, I wanted to see if there were any interesting character codes to do this.
In Powershell you can use specific characters with the command [char]#.

You can use this command line to output all characters from a specific range (default is 0-10000). Have fun!
for($i=0;$i -le 10000;$i++){Write-Host -NoNewLine "$i $([char]$i) "; $k++ ; if($k -ge 15){Write-Host "";$k=0}}

Output looks like this:
9819 ♛ 9820 ♜ 9821 ♝ 9822 ♞ 9823 ♟ 9824 ♠ 9825 ♡ 9826 ♢ 9827 ♣ 9828 ♤ 9829 ♥ 9830 ♦ 9831 ♧ 9832 ♨ 9833 ♩ 
9834 ♪ 9835 ♫ 9836 ♬ 9837 ♭ 9838 ♮ 9839 ♯ 9840 ♰ 9841 ♱ 9842 ♲ 9843 ♳ 9844 ♴ 9845 ♵ 9846 ♶ 9847 ♷ 9848 ♸ 
9849 ♹ 9850 ♺ 9851 ♻ 9852 ♼ 9853 ♽ 9854 ♾ 9855 ♿ 9856 ⚀ 9857 ⚁ 9858 ⚂ 9859 ⚃ 9860 ⚄ 9861 ⚅ 9862 ⚆ 9863 ⚇ 
9864 ⚈ 9865 ⚉ 9866 ⚊ 9867 ⚋ 9868 ⚌ 9869 ⚍ 9870 ⚎ 9871 ⚏ 9872 ⚐ 9873 ⚑ 9874 ⚒ 9875 ⚓ 9876 ⚔ 9877 ⚕ 9878 ⚖ 
9879 ⚗ 9880 ⚘ 9881 ⚙ 9882 ⚚ 9883 ⚛ 9884 ⚜ 9885 ⚝ 9886 ⚞ 9887 ⚟ 9888 ⚠ 9889 ⚡ 9890 ⚢ 9891 ⚣ 9892 ⚤ 9893 ⚥ 
9894 ⚦ 9895 ⚧ 9896 ⚨ 9897 ⚩ 9898 ⚪ 9899 ⚫ 9900 ⚬ 9901 ⚭ 9902 ⚮ 9903 ⚯ 9904 ⚰ 9905 ⚱ 9906 ⚲ 9907 ⚳ 9908 ⚴ 
9909 ⚵ 9910 ⚶ 9911 ⚷ 9912 ⚸ 9913 ⚹ 9914 ⚺ 9915 ⚻ 9916 ⚼ 9917 ⚽ 9918 ⚾ 9919 ⚿ 9920 ⛀ 9921 ⛁ 9922 ⛂ 9923 ⛃ 
9924 ⛄ 9925 ⛅ 9926 ⛆ 9927 ⛇ 9928 ⛈ 9929 ⛉ 9930 ⛊ 9931 ⛋ 9932 ⛌ 9933 ⛍ 9934 ⛎ 9935 ⛏ 9936 ⛐ 9937 ⛑ 9938 ⛒ 
9939 ⛓ 9940 ⛔ 9941 ⛕ 9942 ⛖ 9943 ⛗ 9944 ⛘ 9945 ⛙ 9946 ⛚ 9947 ⛛ 9948 ⛜ 9949 ⛝ 9950 ⛞ 9951 ⛟ 9952 ⛠ 9953 ⛡ 
9954 ⛢ 9955 ⛣ 9956 ⛤ 9957 ⛥ 9958 ⛦ 9959 ⛧ 9960 ⛨ 9961 ⛩ 9962 ⛪ 9963 ⛫ 9964 ⛬ 9965 ⛭ 9966 ⛮ 9967 ⛯ 9968 ⛰ 
9969 ⛱ 9970 ⛲ 9971 ⛳ 9972 ⛴ 9973 ⛵ 9974 ⛶ 9975 ⛷ 9976 ⛸ 9977 ⛹ 9978 ⛺ 9979 ⛻ 9980 ⛼ 9981 ⛽ 9982 ⛾ 9983 ⛿ 
9984 ✀ 9985 ✁ 9986 ✂ 9987 ✃ 9988 ✄ 9989 ✅ 9990 ✆ 9991 ✇ 9992 ✈ 9993 ✉ 9994 ✊ 9995 ✋ 9996 ✌ 9997 ✍ 9998 ✎ 
9999 ✏ 10000 ✐

Tuesday, April 8, 2014

Microsoft Azure Automation preview!

This is just great! Automation on-premise is what we already know and on which we are currently are automatizing our processes. Yet, as we are busy doing just that, Microsoft is working on automation in the Azure cloud! Earlier this week they made a public preview of Azure Automation available.

Read this blog from Keith Mayer to follow a step-by-step approach getting started with Azure Automation. Furthermore, in the future they will publish information about using other products like Chef with Windows Azure.

Quote from Keith's blog:
Note: this week, we also announced support for Puppet and Chef for automated provisioning and configuration management of Microsoft Azure cloud resources. If you're currently using these tools as part of your DevOps strategy, be sure to look for upcoming articles that focus on these alternatives for cloud automation.
Link to article:

More info on Microsoft Azure Automation:

Have fun! I know I will...

Friday, January 24, 2014

Powershell: Divide text file lines between two files (req.)

This week I received a question about a Powershell script I wrote to split large text files to multiple files.
So I decided to answer that with blog post in which a similar script divides lines of a text files between two text files. Nothing fancy, it's rather basic script :)

This script just checks whether the line count increment is either odd or even. Based on that outcome, the results goes to output file 1 or 2.

#Script initialization
$linecount = 0
$sourcefilename = Read-Host "What is the full path and name of the log file from which you want to divide the lines? (e.g. D:\mylogfiles\mylog.txt) "
$destinationfolderpath = Split-Path $sourcefilename -parent

$srcfile = gci $sourcefilename
$filebasename = $srcfile.BaseName
$fileext = $srcfile.Extension

Function check-even ($num) {[bool]!($num%2)}

Get-Content $sourcefilename | Measure-Object | ForEach-Object { $sourcelinecount = $_.Count }

Write-Host "Your current file size is $sourcelinecount lines long"
Write-Host File is $sourcefilename - destination is $destinationfolderpath

$content = get-content $sourcefilename | % {
 $linecount ++
 If(Check-Even($linecount)) {
    Write-Host "Writing part: $destinationfolderpath\$filebasename`_part2$fileext"
    Add-Content $destinationfolderpath\$filebasename`_part2$fileext "$_"
 } else {
    Write-Host "Writing part: $destinationfolderpath\$filebasename`_part1$fileext"
    Add-Content $destinationfolderpath\$filebasename`_part1$fileext "$_"

SCOM: Great start of new year - New MP Authoring Tool

This year started awesome with the introduction of a new MP authoring tool for SCOM, released by Silect.
It has a very descriptive name :),  MP Author.

I really hope this will enable more people to create useable monitoring functionality in Operations Manager.

While I still don't understand why Microsoft has not solved the issue in which the Authoring role within OpsMgr can't use the Monitoring Templates (startingpoint for authoring?), this tool could be a solution for those who do not feel comfortable with the current Authoring Pane or VSAE.

Read about it at:

(The SCOM 2012 Operations Console is a prerequisite for installing MP Author)

Wednesday, August 7, 2013

SCOM 2012 R2 Cross-Platform Agent: R2 vs SP1

In this blog post I will show what's different under the hood (at first glance) between the cross-platform agents of OpsMgr 2012 R2 and OpsMgr 2012 SP1. This post will probably be updated as I'll find more to share.

Both agents are running on Ubuntu 12.04.1 LTS. I use the root account for administration. I know, I should not use it, but hey what the heck. It's just a test environment. The SSH client I use is PuTTY.

Status Information

In both versions the 'scxadmin' tool is available.
When you run the command "scxadmin -status" you get the same kind of response. But you can see that the programs are replaced with OMI versions.

Note the change in server and agent name (omi)

Version differences

Retrieved with scxadmin (still available in R2)
Command: scxadmin -version

Version: 1.5.0-114 
Agent Management (Console)

Agent Management (Console)

Files & Folders

There are noticeable differences in the binaries used in R2 and SP1. This is because of the change from OpenPegasus to OMI. Some binaries are still used but renamed, like 'cimcli'.

R2: Less binaries than SP1, provider binaries removed. OMI has other tools for that.
See the OMI getting started guide: download here
SP1: More and other binaries than R2

Using WS-Man

Microsoft stated that the upgrade to R2 is seamless except when using custom providers. So testing the response with WS-Man should return the same result.

For the test I use an Invoke example which I used earlier.
The property StdOut is still the same. This is the result of the command 'uname -a'.
The result is the same, but the XmlElement which is returned by the server has some slight body changes.

The XML response (minor diffs):
n1 => p
true => TRUE
URI => Changed to DMTF. So it looks like the interface is committed to use the DMTF schema.

R2 WS-Man result: DMTF schema used
SP1 WS-Man result: Microsoft schema used

CIMCLI issue in R2

The cimcli tool is used in both OpenPegasus and OMI.
Microsoft renamed the tool from 'scxcimcli' to just 'cimcli'.

I found that the cimcli tool contained in the R2 agent (Ubuntu) does not work. SP1 does. It can't find the file. Currently I haven't tested other agents for the other OS's to see if those contain the same issue. (Downloading Suse Enterprise Linux as we speak)

I tried all kind of things to get cimcli to work, but it keeps failing to run. I copied the lib directory contents to the bin contents, added omicli.conf to the conf directory, added .omiclirc to the cimcli directory.

Command: (scx)cimcli ns
This enumerates the available namespaces of the CIM server.

Failure: is missing
Microsoft's scx namespace. Also note the two Pegasus (PG) namespaces

If you have any feedback on my findings, please let me know.

Tuesday, August 6, 2013

SCOM 2012 R2 Cross-Platform (XPlat) OMI changes

OMI replaces OpenPegasus

One of the changes in the R2 release (expected fall 2013) is the change of management platform for the cross-platform agents to monitor Linux and UNIX systems. The supported cross-platform systems are: Linux (RedHat, SUSE, CentOS, Debian, Oracle and Ubuntu) and UNIX (AIX, HP-UX and Solaris).

In the current 2012 version the cross-platform agents are built-upon the OpenPegasus standard. This is an open-source implementation of DMTF CIM and WBEM.

With the focus on becoming a Cloud OS, Microsoft needed a new abstraction layer for standard-based management which could be used to manage different kind of devices and abstractions (from cloud to physical device). The current standard had some caveats that did not line up with Microsoft standards-based management vision for the future.
That’s why Microsoft decided to use OMI* (Open Management Infrastructure) to replace OpenPegasus in the cross-platform agents.

If you want to know more about Microsoft’s reasons for this change, read their blog:

Besides the benefits of using a new standards-based management interface for top-to-bottom management, OMI performs significantly better than its predecessor. The footprint is smaller, making it better suitable for mobile devices.

* Previously known as NanoWBEM
More info on OMI:

Seamless upgrade

Upgrading to SCOM 2012 R2 is seamless. The same goes for your own cross-platform Management Packs using the standard Microsoft provider (root\scx). As long as you used the Management Pack Types and provider which came out-of-the-box there is nothing to be worried about.

What's affected?

Management Packs that use OpenPegasus providers will not be compatible with the new agents. Vendors or customers who have written custom OpenPegasus provider have to rebuild their management packs to be based on the new OMI framework. If customers don’t upgrade to those new Management Packs or vendors are unable to redo their Management Packs, your upgrade to SC 2012 R2 will render that monitoring unusable, and errors might occur. For what I've seen, management packs from vendors like NiCE and Bridgeways use their own custom OpenPegasus providers.

Other options

Some cross-platform management packs do not make use of custom providers. One of those is the Oracle MP from OpsLogix.

For a limited time they offer a free upgrade to their pack which is easy to install and clears the way for upgrading to OpsMgr 2012 R2. This management pack uses watcher nodes, which can offload your management servers, which are usually burdened with monitoring the cross-platform instances.