r/PowerShell•
maci01

PSZoom - A Zoom API wrapper for Powershell

Over the last couple of months during some downtime I've been writing a wrapper for the Zoom Meetings API. You can take a look at the source here: github.com/JosephMcEvoy/PSZoom or start using it with
install-module PSZoom. Any and all feedback is welcome. I realize that this probably doesn't help very many of you but hopefully some of you will find it useful!

Posted Aug 19, 2019, 3:10 PM UTC

121
xlrod•

I was looking into this to query a couple of things, but sadly don't have access to the admin API key, had to go the Selenium route to get what I was looking for. Thanks for sharing!

1
James112231•

Not having much luck.

S C:\Windows\system32> Get-ZoomUsers -Status active -PageSize 50

Get-ZoomUsers : Cannot send a content-body with this verb-type.

At line:1 char:1

+ Get-ZoomUsers -Status active -PageSize 50

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : InvalidOperation: (:) [Write-Error], WriteErrorException

+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-ZoomUsers

1
maci01OP•

I believe I fixed it. Seemed to happen intermittently. I was sending a body with the get request but should have been part of the URI/query.

2
maci01OP•

Hmm not sure. When did you install the module? Maybe I messed it up for that version. It's working for me at the moment. Try update-module PSZoom - force.
Edit: I am seeing this. Let me see what's up.

1
djkouza•

Installed and am getting errors on any command. Maybe I missed something simple?

​

Get-ZoomUser : The underlying connection was closed: An unexpected error occurred on a send.

At C:\PowerShell\testing\CIW_PSZoom.ps1:8 char:1

+ Get-ZoomUser [email protected]

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : InvalidOperation: (:) [Write-Error], WriteErrorException

+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-ZoomUser

1
maci01OP•

I am not familiar with that error. Maybe this is relevant to you: https://docs.microsoft.com/en-us/archive/blogs/webdav_101/invoke-restmethod-the-underlying-connection-was-closed-an-unexpected-error-occurred-on-a-send-while-using-powershell . The main bit being to add the following at the bottom of your script:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Zoom uses TLS 1.2. You could also try updating Powershell. I am on Powershell 5.1.17763.592 and also PSCore (6.2.3).

2
djkouza•

Figured it out.

Had to add this to the script:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Details here:

https://docs.microsoft.com/en-us/archive/blogs/webdav_101/invoke-restmethod-the-underlying-connection-was-closed-an-unexpected-error-occurred-on-a-send-while-using-powershell

1
maci01OP•

Nice! Didn't see your second reply before I replied.
Let me know what you think of the module or if you have any suggestions/issues.

2
djkouza•

Yes, and thank you for the module as well as the fast replies here!

1