Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2314

search-mailbox, Ergebnis loggen

$
0
0

moin,

ist es möglich das Ergebnis von search-mailbox zu loggen (am besten in eine Datei)

so sieht es ohne -force aus.

TargetMailbox    : 
Success          : True
TargetFolder     : 
ResultItemsCount : 0
ResultItemsSize  : 0 B (0 bytes)

das Ergebnis erhalte ich nur wenn ich -force nicht angebe.

$date= (get-date).adddays(-29)
$date = $date.ToShortDateString()

Search-Mailbox -Identity "mymailbox" -SearchQuery "Subject:'xyz' -and received<=$date" -deletecontent -force


Chris


Viewing all articles
Browse latest Browse all 2314


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>