PowerShell Random Password Generator

On a project earlier this year, I had to create random passwords for user accounts as part of a provisioning tool.  Perpetually trying to find the fastest way to do something, I came up with a one-liner that you can use to create a random text string from the following ASCII printable characters: !”#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_abcdefghijklmnopqrstuvwxyz{|}~0123456789 To…

12

Use AADConnect to Populate Office 365 Usage Location

So, a million years and tens of thousands of lines of code ago, I wrote a script for a customer to populate the Office 365 UsageLocation property (Set-MsolUser -UsageLocation) with the ISO country codes from Active Directory.  In Office 365, UsageLocation is used to determine what features are available to your users. If you have the…

12

Testing for bad SMTP Addresses

While working on my latest project,  I encountered a significant number of objects with malformed SMTP addresses.  These appeared to have been objects that had been somehow manually modified over the years by directly writing to the proxyAddresses attribute in Active Directory, bypassing an API that would check for correctly-formatted addresses. As part of a migration…

10

Removing Proxy Addresses from Exchange Recipients

I saw a request come through the other day for a method to remove unwanted proxy addresses for contacts.  I’d had some code sitting around from a project a few years back and decided to freshen it up, and maybe add some newer tricks. So, the original idea was to select a bunch of users…

10

Create realistic lab users

Update: I’ve added a shortlink for this tool: http://aka.ms/createlabusers. In testing out some of my other tools over the last few weeks, I’ve found it necessary to create a some test users.  A lot of test users.  Not a normal “a lot,” either.  I needed hundreds of thousands at a minimum, a million if possible,…

10

ATP: Safe Attachments, Safe Links, and Anti-Phishing Policies or “All the policies you can shake a stick at”

With the advent of scammers, spammers, phishers, and other types of baddies, and the complementary rise in anti-malware, anti-spam, domain and sender verification techniques, we’re in a perpetual cat-and-mouse game.  I’ve had several customers over the past few weeks ask me about best practices for configuring some of the Advanced Threat Protection (ATP) features. I’ve…

10

Updates to Office 365 Proxy PAC Generator

I wrote the original Proxy PAC tool for a customer almost a year ago, and since have added a lot of new functionality.  Rather than updating my previous blog posts about it, I thought I would start a fresh thread.  If you want some background on how Proxy PAC files work and how to distribute…

10

Use AADConnect to add a Proxy Address

* UPDATE* After doing this originally, I decided to take a different route and write it back to the on-premises AD, so that way, the objects are synchronous.  This post now reflects the updated content. A few weeks ago, I had an issue where I needed to remove a proxy address from the proxyAddresses array…

10

Finding Duplicate Objects in Active Directory

For those of you that have embarked upon the trek to Office 365, you’ve undoubtedly run (or at least heard of) IDFix.  It detects and fixes a number of conditions that will cause the directory sync to report errors. Today, I want to focus on a tool I wrote for a customer almost 2 years…

9

Office 365 Groups and Anonymous External Senders

Office 365 Groups are glorious creations.  There are, however, some instances where they don’t work as you anticipate (or hope). One of those scenarios is when you are configured in hybrid coexistence with the following scenario: Office 365 Group Writeback is enabled (for configuring permissions, see this script) RequireSenderAuthenticationEnabled is set to False for an…

8