Scripting

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 create the passwords, I use this bit of magic: PS>$Password = ([char[]]([char]33..[char]95) + ([char[]]([char]97..[char]126)) + 0..9 | sort {Get-Random})[0..8] -join ''
PS> $Password Z-=$fNgb!
Configuration

## Create a Transport Rule to Reject a Message When Both Domain Conditions Are Met

Today, I saw a question come up as to how to block a message when it’s sent to two different classes of users at the same time.  Let’s say you want to be able to send to John@domain1.com, Bob@domain2.com, and Jane@domain3.com (list 1) or to Mark@domain4.com, Sue@domain5.com, and Mary@domain6.com (list 2), but any time those users from both list 1 AND list 2 appear in the To/CC of the *same* email message, you want it to be blocked. … [ Continue reading ]

Migrating

In my last Google migration post, I talked about creating a MigrationWiz project with the correct resource and folder mappings to support a large-scale project.

One of the requirements is that the resource calendar *must* be opened/mounted on the calendar of the admin user that you’ll be using on the Google side. … [ Continue reading ]

Migrating

## Using MigrationWiz for Google Resources, Bulk Edition

*Update*

The script for this post has been updated with new parameters and requires a new version of the BitTitan PowerShell Module.

Tonight, while working with another consultant, we ran into a migration challenge–how to migrate Google resources and calendars to Office 365 shared mailboxes.… [ Continue reading ]

Scripting

## ActiveSync Device and User Report for Office 365 D, MT, and Exchange 2010+

Today, I had a customer ask me for an ActiveSync device report.  Normally, this is a somewhat simple task (Get-Mailbox | Get-ActiveSyncDevice), but in a large environment with hundreds of domains representing different agencies or business units, that is kind of an unwieldy report to run (as well as including a lot of data for out-of-scope users).… [ Continue reading ]

Scripting

## Using a ScriptBlock to pass a variable into another variable

So, during the course of my current project, I’ve been able to re-use a lot of scripts that I’ve spent years developing and reworking.  This time through, though, I’ve found that in trying to make them consumable by other people, I need to update them with command-line parameters (you know, like some sort of grown-up scripter).… [ Continue reading ]