Skip to content

Instantly share code, notes, and snippets.

Kent Nordström KentNordstrom

View GitHub Profile
KentNordstrom / InstallMIMUpdate.ps1
Created Nov 30, 2018
Install MIM 2016 Updates (Hotfix Rollups)
View InstallMIMUpdate.ps1
Installs updates for MIM Synchronization Service and MIM Service.
Add support for Languagepack updates.
[string]$Version = "",
KentNordstrom / BulkUpdateFromCsv.ps1
Last active Aug 26, 2019
Bulk update objects in FIM/MIM based on CSV file
View BulkUpdateFromCsv.ps1
Example script to bulk update users from CSV file.
The CSV file needs to have columnnames in row 1.
Columnnames need to correspond to the attribute name in FIM/MIM.
The column specified as "anchor" will not be updated all other columns will be updated based on content in csv file.
Multivalue and Reference data types are not supported in this version.
The script requires that the Lithnet Power Shell module is installed on the computer running the script.
The account running the script requires write permission to all attributes in the csv file except for the anchor attribute.
KentNordstrom / ClearRunHistory.ps1
Created Mar 10, 2019
Clears Run History in FIMSynchronizationService after saving to xml file.
View ClearRunHistory.ps1
Clears run history in FIM Synchronization Service and stores the history.
The Number of days to keep.
.PARAMETER exportDirectory
The folder where deleted history is saved.
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
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 / EnableHybridReportingInMIM.ps1
Created May 3, 2018
Enable Hybrid Reporting in MIM 2016 without installing the MIMReportingAgent
View EnableHybridReportingInMIM.ps1
Script to manually configure MIM 2016 Hybrid Reporting without installing the Agent as described in
# 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 / RedirectToMIMPortal.ps1
Last active Jan 29, 2019
Redirect to MIM Portal to make it the Welcome Page in the underlying SharePoint.
View RedirectToMIMPortal.ps1
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 / InstallMIMSync.ps1
Last active Dec 16, 2018
Script to install MIM Synchronization Service
View InstallMIMSync.ps1
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 / RemoveMultiValueValues.ps1
Last active Nov 12, 2018
Remove Values from MultiValue Attribute
View RemoveMultiValueValues.ps1
Script to remove values from MultiValue attribute based on search criteria.
[string]$MultiValueAttribute = 'emailAlias',
[string]$SearchValue = '',
KentNordstrom / BeginImport.ps1
Created Apr 15, 2018
Use the Microsoft Generic PowerShell Connector to connect to MS Graph
View BeginImport.ps1
param (
[System.Collections.ObjectModel.KeyedCollection[[string], [Microsoft.MetadirectoryServices.ConfigParameter]]] $ConfigParameters,
[PSCredential] $PSCredential,
[Microsoft.MetadirectoryServices.OpenImportConnectionRunStep] $OpenImportConnectionRunStep,
[Microsoft.MetadirectoryServices.Schema] [ValidateNotNull()] $Schema
[string]$watermark = $OpenImportConnectionRunStep.CustomData #Used if Delta Import
if($OpenImportConnectionRunStep.ImportType -eq 'Delta' -and !$watermark){throw ("Full Import Required. No watermark found.")}
KentNordstrom / HelloForBusinessPermissionsOnAdminSDHolder.ps1
Created Jul 17, 2018
Allow Hello For Business on Protected Accounts by adding permissions to AdminSDHolder container.
View HelloForBusinessPermissionsOnAdminSDHolder.ps1
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.
$ADDomain = Get-ADDomain
You can’t perform that action at this time.