Media Player Quest

Originally posted on WeBreakTech

For the last several years, I’ve been on a quest. A quest that has finally been completed.

I can’t remember exactly when it first started, but I remember a happy time. I owned a modded Xbox (the original!) and it had a media player installed on it. It was called XBMC which aptly stood for XBox Media Center. It was an absolute delight to use.

My gaming machine became my lounge room media player. It connected to my TV via S-Video as that was slightly higher quality than Composite video, it had a 100mbit Ethernet port so I could steam media from a PC in another room. It supported SMB file shares which meant no client was required on my Microsoft Windows PC, it just had credentials to navigate through folders and play the videos I wanted. The navigation of the software itself was quick and smooth. I could quickly jump to any point on a video, or fast forward and rewind with ease. I could even easily adjust the sync of the audio and video if my source was out of sync. There was even an official Xbox Remote and IR Sensor that worked brilliantly with the setup, so no death trap cable was running across the living room (unlike the network cable, but that’s another story).

This delightful time ended eventually. Higher resolution TVs came out with their fancy new standard connection – HDMI. The Xbox was cast to the side, as a full tower PC took it’s place. Windows Explorer along with a keyboard and mouse was the easiest thing to use to navigate and play files. A VGA cable simply connected the PC to the new TV and supported 1920 x 1080. Sure, lots of the media I actually watched was still nowhere near that resolution, but there was no other decent solution at the time.

As flexible as a PC is, I wanted something that required less maintenance. I didn’t want to worry about finding the right codecs, or having special cards to output video and audio in different ways based on what TV and sound-system I had. I wanted a native remote to the device, and not sit there mapping out buttons for each function I wanted it to perform. With that in mind, I patiently waited for something better to emerge.

Fast forward a few years and all-in-one media players finally started to emerge. My first experience was a device I can not recall the model or even brand of, but it required the media to be on a local USB stick. It worked mostly, but was still a pain to copy stuff around constantly.

It was at this stage, I decided I really needed another XBMC. How hard could that be?

Late 2009, I obtained a Western Digital WDTV Live for around $100 which was half price of the RRP. It seemed to fit the bill – A remote control. 100mbit Ethernet and able to read from SMB shares. HDMI. Support for pretty much any video format out there… and it was good. Smooth navigation of the interface, it was nice to use. Still no XBMC experience, but I accepted it as being good enough.

It did last a few years, but eventually technology overtook the device again. Western Digital stopped updating the WDTV Live, and newer media formats came out. Newer Operating Systems also came out, which started to cause random issues with being able to see the network at all. I wasn’t the only person experiencing this, many others were too but none of the recommended fixes helped. Rebooting all devices on the network several times eventually kick-started the WDTV Live again, until it was rebooted.

Frustrated, it was time to go back to searching for the XBMC replacement.

I’d kept my eye out looking for a $200 or less device that again fit my requirements, but didn’t find anything suitable for a year or so until Android Media Players started to become popular. Being in Australia, there weren’t any local options for a while until I spotted the Kaiser Bass Smart Media Player which was stocked at a local retail chain.

It ticked off the requirements on the phyiscal side of the device, but it was woeful to use to the point of completely unusable. You can read my review on the link above for the full story, but it was really surprising to have such a poor experience with a store-bought product.

Without a different local Android based Media Player to try, I found a second hand Raspberry Pi Model B for sale which was already in a case, IR sensor attached with media remote, and an SD card for $100. It also had Raspbmc installed, which is a linux distribution with XBMC designed for the Raspberry Pi. Others I spoke to had set up the same and claimed it was a great media player. It sounded perfect!

Except that it wasn’t. It was decent, but not great. Controlling it was slow and laggy – from just navigating around the menus, to playing a video and trying to do basic fast forwarding and rewinding. I put up with it for a week after reinstalling Raspbmc from scratch and hoping it’d get better but it never did. It’s not bad for the price, but the old WDTV Live did a much better job overall.

I was giving up hope again, but someone told me about the Intel NUC. I’d heard about this before – it was a tiny PC, but not a very cheap one. Since then though, a newer generation of the NUC had been released which had two important additions: support for 2.5″ HDDs (compared to the original expensive mSSD or external USB stick only options) and an IR sensor on the front. It ticked all those other boxes I expected too (apart from coming with a remote, but I already had one from the Raspberry Pi to use), so I started to get hopeful again.

