Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
IBM Lotus Domino Notes FIM MIM PowerShell Management Agent Import Script. Supporting blog post is located here https://blog.darrenjrobinson.com/synchronizing-passwords-from-active-directory-to-the-ibmlotus-domino-identity-vault-using-microsoft-identity-manager-part-1/
param (
$Username,
$Password,
$Credentials,
$OperationType,
[bool] $usepagedimport,
$pagesize
)
$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
}
else
{
$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")
$obj.Add("givenName",$user.Properties.givenname[0])
$obj.Add("displayName",$user.Properties.displayname[0])
$obj.Add("mail",$user.Properties.mail[0])
$obj.Add("surname",$user.Properties.sn[0])
# Pass the User Object to the MA
$obj
}
}
# ***********************************************************
"Finished Import as : " + $OperationType + (Get-Date) | Out-File $DebugFile -Append
#endregion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.