PSZoom - A Powershell module for Zoom's REST API

PSZoom

PSZoom is a Powershell wrapper for Zoom’s REST API. At the moment it includes cmdlets for users, groups and meetings as well as a few for reports. Installing it is as simple as:

Install-Module PSZoom
Import-Module PSZoom

You can also find it at the PowerShell Gallery or on Github. Currently PSZoom uses only JWT for authorization.

Example Code

Get all active users

Get-ZoomUsers -AllPages

Get emails from page 2 of active users

(Get-ZoomUsers -PageSize 300 -pagenumber 2 -status active).Email

Update a user’s name

Update-ZoomUser -UserId askywakler@thejedi.com -FirstName Darth -LastName Vader -ApiKey $ApiKey -ApiSecret $ApiSecret

Update the host key of all user’s that have ‘jedi’ in their email

(Get-ZoomUsers -allpages) | select Email | ? {$_ -like '*jedi*'} | update-zoomuser -hostkey 001138

Find and add users to a single group

Get-ZoomGroups | where-object {$_ -eq 'Dark Side'} | Add-ZoomGroupMembers -email 'dvader@sith.org','dsidious@sith.org'

Please feel free to ask questions, give suggestions, report bugs, etc. Mods, apologies if this was posted in the wrong place.

4 Likes

Hey @maci01, this is great!

thanks for posting and contributing to the Zoom developer community! :slight_smile:

-Tommy

1 Like

This is awesome, thanks for creating this! You just made my life so much easier. :slight_smile: With the COVID19 crisis we recently signed up with a Zoom Education account for 1,000 users. Everything is set up with our managed domain and SSO through Azure but for some reason all of our users (students and staff) were coming in as a Basic license. Unfortunately Zoom’s CSV user update feature isn’t working correctly either.

Using your module I quickly grabbed all of our staff accounts and upgraded them to a Licensed account. Perfect and quick. I was done in minutes and moved on to the next task on my plate.

Nice!

2 Likes

Amazing, happy to hear you were able to get help from the awesome Zoom Developer Community! :slight_smile:

-Tommy

1 Like

Hi,

How can i export all my Zoom users to csv file with including their group membership?

regards,

Roy

Hey @royh,

You could use the List Users API and develop a custom solution.

Otherwise please reach out to support.zoom.us.

Thanks,
Tommy

Hi Tommy,

I’m looking for Powershell script for automation, I’m not willing to do this action from the web API

Regards,

image001.jpg

Hi @royh any script you run within Powershell will need to use the REST API to access this data.

Hi,

When i’m trying to run the “Get-ZoomUsers -AllPages” script, i’m getting the following error:
Get-ZoomUsers : The underlying connection was closed: An unexpected error occurred on a send.
At line:1 char:1

  • Get-ZoomUsers -AllPages
  •   + CategoryInfo          : InvalidOperation: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-ZoomUsers
    
    

Get-ZoomUsers : The underlying connection was closed: An unexpected error occurred on a send.
At C:\Program Files\WindowsPowerShell\Modules\PSZoom\1.1.8\Public\Users\Get-ZoomUsers.ps1:181 char:27

  • … ageCount = (Get-ZoomUsers -PageSize 300 @params -FullApiResponse).pag …
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:slight_smile: [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-ZoomUsers

I don’t understand where my problem.

I would like for some suggestions from the experts.

@royh, I was having the same issue.

I had to add this to the top of my code to force the TLS version.

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

As soon as I did that, it was all good.

1 Like

It works !

Thank you very much !

image001.jpg

I am running a query to pull all users and am getting a 401 unauthorized. I am an admin in Zoom (not the owner). I just pulled the secret and key from Zoom admin console under personal/settings. We have over 800 users and I have tried

#In Powershell it’s explicitly written as a string for the key and secret
$apiKey = ‘
$apiSecret = '

Get-ZoomUsers -AllPages -ApiKey $apiKey -ApiSecret $apiSecret
Get-ZoomUsers : The remote server returned an error: (401) Unauthorized.
At line:1 char:1

  • Get-ZoomUsers -AllPages -ApiKey $apiKey -ApiSecret $apiSecret
  •   + CategoryInfo          : InvalidOperation: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-ZoomUsers
    
    

Get-ZoomUsers : The remote server returned an error: (401) Unauthorized.
At C:\Program Files\WindowsPowerShell\Modules\pszoom\1.1.8\Public\Users\Get-ZoomUsers.ps1:181 char:27

  • … ageCount = (Get-ZoomUsers -PageSize 300 @params -FullApiResponse).pag …
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:slight_smile: [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-ZoomUsers

Separate Instance


Get-ZoomUsers -PageNumber 1 -ApiKey $apiKey -ApiSecret $apiSecret
Get-ZoomUsers : The remote server returned an error: (401) Unauthorized.
At line:1 char:1

  • Get-ZoomUsers -PageNumber 1 -ApiKey $apiKey -ApiSecret $apiSecret
  •   + CategoryInfo          : InvalidOperation: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-ZoomUsers

Hey @tom.brix, and everyone

For issues, please bring this up with @maci01 here:

Thanks,
Tommy