They’d also dropped in price, so the entry level Celeron NUC was around the magical $200 mark. Even better, there seemed to be official XBMC support for it! I reluctantly ordered one, while being less than optimistic about the upcoming experience.

The Intel NUC arrived, and I thought I’d get away with using a spare laptop sized 4GB DDR3 stick, but soon found out it didn’t work at all due to the NUC requiring 1.35v rated RAM, which I only had 1.5v. Another $50 later I had the correct RAM, and had a spare SSD to install. The device powered up with a clean looking ‘Intel NUC’ logo, so I proceeded with the install.

Windows 8.1 was installed onto the device quickly, followed by the latest version of XBMC. I found a utility called XBMCLauncher which made some small changes so XBMC auto loaded when the device came on, and much quicker than I thought the box was ready to go.

This time, I was impressed. Menus were able to be navigated smoothly. Videos started up instantly, and rewinding or fast forwarding just seemed to work. It flawlessly played 720p MKV files which nothing else so far seemed to be able to do consistently. I was getting excited.

As mentioned earlier, I had recycled the remote from the Raspberry Pi project. That was in use for a few days, until I discovered that using a smartphone or tablet with the Android Official XBMC Remote or the Windows Phone xbmc remote free was an even better experience than using a IR driven remote, so started zooming around the menus even faster. I could even view my indexed TV shows and movies, and jump straight to them to play.

After a week of this, I was sold. This was actually better than my original XBMC experience due to the amazing smartphone driven remote. I couldn’t fault it, so my quest was finally accomplished. I still find it amazing that I took so many years to get back to where I was with the original Xbox which wasn’t even designed to be a media player. I own a new Xbox One which can barely stream from a DLNA enabled device (it works as long as you trigger it from the other device, you can’t use the Xbox One itself to do anything apart from receive the media content!).

It wasn’t exactly the all-in-one device I thought I wanted, but installation was simple enough and without issue that I don’t mind that. It works, and it works perfectly.

How To Apply HKLM Settings Per User

Originally posted at WeBreakTech

Normally when you think of Windows Registry, you’re normally worried about the two sections: HKEY_LOCAL_MACHINE (HKLM) and HKEY_CURRENT_USER (HKCU).

It’s fairly obvious that settings under each area apply to either the PC itself (machine) or just to the currently logged in user. This is usually fine, but there are scenarios where there’s a setting that will only apply to a machine due to how the program is written, but you actually want to turn it on or off based on the logged on user.

With Group Policy Preferences (GPP) which was introduced with Windows Server 2008, this is much easier to do. Before this, you would have need to have written complex logon scripts using 3rd party tools to perform lookup commands, create variables and then adjust the registry accordingly, while providing administrator credentials.

GPP lets you apply registry settings rather easily. One of the main benefits of GPP is how flexible and granular you can be with the settings you apply.

This is how I would normally use to deploy a setting, but have it easily managable: Have two settings for the registry, one setting it on and the other off (normally done by a 1 for on, 0 for off but it depends on the setting). The targeting for having the setting on or off is based by user membership to an Active Directory (AD) group, but the setting is not applied in the user context meaning it’s applied by ‘System’ which will have full access to the HKLM registry.

This will then mean the HKLM setting changes from 0 to 1 and back based on which user logs in!

I prefer this than just applying particular users individually to the item because it will reduce processing time having a single check vs many, and that anyone can easily manage an AD group rather than mucking about with Group Policy and potentially doing something wrong, affecting the entire user base.

How to create a Group Policy that applies HKLM settings per user:

First, create a Policy. I’m going to assume you’re able to open Group Policy Management and create a Group Policy Object (GPO).

We’ll be working under User Configuration > Preferences > Windows Settings > Registry.

Here’s what you should see without my registry item already created:gpp1

Right click in the big open white space and choose New > Registry Item. Fill in the General tab for the registry item you want to create. Here’s an example:


Next, go to the Common tab and tick ‘Item Level Targeting’. Then click the ‘Targeting’ button and you’ll be taken to the Targeting Editor. This is where all the granular control is, and you’ll find many options on what criteria needs to be met to either apply, or not apply the registry item.

You can define what you like for the rules, but I’ll be doing ‘the user is a member of the security group’. You can click the ellipsis … button and find your group in Active Directory (or quickly go there to create it first).


