Thursday, April 27, 2017

OneNote Screen Clipping Shortcut after Windows 10 Creators' Update

Windows 10 Creators' Update may be many things to people who intend to... ah... create. But at least for IT folks, especially sysadmins and engineers, one thing is definitely going to get on your nerve.

You might have gotten a rude shock when you realize that Windows+Shift+S shortcut to send screen clipping direct to OneNote no longer works. Instead, now it merely sends the screen clipping to the clipboard. Cool feature, at least for them creators. But why would I want to have to bother with an extra step of pasting from the clipboard when I can send the whole batch of screenshots directly into OneNote?

Here's how to solve it. Get into regedit and create this new DWORD key:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\OneNote\Options\Other\ScreenClippingShortcutKey 
Let's just set the value to 41 (hex ASCII code for the letter 'A'), now the shortcut key for screen clipping will be Windows+Shift+A. I chose A because it's next to S, so not much finger-relearning needed, but you can set it to any character on the keyboard.

After the registry change, somehow the UI still shows the old shortcut, but Windows+Shift+A is indeed the shortcut key to use when taking a screen clipping to OneNote.


For more options, have a look at this site:
http://www.winhelponline.com/blog/onenote-screen-clipping-shortcut-key-change/

Thursday, March 30, 2017

Complex properties from Get-ADUser

If you have every tried to export a list of AD Users along with their ProxyAddresses into a CSV file using Get-ADUser, you'll understand the pain of using powershell sometimes. Here's a quick example:


"DistinguishedName","Enabled","GivenName","Name","ObjectClass","ObjectGUID","proxyaddresses","SamAccountName","SID","Surname","UserPrincipalName"
"CN=jondoe,DC=contoso,DC=com","True","Jon","jondoe","user", "00000000-000-0000000", "Microsoft.ActiveDirectory.Management.ADPropertyValueCollection", "jondoe","S-1-5-21-00000-00000-0000000-00000",,"jondoe@contoso.com"


The problem is while most attributes like DistinguishedName, Enabled, GivenName, etc. are simple text value, ProxyAddresses shows up as an ADPropertyValueCollection. Showing me its type does not help.

Here's a quick and dirty way I use to address this issue:
Get-ADUser jondoe -Property ProxyAddresses | select Name,UserPrincipalName,@{n="ProxyAddresses";e={$_.ProxyAddresses -join "|"}}
You can change the "|" character to anything you like, but you get the idea. It works just like magic!