This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fix-DelegatedSetup.ps1 | |
# | |
# In Exchange 2013, delegated setup fails if legacy admin groups still exist. However, | |
# it's recommended that these admin groups not be deleted. To make delegated setup work, | |
# you can temporarily place an explicit deny so that the Delegated Setup group | |
# cannot see them. This script automates that process. | |
# | |
# This script takes no parameters. The syntax is simply: | |
# .\Fix-DelegatedSetup.ps1 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create-BigObjects.ps1 | |
$dcName = "DC1" | |
$domain = "DC=bilong,DC=test" | |
$bigObjectContainer = "BigObjects" | |
Import-Module ActiveDirectory | |
$adModule = Get-Module | WHERE { $_.Name -eq "ActiveDirectory" } | |
if ($adModule -eq $null) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fix-MailEnabled.ps1 | |
# | |
# The purpose of this script is to read an ExFolders or PFDAVAdmin | |
# property export of public folders, and fix the folders where the | |
# mail-enabled state is not consistent. | |
# | |
# The export must include the following properties: | |
# PR_PF_PROXY, PR_PF_PROXY_REQUIRED, DS:proxyAddresses | |
# | |
# The export can optionally include the following |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param( | |
[Parameter(Position=0, Mandatory=$true)] | |
[string] $Pattern, | |
[Parameter(Position=1, Mandatory=$false)] | |
[string] $File, | |
[Parameter(Mandatory=$false)] | |
[string] $Directory, | |
[Parameter(Mandatory=$false)] | |
[string] $FileFilter, | |
[Parameter(Mandatory=$false)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param($file) | |
$reader = new-object System.IO.StreamReader($file) | |
$errorsDictionary = new-object 'System.Collections.Generic.Dictionary[string,int]' | |
$nextLineIsError = $false | |
while ($null -ne ($buffer = $reader.ReadLine())) | |
{ | |
if ($nextLineIsError) | |
{ | |
$nextLineIsError = $false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################### | |
# GenericDoAllMailboxFoldersScript.ps1 | |
# | |
param([string]$HostName, [string]$UserName, [string]$Mailbox, [string]$InputFile) | |
######################################### | |
# Update the path below to match the actual path to the EWS managed API DLL. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param($folder) | |
$ExperimentalIOBinary = 'C:\Users\administrator\Desktop\Microsoft.Experimental.IO.dll' | |
[System.Reflection.Assembly]::LoadFile($ExperimentalIOBinary) | |
function DeleteAllFilesRecursive($path) | |
{ | |
"Getting folders in folder: " + $path | |
$subfolders = [Microsoft.Experimental.IO.LongPathDirectory]::EnumerateDirectories($path) | |
foreach ($subfolder in $subfolders) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param($folder) | |
$ExperimentalIOBinary = 'C:\Users\administrator\Desktop\Microsoft.Experimental.IO.dll' | |
[System.Reflection.Assembly]::LoadFile($ExperimentalIOBinary) | |
function DeleteAllFilesRecursive($path) | |
{ | |
"Getting folders in folder: " + $path | |
$subfolders = [Microsoft.Experimental.IO.LongPathDirectory]::EnumerateDirectories($path) | |
foreach ($subfolder in $subfolders) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Resolve-SIDs.ps1 | |
# | |
# Resolve a bunch of SIDs from a text file, in a loop. | |
param($file) | |
$sids = New-Object 'System.Collections.Generic.List[string]' | |
$reader = New-Object System.IO.StreamReader($file) | |
while ($null -ne ($buffer = $reader.ReadLine())) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################################# | |
# RemoveProperty.ps1 | |
# | |
# Removes property 0x3FC9 from public folders. | |
param([string]$FolderPath, [string]$HostName, [string]$UserName, [boolean]$Recurse, [boolean]$Fix) | |
################################################################################# | |
# Update the path below to match the actual path to the EWS managed API DLL. | |
# |
OlderNewer