IT

Searching for Duplicate MAC addresses with Hyper-V and SCVMM 2012

Hi,

I ran into an issue today where a server was complaining about a duplicate MAC address. Since almost all of our servers were virtual, I thought the best step (after doing an arp -a command locally and seeing if the offending IP address/MAC address was listed – which it wasn’t) would be to do a quick Google to see if there was an easy way without checking each VM.

Of course there is, thanks to Powershell. I quickly found this blog post from The Daily Admin and gave it a try. There was one slight change I had to make to get it to work:

Using the “Virtual Machine Manager Command Shell” I tried the command from the link above:

Get-VMMServer | get-vm | Get-VirtualNetworkAdapter | select name,EthernetAddress | export-csv “c:\temp\VM_Macs.csv”

It prompted for a Computer name. After working out you needed to specify your SCVMM server in the first part after ‘Get-VMMServer’ as per this:

Get-VMMServer “ScvmmServerName”| get-vm | Get-VirtualNetworkAdapter | select name,EthernetAddress | export-csv “c:\temp\VM_Macs.csv”

It worked perfectly. The resulting CSV file had a full list of the MAC addresses, which helped me narrow down what I was looking for.

 

Full credit to The Daily Admin at http://www.thedailyadmin.com/ !

 

 

Setting Lync 2010 PINs via PowerShell

Hi,

I am currently in the process of rolling out Lync, and wanted an easy way to mass set everyone’s PIN number. Rather than setting everyone’s PIN to a single number, I wanted part of it based on their extension number. The solution I used was writing up the below PowerShell script to use in the Lync Server Management Shell.

So, why would you do this? When you want everyone to know what the PIN format is, and not accidently log in with the wrong extension due to typing it incorrectly once (they have to type it incorrectly twice).

This is what it does:

I had to import the activedirectory module because the get-csaduser command didn’t get the results as a string, meaning I couldn’t do the substring command on it.

Then, it get the two properties of officephone (needed for the pin) and the samaccount name (same as username in lync) from the users in the specified OU.

For each of those results, it sets the officephone number from Active Directory as the $phone variable, then it sets the last 3 digits of the $phone variable as the $ext variable and sets the samaccountname as the $username.

Finally it runs the set-CSClientPin command based on the username, setting the pin to 99 and the 3 digit extension.

 

You can’t set the pin to match the extension exactly as Lync will refuse to let you. You could modify this quite easily to just have everyone’s pin as 1234.

 

import-module activedirectory
$users = get-aduser -filter * -properties officephone,samaccountname -searchbase “ou=users,dc=yourdomain,dc=com,dc=au”

foreach ($user in $users)
{
$phone = $user.officephone
$ext = $phone.substring($phone.length -3,3)
$username = $user.samaccountname
Set-CsClientPin -identity $username -pin 99$ext
}

 

Happy Lyncing!

Windows 8 – Folder In Use

Hi,

Since using Windows 8, I’ve had continual issues when trying to move folders around. It’s the normal message saying “Folder In Use – The action can’t be completed because the folder or a file in it is open in another program”

File in Use

I’d get this continually, and quite confident that I didn’t have anything actually open. Eventually I’d try again and after a few tries, it would finally move my folder. I was fed up with this, so thought it was about time to work out what was going on. Someone (thanks Barb) reminded me that Process Explorer was a good way to work out what file was open. I ran Process Explorer, moved a few folders until I recreated the error and did a search for the folder that was in use. I found that explorer.exe had the thumbs.db file open, even though I hadn’t navigated inside the folder.

Thumbs.db? It’s been around for ages (since Windows 95!) and is a thumbnail cache file used for Windows Explorer’s thumbnail view. This was also deprecated from Windows Vista and above, replaced by a centralised thumbnail location instead of dropping the Thumbs.db files all over your hard drive. The problem is, Vista and above still create the old Thumbs.db by default!

Windows 8 seems to be even worse, in that it still creates the file but then keeps it open for a rather long time. After finding this thread on Technet, where I learnt a lot of the above, I enabled the setting “Turn off the caching of thumbnails in hidden thumbs.db files” under > User Configuration > Administrative Templates  > Windows Components   > File Explorer.

After doing this then rebooting, my “Folder In Use” issue seems to have completely cleared. I can understand why this is enabled by default (backwards system compatibility), but it does seem strange that Windows 8 keeps the file open for such a long and random time.

So, as long as you don’t have anything below Vista accessing your files, go ahead and enable the setting.

Update: More detailed instructions from AJ below.

Hit Win+R, type gpedit.msc in the Run window and click OK. The Local Group Policy Editor will be launched.
Navigate through the tree to User Configuration > Administrative Templates > Windows Components > then either Windows Explorer (Windows Vista/7) or File Explorer (Windows 8)
In the right-hand pane, double-click “Turn off the caching of thumbnails in hidden thumbs.db files”.
Select Enabled (don’t make my mistake of choosing “Disabled” — you’re enabling the switching off of Thumbs.db. Not particularly intuitive, Microsoft!)

