Check UserID for Differences

January 4, 2013

What prompted me to look for this solution was an error we received while trying to run –


I received this error –

Management object not found for identity "tbolton".
+ CategoryInfo : InvalidData: (tbolton:UserIdParameter) [Get-CsUser], ManagementException
+ FullyQualifiedErrorId : Identity,Microsoft.Rtc.Management.AD.Cmdlets.GetOcsUserCmdlet
+ PSComputerName :

The issue turned out to be the Alias Setting on the General Page in Exchange.  For what ever reason the entry there was BOLTONTIM

Today I found what Get-CSUser was keying off of in AD, it was keying off of, “MailNickName”.

# Used To Check for any differences in a UserID

# Example - PS C:\>Check-UserID TBOLTON

Function Check-UserID {
[parameter(Mandatory = $true)]
[String] $UID)
$User=(Get-ADUser $UID -Properties *)
# Report if there are differences
if (($UserSAM -eq $UserName) -and ($UserName -eq $UserNickName))
Write-Host -foregroundcolor Green "The UserId"  $UID  "WAS a match"
Write-Host -foregroundcolor Green "SAM Account:  " $UserSAM
Write-Host -foregroundcolor Green "User Name: -- " $UserName
Write-Host -foregroundcolor Green "CN: --------- " $UserCN
Write-Host -foregroundcolor Green "Mail ALias: - " $UserNickName
} else {
     Write-Host -foregroundcolor Red "The UserId"  $UID  "did NOT match"
Write-Host -foregroundcolor Red "SAM Account:  " $UserSAM
Write-Host -foregroundcolor Red "User Name: -- " $UserName
Write-Host -foregroundcolor Red "CN: --------- " $UserCN
Write-Host -foregroundcolor Red "Mail ALias: - " $UserNickName

In this example my account is intentionally set up wrong while the first account is set up correctly.

Why Should I Learn PowerShell? Real World Example Saves the Day!

January 30, 2012

Posted on the Hey Scripting Guy BLOG.  Why Should I Learn PowerShell? Real World Example Saves the Day!  Some real life issues that came up.

I was very happy to have been asked to contribute.

Click On Link Below

Why Should I Learn PowerShell? Real World Example Saves the Day!

Enforce Plain Text Outlook 2010

January 10, 2012

There are many companies, both large and small, that would like to require their users to use Plain Text only in their Outlook 2010 Emails.  If you have attempted this you have more than likely set up the appropriate settings available in Group Policy shown below.

I even went as far to ensure this setting on the Exchange 2010 Server Side via Powershell.
Where * is the Default Domain.

Set-RemoteDomain -Identity:* -ContentType MimeText
Get-RemoteDomain -Identity:* | fl - will show the settings.

After finding that the users were still able to select Format Text and change their text to both Rich Text and HTML I decided I had to dig deeper.

I found that I could manually change this feature while logging in with my account but this only affected my logon experience, not the other users.

With the New Message open click  File – Options

Click on Mail – Editor Options

Click on Customize Ribbon – Main Tabs from the drop down – Format Text – Format
Now you can remove Format and those options will no longer appear.

Notice that the Rich Text and HTML options are now gone and the default is Plain Text.

The next step was to reverse the settings placing the Format Text option back in place. Then I made a backup of the entire registry called B4.REG. I then made the changes listed above and once the settings were in place, I created another backup of the registry called Aftr.REG.
My plan was to use WINMerge to find where they change had occurred in the registry to help me find the control ID for the item that I wanted to disable via Group Policy shown below.

As you can see all I need is the Command Bar ID and I will be able to block it. There is even a link listed

Thank You Microsoft!

But as you see this link offers no help whatso ever…  Thanks Microsoft… sigh

Working with the two REG files B4.REG and Aftr.REG showed me nothing of any use. I was not able to find a change in the registry that would show me the needed Command Bar ID’s. I also used Process Explorer and Process Monitor, but again nothing that indicated where this was located in the registry where I could manually change a setting.
After endless Google links that provided endless bad information, I came across a link for this app.

Built-in Control Scanner
You use Built-in Controls Scanner to find command bar names and built-in controls IDs.

I installed this on one of my test machines and opened Outlook 2010 and started a new message then selected the Format Text tab.

I then stated the App with Outlook selected.


In Group Police I updated  –  User Configuration\Administrative Templates\Microsoft Outlook 2010\Disable Items in User Interface\Custom  I entered the Command Bar ID’s along with a description.

Enter the Command Bar ID’s here.  5564 and 5565

I ran Gpupdate /Force on the test machine and reopened Outlook 2010 and started a new email message.  As you can see, the Rich Text and HTML Text options are gone.  This will ensure that they users cannot use this option to bypass policy.

I hope this helps someone that has been trying to configure this setting.  If there is an easier way to do this please post the link here.

AD Clean up with Powershell for Beginners.

December 28, 2011

The questions and answers were developed straight from Microsoft Technet and I have included the link.

Active Directory Cmdlets in Windows PowerShell

Windows PowerShell™ is a task-based command-line shell and scripting language designed especially for system administration. This reference topic for the information technology (IT) professional introduces the 76 Windows PowerShell cmdlets that you can use to manage and administer the Active Directory® directory service and Active Directory Domain Services (AD DS).

The purpose of this crossword was to hopefully introduce some reluctant Administrators to Powershell, especially those that administer Active Directory (AD).

You do not have to be a NASCAR or INDY racer to realize the benefits of being able to drive a car, so what are you waiting for when it comes to learning Powershell?  Powershell will be a mandatory requirement in the very near future, if it is not already in your area.

If you find that Powershell can (will) make your life much easier, then I would highly suggest these links to open your mind and your world to Powershell.

Mark Minasi – Mark Minasi is a senior contributing editor for Windows IT Pro, an MCSE, and the author of more than 30 books, including Mastering Windows Server 2008 R2 (Sybex). He writes and speaks around the world about Windows networking.

Find Users with Get-ADUser –

Read the rest of this entry »

Powershell for Beginners crossword

December 15, 2011

I put together a Powershell for Beginners crossword puzzle.  I hope you enjoy it.  I even learned a thing or two while  putting it together.  I will be working on a Clean Up AD Version, thanks to my good friend Mark Minasi, soon.

I also want to thank Jeffery Hicks and Claus Nielsen for urging me to complete this little project.

PDF can be downloaded from link below.

Powershell for Beginners

New Books!

February 25, 2011

Learn Windows PowerShell in a Month of Lunches
by Don Jones

Learn Windows PowerShell in a Month of Lunches is an innovative tutorial designed for busy administrators. Author Don Jones has taught thousands of administrators to use PowerShell, and now he’ll teach you, bringing his years of training techniques to a concise, easy-to-follow book. Just set aside one hour a day—lunchtime would be perfect—for an entire month, and you’ll be automating administrative tasks faster than you ever thought possible.

Two new books to add today.  Once again Aidan Finn has released yet another book.

Mastering Windows 7 Deployment

The Great Mark Russinovich has written a thriller, a fictional novel using his experience and knowledge of IT:

Zero Day

“Arab terrorists, with the collusion of Osama bin Laden, are behind the attack, which is supposed to destroy Western civilization. A New York City law firm enlists cyber expert Jeff Aiken to track down a virus that has knocked out the company’s computer network. While working on this problem, Jeff uncovers the larger threat. With the help of “stunningly attractive” Daryl Haugen, an old friend who becomes his love interest, Jeff attempts to warn the authorities, but to little avail”.

You can pre-order the book now on in paper and for Kindle.  The expected RTM is March 15th, 2011.

Mastering Hyper-V Deployment

October 18, 2010
 Aidan is a friend of mine that has helped me out of “many” self induced issues dealing with Hyper-V and Server 2K8.  You can pre-order his new book at Amazon.
Book Info –

Amazon Link

Mastering Hyper-V - Adian Finn

Mastering Hyper-V - Adian Finn


Get every new post delivered to your Inbox.

Join 210 other followers