Skip to content

Instantly share code, notes, and snippets.

Kent Nordström KentNordstrom

Block or report user

Report or block KentNordstrom

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@KentNordstrom
KentNordstrom / ClearRunHistory.ps1
Created Mar 10, 2019
Clears Run History in FIMSynchronizationService after saving to xml file.
View ClearRunHistory.ps1
<#
.SYNOPSIS
Clears run history in FIM Synchronization Service and stores the history.
.PARAMETER dayDiff
The Number of days to keep.
.PARAMETER exportDirectory
The folder where deleted history is saved.
#>
@KentNordstrom
KentNordstrom / UpdateSyncRules.ps1
Last active Feb 23, 2019
Script to Synchronize only the Sync Rules and no other object in the FIM Service MA Connector Space.
View UpdateSyncRules.ps1
<#
.SYNOPSIS
Script to update only synchronization rules.
#>
Import-Module LithnetMiisAutomation
$MA = "FIMService"
$OldSyncRules = New-MVQuery -Attribute displayName -Operator IsPresent | Get-MVObject -ObjectType synchronizationRule
foreach($rule in $OldSyncRules)
{$void = Sync-CSObject (Get-CSObject -DN ($rule.CSMVLinks.ConnectorSpaceDN) -MA $MA) -Commit}
@KentNordstrom
KentNordstrom / InstallMIMSync.ps1
Last active Dec 16, 2018
Script to install MIM Synchronization Service
View InstallMIMSync.ps1
<#
.SYNOPSIS
Installs MIM Synchronization Service
Expects the MIM ISO file to install from in the MediaFolder.
Script will ask for ServiceAccount password.
Typically the SQL Server is an SQL Alias
Please update the Parameters region to meet your own needs.
@KentNordstrom
KentNordstrom / RedirectToMIMPortal.ps1
Last active Jan 29, 2019
Redirect to MIM Portal to make it the Welcome Page in the underlying SharePoint.
View RedirectToMIMPortal.ps1
<#
.SYNOPSIS
Script to Redirect to /IdentityManagement on MIM Portal Server.
Defaults to expecting the only SPSite to be MIM Portal Site.
Intended to be run from SharePoint Management Shell.
Users need Read Access to RootFolder for this to work.
Script gives Read to Authenticated Users by default.
#>
@KentNordstrom
KentNordstrom / InstallMIMUpdate.ps1
Created Nov 30, 2018
Install MIM 2016 Updates (Hotfix Rollups)
View InstallMIMUpdate.ps1
<#
.SYNOPSIS
Installs updates for MIM Synchronization Service and MIM Service.
.ToDo
Add support for Languagepack updates.
#>
PARAM(
[string]$Version = "4.5.286.0",
@KentNordstrom
KentNordstrom / HelloForBusinessPermissionsOnAdminSDHolder.ps1
Created Jul 17, 2018
Allow Hello For Business on Protected Accounts by adding permissions to AdminSDHolder container.
View HelloForBusinessPermissionsOnAdminSDHolder.ps1
<#
.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
Script for running MIM Synchronization Service in a controlled way.
View DeltaRun.ps1
<#
.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
A script that checks if Requests to the FIMService are still in PostProcessing mode.
View WaitForWF.ps1
<#
.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 / EnableHybridReportingInMIM.ps1
Created May 3, 2018
Enable Hybrid Reporting in MIM 2016 without installing the MIMReportingAgent
View EnableHybridReportingInMIM.ps1
<#
.SYNOPSIS
Script to manually configure MIM 2016 Hybrid Reporting without installing the Agent as described in
https://docs.microsoft.com/en-us/microsoft-identity-manager/working-with-identity-manager-hybrid-reporting
#>
# Step 1. Create the EventLog to store the MIM Request Events in.
New-EventLog -LogName "Identity Manager Request Log" -Source "Microsoft.IdentityManagement.Service"
# Step 2. Add hybrid reporting setting in FIMService config file. Setting hybridReportingRequestLoggingEnabled="true"
@KentNordstrom
KentNordstrom / CreateSyncStatisticDB.ps1
Last active Apr 22, 2018
Scripts to save synchronization statistics (Pending Exports) to SQL
View CreateSyncStatisticDB.ps1
<#
.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
You can’t perform that action at this time.