After you’ve done this then pressed ‘OK’ twice, you’ll have your first registry entry ready to apply. We need a second one to do set the registry setting to a different value if a user is NOT in the group, so right click on the registry item and choose ‘copy’ then right click on the blank area and choose ‘paste’.

Go into the properties of your copied item, and change the value data to the second setting, and go into the ‘Targeting’ area and change the rule to ‘Is Not’ rather than ‘Is’ under the ‘Item Options’ dropdown menu.

One note is that AD group membership is checked when the user logs in, so if you’re testing and running ‘gpupdate’ to force a group policy check, it may not work as it won’t realise the user is in or out of the group. Just log off and back on to test instead.

I am a big fan of Group Policy Preferences and this is one of the examples of how powerful it can be, so if you are not already using it – get started!

Getting AD User Data via PowerShell

Originally posted at We Break Tech

It’s a common question asked of IT – “Can you give me a list of who’s in Marketing?” or “How many accounts do we actually have?”

Before PowerShell, this was a lot harder to do. There were companies like Quest Software who provided several handy tools (and still do) , or long complicated visual basic scripts.

So, how do you get a list of users? All of this is being done from the Active Directory Module for Windows PowerShell which will install as part of the Windows Server 2012 Feature – Role Administration Tools > AD DS and AD LDS Tools > Active Directory Module for Windows PowerShell.

The ‘Get-ADUser’ command is what we’ll use to demonstrate what you can do.

For starters, ‘Get-ADUser -filter*’ will get you a list of all users, and they’ll output in this format one after the other:

powershell1 (1)

A lot of information. You can specify a single user with:

Get-ADUser -identity username

which will just show you the one result.

As you may be aware, there are a lot more fields a user has than just the ones shown. You can tell PowerShell to show you all the properties by modifying the command like this:

Get-ADUser -identity username -properties *

Note that in PowerShell v4 if you get the error “get-aduser : One or more properties are invalid.” then there may be an issue with your schema. Check out this post for more information.

If there’s just one extra property you need, there’s no point getting everything, so if you needed to see a field such as “Department” for all users then adjust the command like this:

Get-ADUser -filter * -properties Department

Now, this gives the results for every single user in your Active Directory environment. You can narrow this down to a particular OU (and consequent sub OUs) by changing the command to this:

Get-ADUser -searchbase “ou=specialusers,ou=users,dc=mydomain,dc=com” -filter * -Properties Department

Now, you might be wondering how to get rid of all the standard properties and only see the ones you want.

There are two ways to pipe out the data that you want. One is with the ‘Format Table’ and the other is ‘Select Object’. Say you want a list of staff and their departments, we only need to use the ‘name’ field and the ‘department’ field.

Here’s what the two command look like, which are very similar:

Get-ADUser -searchbase “ou=specialusers,ou=users,dc=mydomain,dc=com” -filter * -Properties Department | ft name, department

Get-ADUser -searchbase “ou=specialusers,ou=users,dc=mydomain,dc=com” -filter * -Properties Department | Select-Object name, department


The results of these commands will look exactly the same. But, when you want to export this information out, you would normally use the ‘Export-CSV’ command. If you use the ‘ft’ option, the results will not be what you expect. There is a brief writeup on this on the Windows PowerShell Blog which shows what you’ll see and explains why. The ‘Select Object’ command doesn’t have this issue.

So, if you want to output this list to a text file, here’s the command to use:

Get-ADUser -searchbase “ou=specialusers,ou=users,dc=mydomain,dc=com” -filter * -Properties Department | Select-Object name, department | export-csv c:\temp\myfile.csv

Note that you can also cheat and just pipe any output to a textfile using the old DOS redirect output method, which works even with the ‘ft’ option:

Get-ADUser -searchbase “ou=specialusers,ou=users,dc=mydomain,dc=com” -filter * -Properties Department | Select-Object name, department > c:\temp\myfile.csv

Note that one ‘>’ creates a new file or overwrites an existing, while a double ‘>>’ will create a new file or append to an existing.

Easy! Now you can provide Active Directory details to whomever asks, with a one line command that will output only the fields you want.

TechEd North America 2014

I am really lucky this year to be going to Microsoft TechEd North America 2014, being hosted in Houston, Texas from 12th May to 15th May! Not only am I just attending, but I’ll be going as Press, representing The Register and We Break Tech.

I’ve been to TechEd Australia a few times and it’s a great experience, but this is a whole new level for me.

