The script has to go through each session individually and filter out each session based on the provided criteria. Whilst the script is running you can see the percentage complete (based on user numbers, not sessions), the current user that is being processed, the Skype Online session timer, the script runtime and total processed sessions (so far).Īs Get-CSUserSession cmdlet returns all sessions, there is no way to speed up the retrieval by asking just for the sessions we want. \Get-CSSessions.ps1 -DaysToSearch 10 -SessionType Audio -OutputType CSV -CSVSavePath c:\temp\sessions.csvĮnter your credentials for Skype Online when prompted. CSV file to).įor example, if I want to search for audio sessions for the last 10 days from now and output to a CSV I would run. If you are outputting to a CSV file, you also need to specify -CSVSavePath (where to save the. The bare minimum to run the script involves specifying -DaysToSearch (how many days to search back from the current time), -SessionType (All, Audio, Conference, IM or Video), -OutputType (CSV or GridView). Side Note: Teams PSTN calls also appear in the sessions. Each session will contain the User from where the session came from, StartTime (UTC), EndTime (UTC), To/From URI, To/From TelNumber (which is masked), To/From ClientVersion, ReferredBy and DialogID (unique to that session). Once all sessions are retrieved, it will output to a specified CSV file or to GridView. Likewise, if any timeout errors are noticed it will create a new session and carry on from where it left off. If the PowerShell session to Skype Online reaches 45 minutes, it will disconnect, reconnect and carry on from where it left off (if you provide the PSCredential using -Credential it will do this without prompting again). With that list, it will go through each user and retrieve all their sessions that were completed within the set time frame. The default behaviour is to connect to Skype Online and retrieve all Skype-enabled users in Skype Online - this can be hybrid or 100% ‘Pure’ cloud users. This script is based on the Skype Online Connector module (so will need to be installed to run this) and more specifically our old friend Get-CSUserSession cmdlet. #Skype online member search codeI’m sure there might be a more elegant way to code this! If my script is doing something terrible or there is a better way to do it, please let me know. Introducing Get-CSSessionsįirstly I’d like to say outside of a couple oneliner’s I’ve never written in PowerShell before. #Skype online member search how toIt didn’t tick all the boxes but looking at the code did help me with how to deal with expiring sessions and a recursive search of sessions. The closest I came was with Microsoft employee Jason Shave’s excellent CxdCallData. Whilst there are some scripts out there, nothing did what I wanted.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |