Skip to content

Instantly share code, notes, and snippets.

@msidmvp
msidmvp / gist:7156615d507d49e8c0bafc3c72a50666
Last active May 8, 2019 15:42
Adding AAD members to an AAD group based on CSV file
# Read in a list of user accounts from a CSV
#
# -- Begin sample CSV file --
# Username
# dtrump
# bobama
# gbush
# -- End sample CSV file --
#
$GroupObjectID = (Get-AzureADGroup -SearchString "your_groupname_here").ObjectID
@msidmvp
msidmvp / EnableEncryptedO365Mail.ps1
Created June 1, 2017 19:47
Enable Encypted Mail in O365
# Subscription Requirement:
#
# O365 E3/E4 subscription or O365 subscription w/ standalone Windows Azure Rights Management
#
# Software Requirements:
#
# 1. Download Microsoft Online Services Sign-In Assistant
# http://www.microsoft.com/en-us/download/details.aspx?id=41950
#
# 2. Download Azure AD Module
@msidmvp
msidmvp / PS1
Created April 5, 2017 15:06
MIM: How To Check Pending Deletes Before Performing An Export
#####################################################################################################
# Simple PowerShell script to prevent running an export if more than 1000 objects are pending delete
#
# More information on FIM and MIM WMI:
# https://msdn.microsoft.com/en-us/library/windows/desktop/ms697764(v=vs.100).aspx
#
$miisWmiObject = get-WMIObject –class MIIS_ManagementAgent –namespace root/MicrosoftIdentityIntegrationServer –filter "Name='ADMA'"
$exportdeletes = $miiswmiobject.NumExportDelete().returnvalue
if ($exportdeletes > 1000)