Short takes: pairing my headphones, firewalls and Exchange SMTP communications, tethered photos with a Mac

Some more snippets that don’t quite make a blog post…

Because I always forget how to do this: how to pair a Plantronics BackBeat PRO headset with a mobile device.

And a little tip whilst troubleshooting connectivity to an Exchange Server server for hybrid connectivity with Office 365… if telnet ipaddress 25 gives a banner response from the SMTP server then that’s a good thing – if the firewall is interrupting transmission then I’ll get nothing back, or asterisks ********. Joe Palarchio (@JoePalarchio) writes about this (see issue 7) in his post on Common Exchange Online Hybrid Mail Flow Issues. Note that firewalls doing any form of blocking between Exchange servers are unsupported but that doesn’t stop customers from putting them between their email servers and anything running in the cloud (e.g. Hybrid server in Azure).  If you need to do this, then you should have any ANY/ANY rule (i.e. allow free flow of traffic) between the Exchange Server servers.

Take photos with OS X Image CaptureFinally, back in 2009, I  wrote about tethering a DLSR to a computer and taking pictures using Windows PowerShell (I think I’ve also written about using software to do this). Well, it turns out that the OS X Image Capture utility can also take a photo on a supported camera – either on a timed basis or by pressing a key.  Could be useful to know if setting up a time-lapse, or for studio work…

Copy NTFS permissions from one folder/file to another

I’m working with a customer who is migrating from on-premises datacentres to the cloud – using a virtual datacentre in Microsoft Azure. One of the challenges we have is around the size of the volumes on a file server: Azure has a maximum disk size of 1023GB and the existing server has a LUN attached that exceeds this size.

We can use other technologies in Windows to expand volumes over multiple disks (breaking the <1TB limit) but the software we intend to use for the migration (Double Take Move) needs the source and target to match. That means that the large volume needs to be reduced in size, which means moving some of the data to a new volume (at least temporarily).

One of my colleagues moved the data (using a method that retained permissions) but the top level folders that he created were new and only had inherited permissions from their parent. After watching him getting more and more frustrated, manually configuring access control lists and comparing them in the Windows Explorer GUI, I thought there had to be a better way.

A spot of googling turned up some useful information from forums and this is what I did to copy NTFS permissions from the source to the target (thanks to Kalatzis Stefanos for his answer on Server Fault).

First of all, export the permissions from the source folder with the icacls.exe command:

icacls D:\data /save perms.txt [/t /c]

/c is continue on error; /t is to work through subfolders too

Then, apply these permissions to the target volume. They can be applied at volume level, because the export includes the file names and an associated ACL (i.e. it only applies to matching files)

icacls D:\ /restore perms.txt

But what if the source and destination folders/files have different names? That’s answered by Scott Chamberlain in another post, which tells me I can just edit my perms.txt file and change the file/folder name before each ACL.

By following this, I was able to export and re-apply permissions on several folders in a few minutes. Definitely a time saver!

Reflecting on riding the #RideStaffs 68-mile sportive

Back in 2013, when I bought my first road bike since the “racer” of my teens, the first sportive I took part in was the Tour [of Britain] Ride in Staffordshire – setting out from Stoke-on-Trent. Now I work for a Stafford-based IT services company and when I heard we were sponsoring the Staffordshire Cycling Festival (@RideStaffs) it gave me a chance to a return visit, although a little further south this time!

(Ironically, the Tour Ride has moved to my home county of Northamptonshire this year… but I can’t make it.)

So, last Sunday, blessed with some summer sunshine (at last!) I rocked up at Shugborough Hall wearing my risual orange jersey, the only one of the team joining the 68 mile sportive (though quite a few of the guys took part in the 22 miler).

With rolling hills from the off, at Milford we took a sharp left and then Bang! we hit the climb up onto Cannock Chase. The first 30 minutes were slow, grinding my way up onto the Chase until we turned left on Brindley Heath and headed down towards Rugeley. I’d just got going at full speed (hitting just over 60kph) when I realised I needed to take a left turn half way down a hill and grabbed the brakes hard – no discs on my road bike! I managed to scrub off speed and make the turn, then hooked onto the back of a small peloton with 2 other riders down towards Rugeley. After taking turns for a while, we hit the A51 and missed the route sign – but it seemed wrong to be heading west so quickly and, as we were heading back towards Shugborough, I turned around and retraced my steps, picking up the correct route again a mile back down the road and passing my hotel from the previous night!

The next section took in mostly flat roads near Lichfield and Alrewas, nipping over the border into Derbyshire before turning over the River Trent and up to the first stop at Barton-under-Needwood. After taking on water and flapjack I started chatting with the owners of two beautifully restored 1970s Colnagos with glorious etching and chromework, one of whom even had a traditional wool jersey, cap (no helmets in the ’70s I guess) and leather saddle bag!

Despite my slow start, I’d averaged over 27kph but realised why as we set off again towards Uttoxeter – turning into the wind that had previously been helping me along (though Hanbury Bank offered a welcome break) . To make matters worse my bike seemed to be grinding from the bottom bracket… time to see Kev at Olney Bikes again for repairs…

After another stop in Uttoxeter (where one rider was conducting the town band – he later told me they split over “musical differences”!) we set off again over some undulating terrain towards the last major climb at Sandon (and what a killer that was).

I skipped the final stop (it was only for water and was carrying plenty of fluids) and pushed on with a large group riding into Stafford – past the Technology Park where our offices are – but was dropped again as we turned left up past the University. From there it was a steady ride on into Shugborough… ending slightly-extended 68 mile ride!

As I crossed the line, I was handed my goody bag musette style, including a variety of items but most importantly a beer token!  My official time was a respectable 5 hours 8 minutes, but Strava told me I’d only been moving for 4 hours and 39, climbing 1235 metres in the process.

Even though I’d missed the rest of the risual riders (the 22 mile sportive set off later and obviously got back sooner!) I stuck around for a while to watch some of the Tour de France coverage and got some lunch from the wood fired pizza stand (a long wait but nice pizza), before heading home… wishing I hadn’t picked a sportive quite so far away!

All in all, it was a fantastic day – and I was very lucky with the weather. Paul at Leadout Cycling organised a great event and I hope to make it back another year. It was also a timely reminder that, even without heading up onto the North Staffordshire Moorlands, there are still plenty of hills around Staffordshire and that my normal routes around South Northants, North Bucks and Beds are relatively flat by comparison…

…as well as that it’s just 4 more weeks until my next sportive – 100 miles from London to Surrey and back again (hopefully not cut short this year)!