There will be over 10,000 people attending the single conference, a somewhat larger scale than the ~2500 that attend TechEd Australia.

To get there, I’ll have to fly Adelaide > Sydney > Dallas > Houston which will take about 24 hours, and to get back it’s Houston > Los Angeles > Melbourne > Adelaide. I’ll definitely be taking a few different gadgets and games to keep me entertained for that journey.

I don’t know what to expect exactly out of this experience. I’ll be doing writing of course, but there might be interviews, meeting and talking to world renowned experts/MVPs, mingling with Bill Gates and Satya Nadella… ok maybe not, but again I don’t really know what I’m in for!

My most similar experience was having HP fly me to Sydney for a day to cover the release of HP Converged Cloud on OpenStack technology which I live blogged and that was being thrown in the deep end – about 8 bloggers and 10 or so HP representatives there just to tell the 8 of us all a bunch of information.

Anyway, I realise this is a completely different scale and experience, and I’ll be one of hundreds of Press – but I do know this will be an awesome experience.

I’ll post some bits and pieces on here too, and I’m sure I’ll be constantly on twitter talking about my experience along with half the attendees.

Hoping to meet a bunch of new people and probably be way out of my comfort zone for the entire trip, but that’s what living is about! :)

Diverting Unassigned Numbers in Lync 2010

Originally posted at We Break Tech

Lync 2010 with Enterprise Voice attaches a phone number to a user with a direct one to one relationship. This means that when a user departs, the account should get disabled along with any Lync attachments. In turn, this abandons the phone number that was attached to the user. All great by design, but what about external people that are still calling the number of the departed user?

You could leave the user’s Active Directory account disabled, leave Lync attached and configure it that way, but that’s a big hassle. Microsoft covers this scenario with a feature called “Unassigned Number”.

Unassigned Number lets you configure an Announcement on an entire number range. The idea is that if any extension in the number range configured (which can be a single number) is called and isn’t attached to a user, it will divert the call to either an Announcement or an Exchange UM Auto Attendant number. Generally just the Announcement is fine, because the Announcement can be configured to be nothing, but divert the call to wherever you want it to go afterwards.

The Announcement needs to be configured before you create an Unassigned Number Range, which can only be managed by PowerShell. The Unassigned Number Range can be created via the Lync Control Panel GUI or PowerShell which seems a bit inconsistent.

Creating an Announcement is rather easy still, with a great guide from TechNet here. The important bits are to give your Announcement a name, tell it which Lync Pool to use and give it a target SIP address to send the call to. An example command do this is:

New-CsAnnouncement -Identity -Name “Forward Announcement” -TargetUri

Note that if you use a direct phone number for the sip address, you need to append “;user=phone” or it won’t work, so the sip address should look like this: “;user=phone”

Once that has been created (run a ‘get-csannouncement’ to see all the Announcements you have) you can then use PowerShell or the Lync Control Panel to create your Unassigned Number Range if you feel more comfortable there. A guide on how to do this is available from Microsoft Technet here.

All you need to do for the Unassigned Number range is give it a name, tell it the number range to start from and end (which if you have multiple sites, you’ll need multiple ranges), the name of the Announcement you want to use (i.e. where you want the call to divert to) and finally which Lync Pool server/Application Server the Announcement lives on.

Based on the Announcement above, this is what the Unassigned Number command would look like:

New-CsUnassignedNumber -Identity “Unassigned Number Range 1″ -NumberRangeStart “+61712345000″ -NumberRangeEnd “+161712345099″ -AnnouncementName “Forward Announcement” -AnnouncementService

The number range start and end just need to be in standard international telephone format: +xx being the country code (+61 for Australia, +1 for US) and then the local number (In Australia we drop the 0 at the front).

Again, you can run a ‘get-csunassignednumber’ command to see how it’s been configured.

Once you’ve done the above, you’re set. Try calling any unassigned number that you have and it should divert to the sip address you configured on the Announcement. If they’re a Lync user (as you can enter a phone number and divert these calls out) they will also get a message with the incoming call saying it was diverted from the originally dialled number.

If you have a special requirement where a particular number range needs to go elsewhere, you can just create more Announcements and unassigned number ranges – the order of the unassigned number ranges will define which range rule is applied with a highest first approach.

I believe this is very similar in Lync 2013, and would recommend that anyone using Lync with Enterprise Voice set this up for easier management of their phone system, but also to make sure no important business calls are missed.