locked
Is there a way how to capture result from Move-CsUser? RRS feed

  • Question

  • Hi, is there a way how to capture result from Move-CsUser?

    I mean message:
    "Results from this operation can be found at "C:\Users\user\AppData\Local\Temp\6\MoveResults-
    111a11aa-a11a-1111-aa11-111111111111.csv"."

    Friday, August 9, 2019 2:07 PM

All replies

  • Use a variable to catch the output:

    $result = Move-CsUser <REST OF THE COMMAND>
    Write-Output $result

    Friday, August 9, 2019 2:10 PM
  • I am getting nothing. Maybe that is because I am moving a user from/to Skype for Business Online.

    I have even tried Transcript, without success. Am I doing something wrong?

    On MS Docs there is this:

    Outputs

    None

    The Move-CsUser cmdlet does not return a value or object. Instead, the cmdlet modifies instances of the Microsoft.Rtc.Management.ADConnect.Schema.ADUser object.

    • Edited by Mr Stoural Friday, August 9, 2019 3:36 PM
    Friday, August 9, 2019 3:33 PM
  • Hi Mr Stoural,

    Do you get any results in the “MoveResults-xxx.csv” file?

    According your description, I’m not quite sure what do you want to capture in the PowerShell, the csv file contents?

    I think it should be an inside process to generate the result csv file. I’m afraid it is different to directly display the csv file contents in PowerShell.


    Best Regards,
    Shaw Lu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    • Proposed as answer by Shaw_Lu Wednesday, August 14, 2019 8:51 AM
    Monday, August 12, 2019 7:53 AM
  • Hi Shaw Lu,
    I am trying to capture the message which Move-CsUser generates to variable.

    I like to automate checking the result file, ie. checking the CSV file itself. But I am failing to get the message "Results from this operation can be found at "C:\Users\user\AppData\Local\Temp\6\MoveResults-
    111a11aa-a11a-1111-aa11-111111111111.csv"." to variable.

    Monday, August 12, 2019 10:56 AM
  • Hi Mr Stoural,

    In my research, I didn’t find a way to automatically display the content of the result csv.

    I think there isn't a simple way, we cannot get the inside process about how the commands run.


    Best Regards,
    Shaw Lu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Wednesday, August 14, 2019 8:42 AM
  • Hi,

    Do you have any further issue on this topic?


    Best Regards,
    Shaw Lu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Friday, August 16, 2019 8:46 AM
  • I am checking the status of this case. Please let us know if you would like further assistance.

    Meanwhile, if the reply is helpful to you, please try to mark it as an answer to close the thread, it will help others who encounter the same issue and read this thread.

    Thank you for your understanding and patience!


    Best Regards,
    Shaw Lu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Tuesday, August 20, 2019 7:33 AM
  • Hi,

    yes, I am still looking for way how to capture the return message.

    Thursday, August 22, 2019 11:57 AM
  • Hi,

    I don't think it could get it directly, maybe you could find a way to read the content from the csv file by "get-content". 


    Best Regards,
    Shaw Lu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Tuesday, August 27, 2019 9:17 AM