Scripting Blog

A place to learn about PowerShell and share stories of automation

How Can I Add an Email Address to the proxyAddresses Attribute?

Hey, Scripting Guy! How can I add an email address to the proxyAddresses attribute without overwriting all the existing attributes?-- DH Hey, DH. For those of you who aren’t too familiar with the proxyAddresses attribute (and, alas, that includes the Scripting Guys) proxyAddresses is an attribute added to Active Directory by Microsoft ...

How Can I Attach a File to an Email Sent Using CDO?

Hey, Scripting Guy! I understand how to use CDO to send an email, but how do I include an attachment with that email?-- RT Hey, RT. And, incidentally, thanks for this question. At least one of the Scripting Guys spent most of his Thanksgiving weekend eating and, on the rare occasions when he wasn’t eating, playing tackle football with a ...

How Can I Get a List of Exchange Servers Assigned to My Users?

Hey, Scripting Guy! How do I get a list of the Exchange servers (msExchHomeServerName) assigned to the users in an OU?-- BG Hey, BG. As you probably already figured out, you have two issues: you need to get a list of all the users in an OU, and then you need to figure out which Exchange server they’ve been assigned. Believe it or not, this ...