Internet Of Things Light Up Challenge – Part Two

Read Part One Here

Read Part Three Here
Read Part Four Here

Details of this project are on GitHub here where you can get the parts and do this yourself.

I eagerly took the items home and started following the Internet Of Things Maker Den Instructions to make my device.

Lab 1 was to get all the wires, resistors, the LED, temperature sensor and photocell all connected up on the breadboard. It was a bit bewildering to see a pack of 500 resistors, but only a few were actually used:

WP_20150307_11_22_28_Pro

After finding and extracting the resistors I needed, I was supposed to build this:

proper iot 2

Here is my finished result. Can you spot the mistake I made?

WP_20150307_11_31_33_Pro

Took me a while to find it, but that was Lab 1 complete.

WP_20150309_23_09_56_Pro (1)

Lab 2 (called Blinky) was a bit more of a challenge, since I don’t use Visual Studio. I was stuck on this for a while until Microsoft’s Dave Glover (Twitter @dglover) answered my tweets of desperation. My issue ended up being a configuration issue in Visual Studio where I was deploying to an emulator rather than USB (this device connects via micro-usb for both power and data). After that was changed, my code successfully deployed to the Netduino, resulting in a red flashing LED:

WP_20150310_22_29_23_Pro

Awesome! Since it’s a multi-coloured LED, I could change the code to make it blue:

WP_20150310_22_43_28_Pro

Or green:

WP_20150310_22_42_26_ProThe party’s over now, onto the next lab.

Lab 3 was just about seeing the temperature and light sensor work, piping back values to Visual Studio. Nothing exciting to screenshot here, it all just worked perfectly.

Lab 4 was changing the code again, but this time downloading a dashboard that would visually show the two values of light and temperature. The device had to have a network cable plugged in, so it would send it’s data to Azure, and the dashboard then showing the values off of Azure. Here’s my two gauges:

Untitled

 

Lab 5 was just adding a bit of extra code to uniquely identify the device, in preperation for Lab 6.

Lab 6 requires a NeoPixel Ring, Grid or Strip which I don’t have yet – it’s in the mail. That will be covered in Part Three.

 

Password Expiry Notification Script Part 2 – Who’s Expiring?

This is a brief modification to the Password Expiry Notification Script, which seems to be pretty popular.

Amnon Hoppe contacted me from the blog, and passed on a few extra scripts with some other ideas. He has collaborated and adjusted two scripts, to quote him “one to email only the admin/service desk with a list of all users that are about to expire and the other is to do that AND also email the end users in question to warn them to verify/take action to prevent lockout.”

I’ll add them here to share. I haven’t tested these, but have gone over them to make sure nothing malicious is going on.

Accounts2Expire2EndUsers (1)

Accounts2Expire2Admin (1)

Thanks Amnon!

These scripts are a bit more complex, but they’re good examples of what you can do, as well as a different approach from what I took, for a very similar purpose (Those are for account expiry, while mine was for password expiry)

I thought about adjusting the scripts, but after spending some time on it, I thought I’d leave them as is, but take the idea of displaying the users affected, then apply that to my own script. This is similar to the original, but it’s purpose is to just list the users who’s passwords expire in X days or less. This might be handy over a holiday for example, to know who’s going to have their password expire and then contact them to help. You should easily be able to combine the old and new scripts if you want to generate an email with this information on yourself.

Password Expiry List (rename to .ps1)

Here’s the script, which if you compare to the original is very similar. Instead of generating an email, we’re creating a list of users that have the password expiry due on X days or less (represented by the -le comparison operator, rather than -eq, a list is here). The list is then echo’d out to the console.

#################################################
# Please Configure the following variables….
# expireindays1 = How many days maximum the password has to expire (e.g. 7 will be up to 7 days)
$expireindays1 = 7
#################################################

#Get Users From AD who are enabled
Import-Module ActiveDirectory
$users = get-aduser -filter * -Properties enabled, passwordneverexpires, passwordexpired, emailaddress, passwordlastset |where {$_.Enabled -eq “True”} | where { $_.PasswordNeverExpires -eq $false } | where { $_.passwordexpired -eq $false }

$ListOfNames = @()
foreach ($user in $users)
{
$Name = (Get-ADUser $user | foreach { $_.Name})
$emailaddress = $user.emailaddress
$passwordSetDate = (get-aduser $user -properties passwordlastset | foreach { $_.PasswordLastSet })
$PasswordPol = (Get-AduserResultantPasswordPolicy $user)
# Check for Fine Grained Password
if (($PasswordPol) -ne $null)
{
$maxPasswordAge = ($PasswordPol).MaxPasswordAge
}

else
{
$maxPasswordAge = (Get-ADDefaultDomainPasswordPolicy).MaxPasswordAge
}

$expireson = $passwordsetdate + $maxPasswordAge
$today = (get-date)
$daystoexpire = (New-TimeSpan -Start $today -End $Expireson).Days

if ($daystoexpire -le $expireindays1)
{
$ListOfNames += $Name

}

}
echo $listofnames

Outlook Patch KB2956128 Breaks Profile Changing (and KB3054881)

With Outlook 2010, I have profiles automatically created*. This means a user can just launch Outlook for the first time with all their account settings populated. The flow on effect of this is that from the Mail control panel program, clicking Add will also auto-populate the account using our email server and the signed in user’s email address.

outlook2

Once the new profile was created, you can normally go to Properties > Email Accounts > Change – from there, you can enter a different user’s name and use their Exchange account instead (assuming you have permission). This is handy for people who need secondary profiles for Outlook for whatever reason, or for Admins.

