正如您在下面看到的,將提取文件夾內所有.msg文件的內容。但是,我只能在輸出content.txt中看到1個.msg內容,而不是所有的.msg文件。我如何循環命令並添加到相同的.txt文件?將輸出數據添加到1個文本文件
$output_file3 = ‘c:\outlook_files\content.txt’
# Search messages
Get-ChildItem "c:\outlook_files\msg\" -Filter *.msg | Foreach-Object {
# Read current message content
$content = Get-Content $_.FullName >$output_file3
}
'獲取幫助'about_Redirection'-ShowWindow' – JosefZ