I have had a “new year’s resolution” post in draft for more than two months… since we now reached march, I have wasted it – not much point anymore posting it. One thing that was NOT written in that post but that did work out, tho: I smoked one last cigarette on the 31st of december and I decided to quit smoking. So far so good. I also have a draft of a technical post sitting there for a long time… I’ll eventually finish it at one stage. I thought I’d post a picture of my beautiful little girl, instead, in the meantime.
Bought for 2 euros in a second-hand market, found under a pile of junk. You understood right: TWO euros. The electrical contacts for the flash are ruined as someone probably forgot his batteries inside and they leaked. But I was not planning to use the flash anyhow. For the rest, it just works. See for yourself something scanned from the first film: www.flickr.com/photos/dani3l3/tags/mf3/
Even if the backend for this feature is not yet documented, I was extremely curious to see how this had actually been implemented. Especially since it took a while to have this feature available for OpsMgr, I had the suspicion that it could not be as simple as one downloadable XML file, like the old MOM2005’s MPNotifier had been using in the past.
Therefore I observed the console’s traffic through the lens of my proxy, and got my answer:
So that was it: a .Net Web Service.
I tried to ask the web service itself for discovery information, but failed:
Since there is no WSDL available, but I badly wanted to interact with it, I had to figure out: what kind of requests would be allowed to it, how should they be written, what methods could they call and what parameters should I pass in the call. In order to get started on this, I thought I could just observe its network traffic. And so I did… I fired up Network Monitor and captured the traffic:
Microsoft Network Monitor is beautiful and useful for this kind of stuff, as it lets you easily identify which application a given stream of traffic belongs to, just like in the picture above. After I had isolated just the traffic from the Operations Console, I then saved those captures packets in CAP format and opened it again in Wireshark for a different kind of analysis – “Follow TCP Stream”:
This showed me the reassembled conversation, and what kind of request was actually done to the Web Service. That was the information I needed.
Ready to rock at this point, I came up with this Powershell script (to be run in OpsMgr Command Shell) that will:
1) connect to the web service and retrieve the complete MP list for R2 (this part is also useful on its own, as it shows how to interact with a SOAP web service in Powershell, invoking a method of the web service by issuing a specially crafted POST request. To give due credit, for this part I first looked at this PERL code, which I then adapted and ported to Powershell);
2) loop through the results of the “Get-ManagementPack” opsmgr cmdlet and compare each MP found in the Management Group with those pulled from the catalog;
3) display a table of all imported MPs with both the version imported in your Management Group AND the version available on the catalog:
Remember that this is just SAMPLE code, it is not meant to be used in production environment and it is worth mentioning again that OpsMgr2007 R2 this is BETA software at the time of writing, therefore this functionality (and its implementation) might change at any time, and the script will break. Also, at present, the MP Catalog web service still returns slightly older MP versions and it is not yet kept in sync and updated with MP Releases, but it will be ready and with complete/updated content by the time R2 gets released.
The information in this weblog is provided “AS IS” with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my own personal opinion. All code samples are provided “AS IS” without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. THIS WORK IS NOT ENDORSED AND NOT EVEN CHECKED, AUTHORIZED, SCRUTINIZED NOR APPROVED BY MY EMPLOYER, AND IT ONLY REPRESENT SOMETHING WHICH I’VE DONE IN MY FREE TIME. NO GUARANTEE WHATSOEVER IS GIVEN ON THIS. THE AUTHOR SHALL NOT BE MADE RESPONSIBLE FOR ANY DAMAGE YOU MIGHT INCUR WHEN USING THIS INFORMATION. The solution presented here IS NOT SUPPORTED by Microsoft.
I have been on holiday in the meantime… but the T-Shirt had arrived and was waiting for me in my letterbox in the office !! How cool is that???
So today I am walking around the Rome office in it… and I am looking at people’s faces: you need to understand that Italian dress code is more or less the opposite of how people usually dress in Redmond… Italy is historically more formal, and it would be the norm to dress fancy… one would definitely look BAD here if he would show up in sandals in the office… and VERY bad going on sandals to a customer… 🙂
How many times you have gone somewhere (public demonstration, event, concert, etc) where yo saw other people shooting photos and you though “some of them MUST be flickr’ers”…. but you never had the guts to go and introduce yourself?
Now it’s time to show off that you are a Flickr’er, and let other people figure it out.
I have decided to try and partecipate in the photographic contest “the assignment”, sponsored by Canon. Even if I have shot technically better portraits, I thought that this one was one of the most spontaneous, plus it suited the theme well:
“[…] Are you able to capture pure emotion in a single shot? Can you portray a person’s life-story with one photograph? […]”
The other I considered, the picture of the Arrotino would have been a person’s life story… but that was shot with an old film camera, a Pentax…. I thought it might not be seen that well in a Canon contest… 🙁
But this picture – it is about emotions. It is about having fun no matter your age. Who says when we grow up we must be serious ? So I called it “Youth is a State of Mind”.
Anyway, the picture is posted here:
If you like it, please vote for it – after the 5th of May when the votes will be actually open.
A while ago, talking to some friends, I was mentioning how cool it was that Flickr provides APIs, so that you can always get your data out of it, if you want to. There are several downloader applications that I found on the Internet, but I have not yet chosen one that I completey like among the few that I’ve tried. So, inspired by Kosso’s PHP script for enumerating your photos on Flickr, I thought I’d port it to Powershell and make my own version of it. Just for the fun of it. My Powershell script does not do everything that Kosso’s one does: I don’t build a web page showing description and comments. I suppose this is because the original script was made with PHP, which you usually run on a web server and outputting as HTML is the standard thing you would do in PHP. I just concentrated on the “download” thing, since mine it is a console script. You can think of mine as a “full backup” script. Full… well, at least of all your photos, if not of all the metadata. It should be trivial to extend anyway, also considering Powershell XML type accelerator really makes it extremely easy to parse the output of a REST API such as Flickr’s (I would say even easier and more readable that PHP’simplexml). There is a ton of things that could be extended/improved in the script… including supporting proxy servers, accepting more parameters for things that are now hardcoded… and with a million other things. Even this way, though, I think that the script can be useful to show a number of techniques in Powershell. Or just to download your photos 🙂 So you can download the script from here: Get-FlickrPhotos.ps1
This post is to write down some thoughts before Christmas, along the lines of what I have written yesterday in an email to a lot of colleagues (and I definitely forgotten some of them because there are too many great people I’ve worked with… so if you are one of the forgotten ones and you are reading this: I’m sorry!).
The last few months have been very busy with work. As much as I enjoyed them anyway, and learned a lot in the process and from the people I worked with, I now really want to enjoy these few coming days of Christmas holidays and RELAX and spend some quality time with my family and friends.
So I wish the same for all of you: that you may spend a Merry, relaxing Christmas, and have a great start for a grand, brilliant new year!
As a side note, having been very busy I have blogged a lot less. Blogging implies that I already have a sort-of-well-formed thought, that should span a few lines or paragraphs, otherwise I don’t find it worth it. That does not mean I don’t have small ideas or other things I like to share when I come up with them. That is why I am using microblogging and Social Networking a lot lately, so I remind you that even if this blog’s builtin feed only includes the REAL FEW blog posts, then I also have another (very “chatty”) feed that you can use to “follow me” and that one includes all of the following combined feeds: my status messages from Facebook, my Twitter messages, my pictures on Flickr, the stuff I read somewhere else and then share on Facebook, the places I visit and mark on 43Places and the goals I achieve, want to achieve, or I simply talk about on 43Things, as well as the REAL posts on this blog. It is my implementation of what has been called a “lifestream” by other bloggers.