Thursday, August 25, 2016

Powershell: Get a list of members of Persistent Chat Room

To get information of specific Persistent Chat room, use following command
Get-CsPersistentChatRoom -Identity <Room Name>

Obviously, to get list of members of chat room, we will use following command
Get-CsPersistentChatRoom -Identity <Room Name> | select-object members

However, you will not get full list of members using above command.

To get full list of members of Persistent Chat, Use following PowerShell command

foreach ($member in (Get-CsPersistentChatRoom -Identity <Room Name> | Select-Object members).members) {$member}


----------------------------------------------------------END---------------------------------------------------------------

2 comments:

  1. I wanted to tell you thank you for this PS command. I wanted to gather the results and export them to a csv but when I tried to add the Export-csv to the command it broke. So I worked with my co-worker and we were able to use the Out-File. We were able to get the file with the information that we needed. Here is the command we used.
    (Get-CsPersistentChatRoom -Identity "Contoso.com\Chat Room name" | Select-Object members).members | Out-File C:\What ever you want to name

    ReplyDelete