outlook

Except, now I can’t change the account from my own. The User Name field for the Change Account window is greyed out! It never used to be. After doing some digging around, assuming some policy must have changed I finally worked out that the latest update for Outlook had caused this.

The culprit is KB2956128, the February 10, 2015 update for Outlook 2010. After removing this update from my PC, the field was no longer greyed out and can now be changed.

outlook3

Another weird effect of this patch was that one of the profiles disappeared when it was installed, then reappeared after the patch was removed.

My guess is that this problem stems from the listed issue being fixed, but I’m only guessing:

February 10, 2015 update for Outlook 2010 (KB2956128)

    • Although you deploy the Microsoft Outlook 2010 policy Prevent copying or moving items between accounts (registry entry DisableCrossAccountCopy), Outlook 2010 still lets certain user rules to move or copy organization email messages to an Outlook Data (.pst) file or another email account.

 

There are some other grumblings about this patch breaking addins, OCS crashing, password prompts and search functionality on public folders. I didn’t see my particualr issue mentioned though… here’s a few links:

http://www.reddit.com/r/sysadmin/comments/2voun5/patch_tuesday_kb2956128_breaks_mailexpress/

http://www.infoworld.com/article/2884204/patch-management/users-report-that-kb-2956128-is-causing-outlook-failures.html

https://social.technet.microsoft.com/Forums/office/en-US/af1df139-e8f4-4950-9f6d-147e21c40f92/ol2010search-problems-after-install-kb2956128?forum=outlook

The worrying part of this is it seems to be yet another patch that’s causing issues in the Microsoft world. They haven’t had a very good run of patches lately, when a year ago a bad patch was surprising. Let’s hope they start testing these more thoroughly again.

* Update 6th March 2015 – I just wanted to clarify that in my work environment, we are pushing settings that force the auto creation of a profile. If you’re not doing this then you’re probably not affected as much by this particular issue because you’ll be prompted for the details such as Exchange Server and Email address, but there’s still several weird issues that have arisen from this patch – so either hold off or do extra testing on this one!

* Update 11th August 2015 – I’ve now noticed that a new update KB3054881 replaces KB2956128, and also breaks this functionality. Uninstalling the update immediately fixes it.

* Update 26th August – KB3055041 replaces the last KB, and still breaks it. I’m going to guess any future Outlook 2010 updates break this.

 

 

Internet Of Things Light Up Challenge – Part One

Read Part Two Here
Read Part Three Here
Read Part Four Here

Frankie Moore from La La Ninja has decided to run an ‘Internet Of Things Light Up Challenge‘ which I signed up for (Sorry, signups are closed now!).

The challenge is about building an internet enabled device using an open source electronics platform, which runs the .NET Micro Framework to build ‘something’. In this case, my understanding is that it’ll be a device that can light up – if it lights up, you win an Xbox One!

I have very little programming knowledge, so this is a great entry level project for me. Over several weeks we’ll be given tutorial videos to follow so we can build this device. I just need to install a copy of Visual Studio 2013 and I’ll be ready to go.

A few days ago, the package for this project turned up. I had no idea what to expect, but this is what was in the box:

WP_20150303_11_33_06_Pro

WP_20150303_11_47_14_Pro

Not what I was expecting! A bunch of resistors (500 of them!), some boards, wires… and the best bit, a Netduino Plus 2. Specs of this cool little computer are available here, but here’s the basics:

CPU: STMicro 32-bit 168MHz
RAM: 100+ KB
Code Storage: 384 KB
Ports: 10mb Ethernet, MicroSD, MicroUSB

I’ll post more as the project continues, and I’m really looking forward to it!

LinkedIn for Outlook Social Connector Discontinued

Today I received the following notice from LinkedIn:

Hi Adam,

As an active user of LinkedIn for Microsoft Outlook Social Connector, we wanted to make sure we let you know that on March 9, we will no longer support LinkedIn for Microsoft Outlook Social Connector in Outlook 2003, 2007, and 2010. This means that LinkedIn information about your email contacts will not be visible in those Outlook versions.
Our team is working with Microsoft to build even more powerful tools to help you stay connected with your professional world. Until then you can get similar capabilities with the “LinkedIn for Outlook” app for Outlook 2013 from the Office Store.
Have questions? Visit our Help Center for more information..
Thanks,
The LinkedIn Team

That’s 6 days notice (although probably seven since I’m going to assume it’s US March 9) for discontinuing a product. I’ve had a brief look around and can’t find any other information around this, apart from a similar message on LinkedIn’s website.

LinkedIn appear to be pushing their new app called LinkedIn for Outlook, which is only supported by Outlook 2013 or Outlook Online. That doesn’t help those of us that can’t run Outlook 2013 for legacy reasons (plugins being the main culprit here!).

One note is worth pointing out on the decomissing of the product taken from LinkedIn’s website:

  • Any contact information that you have locally synced in Outlook will remain in Outlook, but it will no longer be updated.

Does this mean the plugin will continue without erroring, showing cached information? This can be a gotcha for people running it either at home, or in a corporate environment. I’ve reached out to LinkedIn on Twitter, so we’ll see if they respond:

 

Quick Update: Wes Miller has pointed out that this could be due to LinkedIn API changes, locking down most things.

Update 11th March 2015 – I’ve had LinkedIn help respond. Looks like it’s time to uninstall that addon before users are affected!