Skip to content

Instantly share code, notes, and snippets.

View KentNordstrom's full-sized avatar

Kent Nordström KentNordstrom

View GitHub Profile
@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 / InstallMIMUpdate.ps1
Created November 30, 2018 08:28
Install MIM 2016 Updates (Hotfix Rollups)
<#
.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 / BulkUpdateFromCsv.ps1
Last active June 6, 2022 19:02
Bulk update objects in FIM/MIM based on CSV file
<#
.SYNOPSIS
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
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.