我有具体问题。我需要从活动目录中提取域名并将它们与 Lotus Notes 中的员工编号结合起来。我使用 Get-QADUser(来自 quest.com 的快照)获取域名,这没问题,但是如何获取员工编号并将它们组合起来?谢谢
编辑(18.5. 11:56):现在我正在使用这个脚本(由 Christian 发布)并且我想出了如何获取 LN 数据库的名称 - 右键单击 Lotus notes 工作区中的 DB,然后单击应用程序/属性。
# Create LN Object
$DomSession = New-Object -ComObject Lotus.NotesSession
# Initialize LN Object
# You'll be asking for LN password to your id
$DomSession.Initialize()
# Connect to Server, select db and display the name
$DomDatabase = $DomSession.GetDatabase("LN007","IT\HW.nsf")
Write-Host "Database open : " $DomDatabase.Title
# Open specific View (By Serial Number)
$DomView = $DomDatabase.GetView('Serial Number')
Write-Host "View read : " $DomView.Name
# Show number of documents
$DomNumOfDocs = $DomView.AllEntries.Count
Write-Host "Num of Docs : " $DomNumOfDocs
# Get First Document in the View
$DomDoc = $DomView.GetFirstDocument()