Skip to content

Instantly share code, notes, and snippets.

View KentNordstrom's full-sized avatar

Kent Nordström KentNordstrom

View GitHub Profile
@KentNordstrom
KentNordstrom / HelloForBusinessPermissionsOnAdminSDHolder.ps1
Created July 17, 2018 07:20
Allow Hello For Business on Protected Accounts by adding permissions to AdminSDHolder container.
<#
.SYNOPSIS
Script to give Azure AD Connect Permission on Protected users that want to use Hello For Business in Hybrid Deployment.
Gives read/write to msDS-KeyCredentialLink and msDS-ExternalDirectoryObjectID by setting permissions on AdminSDHolder container.
#>
PARAM([string]$SyncUser="MSOL_1234ABC56")
$ADDomain = Get-ADDomain
@KentNordstrom
KentNordstrom / DeltaRun.ps1
Created May 12, 2018 06:42
Script for running MIM Synchronization Service in a controlled way.
<#
.SYNOPSIS
Script to run Synchronization of MIM.
Requires the LithnetMiisAutomation PowerShell module from https://github.com/lithnet/miis-powershell
.NoExport
Parameter that will disable Exports to External Systems. Only FIMService will receive Exported data.
#>
PARAM([bool]$NoExport=$false)
@KentNordstrom
KentNordstrom / WaitForWF.ps1
Created May 3, 2018 19:47
A script that checks if Requests to the FIMService are still in PostProcessing mode.
<#
.SYNOPSIS
Script that waits for WF triggered by requests.
Used in Schedules to get dynamic sleep time before importing results after export to FIM Service.
Default Creator is Built-in Synchronization Account.
Requires the LithnetRMA PowerShell module from https://github.com/lithnet/resourcemanagement-powershell
#>
PARAM(
[string]$Creator = 'fb89aefa-5ea1-47f1-8890-abe7797d6497',
@KentNordstrom
KentNordstrom / CreateSyncStatisticDB.ps1
Last active April 22, 2018 10:08
Scripts to save synchronization statistics (Pending Exports) to SQL
<#
.SYNOPSIS
Script that creates SQL DB to store Pending Exports in MIM MAs into SQL for Statistical analysis.
#>
PARAM([string]$SQLServer = "dbFIMSync", [string]$DBName = "FIMSyncStatistics",[string]$ScheduleAccount="AD\svcMIMAdmin")
#region Modules
Import-Module LithnetMIISAutomation
Import-Module SqlServer
@KentNordstrom
KentNordstrom / SetDBAlias.ps1
Created March 16, 2017 13:31
Add/Update your SQL Aliases using PowerShell
<#
.SYNOPSIS
This script adds/updates SQL Aliases on the local machine.
It can be implemented as function in your deployment scripts when installing FIM/MIM
or other application using SQL Aliases.
#>
PARAM([string]$AliasName,[string]$TargetServer,[string]$TargetPort="1433")
#Alias to be added to local machine
$dbAlias = "DBMSSOCN,$TargetServer,$TargetPort"