Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Out of Office message export in csv file

$
0
0

Hi,

My customer asked to export all users OOO message into csv file they want look at who set message external email address in OOO message.

I have a test where I configured OOO and tried running below cmd-let to export looks csv file does not capture text I am looking for.

Get-Mailbox testUser | Get-MailboxAutoReplyConfiguration | Export-Csv -NoTypeInformation e:\OOO_test.csv

when I open file in excel internalMessage column has only <html> and its wrap text if I tun off wrap text, I can see whole message like below 

"<html>

<body>

<div style=""font-size:13px; font-family:Tahoma"">

<p>Test Out Of Office <a href=""mailto:test@test.com"">test@test.com</a>

</p>

</div>

</body>

</html>

"

If press F2 and copy entire text in that cell and past on empty cell it print exactly what I want.
"Test Out Of Office test@test.com"
I wanted run this script for all users, anyone know how do I get OOO text? my export is wrong or I need to do something in excel to display the correct text?

Viewing all articles
Browse latest Browse all 6937

Trending Articles