Configuration

Adding OneDrive locations to an existing Retention Policy

Yesterday, while working with a customer, I was asked if there is a way to programmatically add OneDrive locations to an existing retention policy.  Say, for example, you have a blanket retention policy that covers all of your tenant at a base level (which is what I typically recommend to ensure you at least have either belt or suspenders), but then you have a second set of users that need a longer policy.… [ Continue reading ]

Configuration

Forwarding Address Import and Export

Four score and many moons ago, I was working on one of my first projects in Microsoft Consulting Services.  This particular customer (a university) shared their Active Directory infrastructure with a hospital.  During the course of their business, employees would frequently move between organizations. … [ Continue reading ]

Configuration

Sensitive Information Types–now with more sensitivity!

UPDATE: The TechNet Gallery link for this post has been updated.

So, this is an entry that has been long in the making.  I have had several customers over the last few years give feedback about our Data Loss Prevention’s (DLP) matching requirements, mostly around how they require too much corroborating evidence (in the form of patterns or keywords) to meet their organization’s very restrictive policies.… [ Continue reading ]

Configuration

Update: AAD Connect Network Test Tool

Update (7/24): I updated this since the last revision, so if you downloaded it prior to 7/24/2018, get the newest version.

I began working with the product group on rolling in some of the network connectivity and testing checks available in the AAD Connect Network Test tool into the actual AAD Connect product. … [ Continue reading ]

Information

Testing a variable with the value of zero

Tonight, while working on my previous script, I ran into an interesting problem when testing the presence of a value.

Consider this:

PS C:\> [int]$IntValue0 = 0
PS C:\> [int]$IntValue1 = 1
PS C:\> [string]$StringValue0 = "0"
PS C:\> [string]$StringValue1 = "1"
PS C:\> $IntValue0
0
PS C:\> $IntValue1
1
PS C:\> If ($IntValue0) { "exists" }
PS C:\> If ($IntValue1) { "exists" }
exists
PS C:\> if ($StringValue0) { "exists" }
exists
PS C:\> if ($StringValue1) { "exists" }
exists
PS C:\> if ($IntValue0 -eq $null) { "null" }
PS C:\> if ($IntValue0 -lt 1) {"less than 1" }
less than 1
PS C:\> $IntValue0.GetType()

IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True Int32 System.ValueType

My short lesson: when setting an integer value to 0, you can’t test for it using If ($Value), as that will return false. … [ Continue reading ]

Personal

Update: Create-LabUsers Tool

Just when you thought it couldn’t get more awesome.

It has.

By popular request, I have added a few new features (and fixed an annoyance).  First, the bug fix:

-Count 1

Yes, it’s true. If you ran the Create-LabUsers script with -Count 1 with the -InflateMailboxes parameter, you’d run into an issue because of how I calculated the $MaxRecipients value. … [ Continue reading ]