Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
IBM Lotus Domino Notes FIM MIM PowerShell Management Agent Import Script. Supporting blog post is located here
param (
[bool] $usepagedimport,
$DebugFilePath = "C:\PROGRA~1\MICROS~4\2010\SYNCHR~1\EXTENS~2\NotesPWD\Debug\NotesImport.txt"
if(!(Test-Path $DebugFilePath))
$DebugFile = New-Item -Path $DebugFilePath -ItemType File
$DebugFile = Get-Item -Path $DebugFilePath
"Starting Import as : " + $OperationType + (Get-Date) | Out-File $DebugFile -Append
$Server = "LDAP://server:389/O=Org-Aus"
$entry = New-Object System.DirectoryServices.DirectoryEntry($Server,$Username,$Password,"none")
$LDAPfilter = "(objectclass=*)"
$directorySearcher = New-Object System.DirectoryServices.DirectorySearcher($entry,$LDAPfilter)
$results = $directorySearcher.FindAll()
foreach($user in $results){
If ($user.Properties.objectclass.Contains("dominoPerson") -and ($user.Properties.uid)){
$obj = @{}
$obj.Add("uid", $user.Properties.uid[0])
$user.Properties.uid | Out-File $DebugFile -Append
$obj.Add("objectClass", "dominoPerson")
# Pass the User Object to the MA
# ***********************************************************
"Finished Import as : " + $OperationType + (Get-Date) | Out-File $DebugFile -Append
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment