我有特定的问题。我需要从 Activity 目录中提取域名,并将其与Lotus Notes中的员工编号结合在一起。我使用Get-QADUser(来自quest.com的snapin)获取域名,这没问题,但是如何获取员工编号并将其组合?谢谢

编辑(18.5。11:5​​6):现在,我使用此脚本(由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()

最佳答案

您可以使用com object从Lotus Notes检索数据。

建议链接:

http://davidmoravec.blogspot.it/2008/08/retrieve-data-from-lotus-notes-with.html

Lotus Notes comobject

关于powershell - Powershell和Lotus Notes-如何使用员工编号提取用户名?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/10648686/

10-11 08:22