Skip to content

Instantly share code, notes, and snippets.

View KentNordstrom's full-sized avatar

Kent Nordström KentNordstrom

View GitHub Profile
@KentNordstrom
KentNordstrom / RedirectToMIMPortal.ps1
Last active January 29, 2019 10:06
Redirect to MIM Portal to make it the Welcome Page in the underlying SharePoint.
<#
.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 / InstallMIMSync.ps1
Last active December 16, 2018 18:43
Script to install MIM Synchronization Service
<#
.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 / UpdateSyncRules.ps1
Last active February 23, 2019 07:37
Script to Synchronize only the Sync Rules and no other object in the FIM Service MA Connector Space.
<#
.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 / ClearRunHistory.ps1
Created March 10, 2019 08:30
Clears Run History in FIMSynchronizationService after saving to xml file.
<#
.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 / SynchronizeSelectedMVObjects.ps1
Created September 1, 2022 08:30
A script to synchronize only selected objects in MIM MetaVerse
<#
.SYNOPSIS
This script serves as example on how to find and run scripted sync on selected objects in MIM.
Queries are run against MetaVerse to find the objects and then it finds the ConnectorSpace object and runs sync.
#>
Import-Module LithnetMIISAutomation
$CStoSync = "ADviaPS" #The name of the ConnectorSpace you want the sync to run in.