Update 2: You can also use this registry setting:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer]
"DisableThumbsDBOnNetworkFolders"=dword:00000001

 

Update 3: For those of you unlucky enough to have a Windows 2000 server still, there is an option in Windows 8 allowing connections to 40 bit fileservers. Check this post for details: http://www.eightforums.com/tutorials/9925-file-sharing-connections-encryption-change-settings-windows-8-a.html

Update 4: Here’s a screenshot of the registry after being modified. You can ignore the other entries under ‘Explorer’:

thumbs

Cinemagraph by Nokia, Waving Idiot.

Hi,

One of the cooler things the Nokia Lumia 920 can do, which I mentioned previously was making an animated gif from 5 seconds of video. Once taken, you can then choose to animate just part of the picture. The results are often creepy, as demonstrated by me here (click the picture to load the animated gif):

 

73a64f7a-9a3f-4a04-808f-11b5ebcd341c

If you’re someone with a keen eye for detail, you’ll notice I have the ‘rare’ grey Lumia 920 (wow) and wearing a Farmers Union Iced Coffee T-Shirt. With the tens of people that will see this post, I am hoping for sponsorship of a daily FUIC from National Foods.

As may be obvious, the phone came back from repairs. Nothing’s changed sadly, I think there’s something wrong with the audio levels of the ear speaker – if I turn it down to 1/10 volume, it’s still loud and clear. Any higher and voices become muffled. I’ll see how this goes.

At this stage, I’m still missing a lot of the functionality the Samsung Galaxy S III has, such as being able to navigate network shares and stream media. I’m hoping more useful apps will launch soon. Games wise, it’s still a pretty sad state in the Windows store too.

A Brief History Of My Nokia Lumia 920

I don’t know where I was going with that title. Approximately three weeks ago, I received a Nokia Lumia 920 to try. My first Windows 8 Phone experience. It was grey, and not by choice – it was the only colour they had available. Still, it looked decent. Coming from using the Samsung Galaxy S III for the last several months, the first things I noticed was the extra weight and thickness of the Lumia. It’s also quite solid, it’s the phone that socks should be filled with if you were robbing a convenience store.

Fast forward a few days and I’ve sent the phone back to the carrier. What? Yes, close that open mouth and share my disappointment with the ear speaker being faulty. Some calls were OK, others sounded really muffled. The actual primary use of a mobile phone was faulty out of the box. I’m now waiting for it to be returned, and back on the Samsung Galaxy S III. I hate to say it, but I like it better.

The few days in between the two above events contained a lot of mucking around on the Lumia. The front screen with the tiles, I really like. At a glance of the screen you’ll see if you have messages, emails, or many other indicators as you deem fit. It’s nicer than Windows Phone 7.5 due to the 1/4 tile option, meaning you can fit a lot more on there without needing to scroll up and down.

The sub menu, which lists all your apps is OK. I’d rather have a screen of icons to swipe through, rather than swipe down a single list. I want lots of information at once! Nothing terrible there though.

Lying in bed, I noticed that the screen changed it’s orientation. As I would have done on the Galaxy, I looked for the option to turn orientation off and on. It doesn’t exist. After some research and complaining on twitter, I found out that the native experience doesn’t have the option, and each app controls it individually. That’s rather disappointing.

OK, so after playing with a bunch of settings (much less than I would of liked – on par with an older version of iOS and way behind Android) it was time to look at some apps. Most apps have a trial which is great, but the quality of the apps currently is rather poor. Both iOS and Android went through this, so it will get better – but coming from either of these devices, you will be disappointed.

A podcast app – surely something that’s easy to find. Several exist, but they’re incredibly basic. Subscribing to podcasts and have apps automatically download is not possible, which is crazy. Some developers have told me this is due to limitations with Windows 8 Phone not allowing background downloads unless very limited requirements are met. There is a native podcast functionality, but not enabled in most countries including Australia.

The official Twitter app is also poor in comparison to iOS and Android versions. You can’t see as much, and there’s not much customisation. That’s really my biggest complaint – customisation. It’s one of the reasons I don’t like iOS for my personal use, I don’t like being restricted. In saying that, Windows 8 Phone I can see working really well in a corporate environment. It’s basic, does a lot, and manageable.

Back to the Nokia Lumia side of things, there’s some extras you get vs other Windows 8 Phones. The most well known are Nokia Maps, which is awesome navigation software, and the high quality camera. I played with the camera and it really does take great pictures. One of the cool features is called Cinemagraph which will make an animated GIF from 5 seconds of video. The cool thing you can do with this is easily animate just part of the picture. Having someone perfectly still, but their hand waving is a creepy thing to see. I also found the autocorrect to be much more accurate than Android.

So, I will give the Lumia a second chance when it comes back with it’s high quality screen, but I’ll also feel crippled. It might be a different transition for someone using iOS and not fussed about many apps, but as it is now there’s more negatives than positives moving from Android. In a few months with some updates from Microsoft, and some more apps from developers, I’m hoping it’s a much closer choice.