Author Posts

August 24, 2018 at 3:10 pm

I am pulling some logs from Exchange and exporting them to a CSV using powershell and in the export I want to be able to put double quotes around one specific column that tends to have special characters or spaces in it. The column is MessageSubject. The reason I want to do this is because after doing the export there are times when I have a need to delete the messages from a users mailbox for purposes of spam and such. The way it works now is that there are no double quotes around the cells in the MessageSubject column and sometimes the delete fails because the script can't interpret the data in that column due to spaces or special characters.

August 24, 2018 at 5:48 pm

Just select the column, use RegEx to capture the string length in that column and  in you code add it