Hi
After installing new updates for MS Exchange 2010 and PowerShell 4.0 I've got problems with PS scripts using buil-in
exchange commands.
I wrote interactive script for searching e-mails. Here is a pice of code where I get error after installing PS v4.
....
$SearchContent=Read-Host "Write sentence to find"
Get-Mailbox | Search-Mailbox -SearchQuery "$SearchContent" -TargetMailbox "Discovery Search Mailbox" -TargetFolder "Inner box" -LogOnly -Loglevel Full | Out-Null
....
After installing PowerShell 4.0 I get that bug and report in TargetMailbox is not genereated.
The property keyword isn't supported.
At C:\Administration\Scripts\T-SearchMail.ps1:122 char:1
+ Get-Mailbox | Search-Mailbox -SearchQuery "$SearchContent" -TargetMailbox "Disco ...
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [], ParserException
+ FullyQualifiedErrorId : 35E6C841
Using PowerShell 2.0 everything was ok.
How to solve this problem?
Tomasz
Kind Regards Tomasz