looking for how to export/import O365 room mailbox additionalresponse RRS feed

  • Question

  • Hi All,

    currently I'm working on a migration to O365 and I'm trying to export on-premises room mailbox settings (including additional response) to a CSV file, which I can use later to import these settings back after migration. 

    So far I'm able to collect all data from the room mailbox but when I export this to a CSV, additional response value breaks my CSV file. This happens because this value contains HTML/BODY and lot of new lines in it. The way I'm doing this export is as follow: 

    1. Collecting all settings from mailbox and put this into variable,

    2. For each paramater I'm interested in, I'm creating it's own variable (e.g. $bookinpolicy = room.BookInPolocy)

    3. Each created variable putting in a global variable like $export

    4. Doing export variable $Export variable to CSV - Append File  (file is created earlier) (   $Export | Out-File $MBXSettingsFile -Append)

    As mentioned before, I'm not able to export additionalresponse into a csv colom correctly (it messes up a delimeter in this CSV ";") . I want to use this exported CSV  and set all settings back on the mailbox. It would be great if someone has a golden tip, how to export this value. Thank you in advance. 

    • Moved by Bill_Stewart Wednesday, May 9, 2018 2:46 PM This is not "scripts on demand"
    Monday, March 19, 2018 11:53 AM

All replies

  • For how to do this with O365 post in O365 community forms linked on your portl Admin page.

    Also look in the Gallery linked below for examples of syncing online and local mailboxes.

    Please carefully review the following links to set your expectation for posting in  technical forums.


    Script Gallery. 

    Script Center

    Learn PowerShell  


    From a Bill Stewart summary of useful forum links:




    Monday, March 19, 2018 6:09 PM
  • Your answer is useless. If you have personal issues please don't put your frustration on these forums. Not only here but on plenty other posts you are being a smartass. 

    My question is a PS related and I'm curious what approach I can take to accomplish my goal. If I'm not supposed to post my PS related question in here, like others, then what's a meaning of this forum? After all, we are not all born with "16">PhD<</g>> like yourself! 

    • Edited by Nopke Tuesday, March 20, 2018 8:29 AM
    Tuesday, March 20, 2018 8:25 AM
  • The forum is not for free consulting.  You are asking for a larger number of things that would best be asked in the O365 forums.

    Most of your questions can also be answered by learning basic PwoerShell scripting.

    We cannot and will not design a solution for you. 

    Also your request is quite vague. What do you mean by "combining" variables?  Are you asking how to add them up?  Maybe you mean you want to make a custom object.

    Without some basic technical learning of scripting you will not be able to ask a good question.

    Start small. Learn some basic PowerShell then spend some time learning how to use PowerShell with O365. 

    If you even learn how to use help you will see that the results from a "Get-Mailbox" is returned as an object.

    $mb = Get-Mailbox userid

    That is basic PwoerShell.

    Without some basic technical knowledge you will be very lost.

    Start here: Learn PowerShell  


    Tuesday, March 20, 2018 8:35 AM
  • I'm not asking to re-write my script or anything like that. I'm asking for assistense on how I can export a "special" value containing complex format. This is my problem;

    When I collect data of a mailbox (it's now mailbox, but I'm sure this is applicable to much more scenarios) , I sort all info I need into strings (e.g. name, email etc.). This is straight forward nothing hard.

    In the meanwhile I use array which is filled with these values and use them for export to CSV. This looks like this:

    $allObjects = @()

    $Stats = New-Object -TypeName PSObject

    $Stats | Add-Member -MemberType NoteProperty -Name Alias -Value $alias

    $Stats | Add-Member -MemberType NoteProperty -Name Email -Value $mail

    $Stats | Add-Member -MemberType NoteProperty -Name Additionalresponse -Value $Additionalresponse

    $allobjects += $Stats

    $allObjects | Export-Csv path .... -nofileinformation -delimeter ";"

    The problem I have is with the value of paramater "additionalresponse". This value is of type string, BUT a user has ability to create a custom response with (html) fancy formating layout. When I hit this kind of a user, my export get messed up.

    The export always contains like :

    "<!DOCTYPE html>

    <html lang="en-US">

    <body> ; "

    And the seperation (delimeter ";") isn't in place anymore. This is importand because I need a CSV with seperated values so I can reuse it later on.

    I'm trying to get this value somehow on it's place but I didn't figure it out yet how. so export can look like this

    name; email;<!DOCTYPE html> <html lang="en-US"> <body>;alias;etc

    I need to contain every value on it's own colom... so far using semicolom seperation.  

    • Edited by Nopke Thursday, March 22, 2018 4:38 PM
    Thursday, March 22, 2018 4:34 PM
  • Try this:

    $Stats | Add-Member -MemberType NoteProperty -Name Additionalresponse -Value ($Additionalresponse | Out-String)


    Thursday, March 22, 2018 8:11 PM