【发布时间】:2017-02-20 13:05:57
【问题描述】:
我正在尝试从 PowerShell 搜索 Lotus Notes 数据库并获得 "Type Mismatch. (Exception from HResult: 0x80020005 (DISP_E_TYPEMISMATCH)" At line 1: char:1。
设置代码:
$notesSession = New-Object -ComObject Lotus.NotesSession
$notesSession.Initialize()
$notesDb = $notesSession.GetDatabase(..., ...)
我在尝试时遇到错误...
$results = $notesDb.Search("text", $null, 0)
$results = $notesDb.Search("text", $(Get-Date), 0)
$results = $notesDb.Search("text", $([System.DateTime]::Now), 0)
任何人都可以发现错误吗?我认为错误与日期参数有关,因此我进行了多次尝试。
【问题讨论】: