Coder Social home page Coder Social logo

josephmcevoy / pszoom Goto Github PK

View Code? Open in Web Editor NEW
80.0 8.0 26.0 2.68 MB

A PowerShell wrapper to interface with Zoom's API (Zoom Video Communications).

License: GNU General Public License v3.0

PowerShell 100.00%
cmdlet powershell-wrapper zoom api powershell powershell-module

pszoom's Introduction

Build status

PSZoom

PSZoom is a Powershell wrapper to interface with Zoom's API (Zoom Video Communications). The module wraps many API calls from Zoom's API v2 documentation. You can find Zoom's documentation at https://marketplace.zoom.us/docs/api-reference/zoom-api. PSZoom is not an official module.

Cmdlets are named with approved Powershell verbs but keeping to as close to Zoom's API reference as possible. For example, Zoom has two API calls that they named "List User Assistants" and "Update Zoom Meeting". In PSZoom they are named Get-ZoomUserAssistants and Update-ZoomMeeting, respectively. In general, each cmdlet has associated help which includes a link (found under .LINK) to the API call that it is wrapping.

Zoom has a rate limit that varies depending on your account and the type of request. If you're making too many requests, the cmdlet will automatically retry after one second.

Getting started

Using PowershellGallery

Install-Module PSZoom
Import-Module PSZoom

Using Git

Clone the repository.

git clone "https://github.com/JosephMcEvoy/PSZoom.git"

Place directory into a module directory (e.g. $env:USERPROFILE\Documents\WindowsPowerShell\Modules).

Move-Item -path ".\pszoom\pszoom" -Destination "$env:USERPROFILE\Documents\WindowsPowerShell\Modules"

Import the module.

Import-Module PSZoom

Using your API key and API secret

All commands require a Client ID and Client Secret. As of PSZoom 2.0, PSZoom only supports Server-to-Server OAuth authorization. You can generate the Server-to-Server OAuth key/secret from https://marketplace.zoom.us/develop/create, then click on 'Create' under Server-to-Server OAuth.

Example script

import-module PSZoom
Connect-PSZoom -AccountID 'account_id' -ClientID 'client_id' -ClientSecret 'secret'
Get-ZoomMeeting 123456789

Available functions

Use get-help for more information about each function.

Cloud Recordings

Get-ZoomAccountRecordings
Get-ZoomAccountRecordings
Get-ZoomMeetingCloudRecordings
Remove-ZoomMeetingRecordingFile
Remove-ZoomMeetingRecordings
Show-ZoomRecordings

Groups

Add-ZoomGroupMember
Get-ZoomGroup
Get-ZoomGroupLockSettings
Get-ZoomGroupMembers
Get-ZoomGroups
Get-ZoomGroupSettings
New-ZoomGroup
Remove-ZoomGroup
Remove-ZoomGroupMembers
Update-ZoomGroup
Update-ZoomGroupLockSettings
Update-ZoomGroupSettings

Meetings

Add-ZoomRegistrant
Get-ZoomEndedMeetingInstances
Get-ZoomMeeting
Get-ZoomMeetingCloudRecordings
Get-ZoomMeetingInvitation
Get-ZoomMeetingPoll
Get-ZoomMeetingPolls
Get-ZoomMeetingRegistrants
Get-ZoomMeetingsFromUser
Get-ZoomPastMeetingDetails
Get-ZoomPastMeetingParticipants
Get-ZoomPastMeetingParticipantsMetrics
Get-ZoomPersonalMeetingRoomName
New-ZoomMeeting
New-ZoomMeetingPoll
New-ZoomMeetingPollQuestion
Remove-ZoomMeeting
Remove-ZoomMeetingPoll
Update-MeetingStatus
Update-ZoomMeeting
Update-ZoomMeetingLiveStream
Update-ZoomMeetingLiveStream
Update-ZoomMeetingLiveStreamStatus
Update-ZoomMeetingPoll
Update-ZoomMeetingRegistrantStatus
Update-ZoomMeetingRegistrationQuestions
Update-ZoomMeetingStatus

Phones

Get-ZoomPhoneCallingPlan
Get-ZoomPhoneNumber
Get-ZoomPhoneProvisioingTemplate

Common Area Phones

Add-ZoomPhoneCommonAreaCallingPlan
Add-ZoomPhoneCommonAreaNumber
Get-ZoomPhoneCommonArea
Get-ZoomPhoneCommonAreaSettings
New-ZoomPhoneCommonArea
Remove-ZoomPhoneCommonArea
Remove-ZoomPhoneCommonAreaCallingPlan
Remove-ZoomPhoneCommonAreaNumber
Update-ZoomPhoneCommonArea

Desk Phones

Add-ZoomPhoneDeviceAssignee
Get-ZoomPhoneDevice
Invoke-ZoomPhoneDeviceReboot
New-ZoomPhoneDevice
Remove-ZoomPhoneDevice
Remove-ZoomPhoneDeviceAssignee
Update-ZoomPhoneDevice
Update-ZoomPhoneDeviceProvisioningTemplate

User Phones

Add-ZoomPhoneUserCallingPlan
Add-ZoomPhoneUserNumber
Get-ZoomPhoneUser
Get-ZoomPhoneUserSettings
New-ZoomPhoneUser
Remove-ZoomPhoneUserCallingPlan
Remove-ZoomPhoneUserNumber
Update-ZoomPhoneUser
Update-ZoomPhoneUserCallingPlan
Update-ZoomPhoneUserSettings

Phone Sites

Get-ZoomPhoneSite
Get-ZoomPhoneSettingTemplate
Get-ZoomPhoneSiteEmergencyAddress

Reports

Get-ZoomActiveInactiveHostReports
Get-ZoomDailyUsageReport
Get-ZoomMeetingParticipantsReport
Get-ZoomRegistrationQuestions
Get-ZoomTelephoneReports
Get-ZoomWebinarDetailsReport
Get-ZoomWebinarParticipantsReport

Rooms

Get-ZoomRooms
Get-ZoomRoomsDashboard
Get-ZoomRoomDevices
Get-ZoomRoomLocations
Disconnect-ZoomRoomMeeting
New-ZoomRoomInvite
New-ZoomRoomMeeting
Remove-ZoomRoomMeeting
Restart-ZoomRoom
Remove-ZoomRoomMeeting
Stop-ZoomRoomMeeting

Users

Add-ZoomUserAssistants
Get-ZoomUser
Get-ZoomUserEmailStatus
Get-ZoomUserPermissions
Get-ZoomUserSchedulers
Get-ZoomUserSettings
Get-ZoomUserToken
New-ZoomUser
Remove-ZoomSpecificUserAssistant
Remove-ZoomSpecificUserScheduler
Remove-ZoomUser
Remove-ZoomUserAssistants
Remove-ZoomUserSchedulers
Revoke-ZoomUserSsoToken
Update-ZoomProfilePicture
Update-ZoomUser
Update-ZoomUserEmail
Update-ZoomUserpassword
Update-ZoomUserSettings
Update-ZoomUserStatus

Webinars

Get-ZoomWebinar
Get-ZoomWebinarsFromUser
Get-ZoomWebinarPanelists

Utility

Invoke-ZoomRetMethod
Join-ZoomPages
New-ZoomApiToken

Contributing

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/FeatureName)
  3. Commit your Changes (git commit -m 'Add some Feature')
  4. Push to the Branch (git push origin feature/FeatureName)
  5. Open a Pull Request

pszoom's People

Contributors

andrew-hoggins avatar bclovelace avatar busted1942 avatar coopzz avatar damageddingo avatar dpinse avatar i-fgsd avatar idahovandal avatar jcspencer avatar jjpaq avatar josephmcevoy avatar malpractis avatar mkht avatar noaboa97 avatar skseffertz avatar tnjkannan avatar victormaso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pszoom's Issues

Change Phone User’s Extension Number

Hey Joseph,
I am currently using your new 2.0 script with Powershell and trying to automate zoom phone user creation and updates based on Active Directory attributes that I pass through the scripts provided. I noticed that you have a few Get-ZoomPhonexxx.ps1 scripts but there are no Update-ZoomPhonexxx.ps1 scripts to update Zoom Phone User settings. I am currently looking to update the extension number on the zoom phone side based on the telephoneNumber attribute in AD for each user but didn’t see any parameter for this in any of the scripts provided. Any insight would be much appreciated. Thanks

Update-ZoomUserEmail error: (400) Invalid request.

Hello!)
I can't change email accounts (all other commands for changing account data are working properly).
Tried the following commands:

$Global:ZoomApiKey     = "***********"  
$Global:ZoomApiSecret = "***********"

Update-ZoomUserEmail -UserId "[email protected]" -Email "[email protected]"

or

$Global:ZoomApiKey     = "***********"
$Global:ZoomApiSecret = "***********"

Update-ZoomUserEmail -UserId "glp43khBQzyOXZUxRj2lzA" -Email "[email protected]"

Ошибка:

Invoke-ZoomRestMethod: The remote server returned an error: (400) Invalid request.

Thank you in advance for your time :)

API Token expires when using pipelines to perform time-consuming operations.

The current implementation of PSZoom creates an API token with a 30-second expiration time in the Begin block and uses it in the Process block.

This seems to be a reasonable implementation, but when using a pipeline to process a large number of objects, the token expires without being processed within 30 seconds and a 401 error occurs.
Since my organization deals with a large number of Zoom users, we have actually faced this problem.

Let's come up with a solution.
I propose three plans.

Plan 1: Create a new token every time you perform an API request.

This is not very smart, as it will generate a lot of tokens, but it is a simple way.
This will not be difficult to implement since we only need to move the process of creating the token from the Begin block to the Process block.

Plan 2: Check the token expiration date before executing the API request, and update the token if it has expired.

Record the timestamp when the token was generated and compare it with the current timestamp before executing the request.
I expect the processing time to be faster than generating the token every time.

Plan 3: Extend the token expiration date.

The current expiration time is 30 seconds, but we will extend it.
This is the easiest to implement, but not the most essential solution.
Because it is impossible to predict the processing time in advance.

@JosephMcEvoy , Which plan do you think is better?
Whichever plan the owner chooses (or rejects), I will follow it. I can also do the implementation and send a pull request.

(Sorry for the machine translated English. My native language is not English.)

Build and deploy failing

Build and deploy failing. When committing to github using !deploy in commit message, the build fails to push to PowerShell Gallery. I believe this is due to automatic tags. The cmdlet names are automatically converted to tags, whose number exceeds the limit enforced by NuGet. The solution is to use -SkipAutomaticTags when using Publish-Module, a feature that is part of PowerShell 7.

Restart-ZoomRoom 401 error

Getting a 401 Error when trying to use the Restart-ZoomRoom command:

Restart-ZoomRoom -RoomId cb521IyMSUCrgNsnCfUhKQ
Invoke-ZoomRestMethod : The remote server returned an error: (401) Unauthorized.
At C:\Program Files\WindowsPowerShell\Modules\PSZoom\2.0.2.0\Public\Rooms\Restart-ZoomRoom.ps1:68 char:25
+ ... $response = Invoke-ZoomRestMethod -Uri $request.Uri -Body $RequestBod ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : AuthenticationError: (https://api.zoo...CfUhKQ/zrclient:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : 401,Invoke-ZoomRestMethod

Get Sub Account Users

Getting an error when trying to get a zoom user info from a Sub Account. I've attached a screenshot with my App scope and it has View/Manage Sub Account user info.
I'm running "Get-ZoomUser -UserId " in PowerShell. Am I missing something or doing something wrong?
Thanks so much for any help / feedback! :)
ZoomAppScopes

409 conflict yet user isn't listed

I'm trying to automate our user creation. For some user accounts it works just fine, but for some users, I'm consistently getting an error they can't be created:

` Invoke-ZoomRestMethod : The remote server returned an error: (409) Conflict.
At C:\Program Files\WindowsPowerShell\Modules\pszoom\1.12.0.0\Public\Users\New-ZoomUser.ps1:166 char:25

  • ... $response = Invoke-ZoomRestMethod -Uri $request.Uri -Headers ([ref]$H ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ResourceExists: (https://api.zoom.us/v2/users:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : 409,Invoke-ZoomRestMethod
      `

Looking for the user in the list of users on the web portal doesn't show them at all. How can I find out what is preventing the user creation? (I even tried a remove-zoomuser action on the account in question, and I get a 404 not found error).

Thank you.

[Proposal] New-ZoomApiToken

Hi @JosephMcEvoy

I'm very impressed with this project!
I'm currently working on the management of Zoom in my org, and your module has helped me a lot. 👍

So, my proposal is to add a cmdlet to generate a Zoom API token to the module.
It doesn't essentially execute the API, but it could be useful when we want to directly execute the Zoom API for testing purposes.
It's not so difficult to implement because it only cuts out a part of the process New-ZoomHeader is currently doing in the module.
I will open a PR for you to consider.

Thank you,

Issue with adding user to IM Group

I previously wrote some code to add the user to the IM group. It was working fine for some time, but it stopped working and I'm not sure what's changed?

My code is as follows:

function Set-StaffZoomIMGroup($UserId, $UserEmail)
{
    $groupId = 'IMGroupIDGoesHere'
    $members = @(@{id = "$UserId"})
    $request = [System.UriBuilder]"https://api.zoom.us/v2/im/groups/$groupId/members"
    $requestBody = @{
    members = $members
    }
    $requestBody = $requestBody | ConvertTo-Json
    
    Invoke-ZoomRestMethod -Uri $request.Uri -Body $requestBody -Method POST -ApiKey $($ZoomApiKey) -ApiSecret $($ZoomApiKey)
}

The error I'm getting is
The property 'Key' cannot be found on this object. Verify that the property exists.
At C:\Powershell\ZoomManualStaff.ps1:178 char:21

  • ... if ($Parameters.ContainsKey($Obj.$Key) -or -not [string]::IsN ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
    • FullyQualifiedErrorId : PropertyNotFoundStrict

That line is referenced in the "Invoke-ZoomRestMethod" function.

Any tips?

401 Unauthorized

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

The remote server returned an error: (401) Unauthorized.

I am receiving this error for all cmdlets despite using the same API Key and API Secret that are working for another app from marketplace.zoom.us/develop/apps/app/credentials. The API Call Logs at marketplace.zoom.us/user/logs reflect the working app but not calls from PSZoom. This occurs for the values set globally, as parameters to the cmdlet, and interactively. I have tested this on both 1.1.83 and 1.11.0.0. Any suggestions?

PS C:\Windows\system32> Get-ZoomMeeting -MeetingId ########### -ApiKey 'verified key' -ApiSecret 'verified secret' -Verbose
VERBOSE: Retrieving Zoom API Credentials.
VERBOSE: Retrieved API Credentials.
VERBOSE: Generating JWT
VERBOSE: Generating Headers
VERBOSE: GET https://api.zoom.us/v2/meetings/########### with 0-byte payload
Get-ZoomMeeting : The remote server returned an error: (401) Unauthorized.
At line:1 char:1
+ Get-ZoomMeeting -MeetingId ########### -ApiKey 'verified key ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-ZoomMeeting

Cloud Recordings

The Zoom API has endpoints to manage Cloud Recordings. Can those be added as functions for this module?

Random 404 error when deleting recording file

Hi there and thanks again for this useful tool

I am using PSZoom to download and delete Zoom cloud recordings, however out of about 2,000 successfully deleted recordings, 38, which show "completed" status, cannot be deleted no matter what I try, PSZoom will throw an exceptions such as

Remove-ZoomMeetingRecordingFile : The remote server returned an error: (404) Not Found.
At C:\Temp\zoom\zoomBackup.ps1:83 char:9
+         Remove-ZoomMeetingRecordingFile -MeetingId $zoomItem.meeting_ ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Remove-ZoomMeetingRecordingFile

Running script within VSCode, I could help debugging data, if required

Remove-Zoomuser not working after ZOOM did changes on backend

I had the PSZoom script working just fine, some commands still work just fine but the Remove-ZoomUser stopped working.

The error I get is:

Remove-ZoomUser : The remote server returned an error: (400) Bad Request.
At line:1 char:1
+ Remove-ZoomUser -UserId [email protected]
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Remove-ZoomUser

Get-ZoomUsers

Hey Joseph,

I've just updated to v2 and setup an OAuth App with full perms. Everything seems to work fine for most commands, however for Get-ZoomUsers I'm getting a lot of "Response status code does not indicate success: 401 (). Invalid access token.". Which is resulting in significantly less users in the variable, approx 12,000 returned vs approx 60,000.

I'm assuming this is just a Zoom API limitation, but thought it might be worth asking you what you thought as well.

Cheers,
Mal

Adding POST commands

Recently came across this and have added things related to phone, mostly call queues, to get/list all call queues and get info on specific call queues (used the Get-ZoomPhoneSite as a template). My question is when modifying it some more to possible add members to the queue it seems the POST method is not allowed

Invoke-ZoomRestMethod : The remote server returned an error: (405) Method Not Allowed. Request method 'POST' not supported

I am not sure how to go much farther int othe Invoke-ZoomRestMethod file as it seems POST is supported within there, just not actually working.

Example of the code i am working with

    process {
        foreach ($email in $user) {
            $request = [System.UriBuilder]"https://api.zoom.us/v2/phone/call_queues/$id/members"

            $MyJsonHashTable = @{
                "members" = @{
                  "users" = @{
                    "email" = "$email"
                  }
                }
              }

              $body = $MyJsonHashTable | ConvertTo-Json

            $response = Invoke-ZoomRestMethod -Uri $request.Uri -Headers ([ref]$Headers) -Method Post -ApiKey $ApiKey -ApiSecret $ApiSecret -Body $Body

            Write-Output $response
        }
    }

So i guess is it possible/what needs to be modified to allow POST to work?

Issue with Invoke-restmethod

I really like these wrappers, thank you for writing them.

When I do a simple get-zoomuser (probably all commands, but I'm testing with that one.) It hits the Invoke-ZoomRestMethod.ps1 and fails at line 149 where it calls Invoke-restmethod with the error

You cannot call a method on a null-valued expression.

and falls into the catch block. I have this exact script working on a different computer (simply copy/paste since it's 4 lines, including the import) so I'm not sure why this one isn't working.

Clearly @params has a null in there somewhere, but I'm over my head trying to figure it out.

Additional parameter for Remove-ZoomUser

The available parameters for CMDlet Remove-ZoomUser detailed in Get-Help, does not include -TransferWhiteboard

SYNTAX
Remove-ZoomUser [-UserId] <String[]> [-Action ] [-TransferEmail ] [-TransferMeeting] [-TransferWebinar] [-TransferRecording] [-ApiKey ] [-ApiSecret ] [-Passthru] [-WhatIf]
[-Confirm] []

This parameter is available in Zoom's API; https://marketplace.zoom.us/docs/api-reference/zoom-api/methods#operation/userDelete

Could you add it as an additional feature to the CMDlet?

Cant install via Install-Module

Hello

Install-Module PSZoom cant install ;(
Windows 2016 \ PSVersion 5.1.14393.3053

PS C:\Users\adm-user\Downloads> Install-Module PSZoom

WARNING: Source Location 'https://www.powershellgallery.com/api/v2/package/PSZoom/1.1.0' is not valid.
PackageManagement\Install-Package : Package 'PSZoom' failed to download.
At C:\Program Files (x86)\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1772 char:21

  • ... $null = PackageManagement\Install-Package @PSBoundParameters
  •                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ResourceUnavailable: (C:\Users\adm-us...om\PSZoom.nupkg:String) [Install-Package], Exception
    • FullyQualifiedErrorId : PackageFailedInstallOrDownload,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

Download zoom recordings?

Thank you so much for this awesome package!

Have you explored downloading recordings to a file? This would be a HUGE use to so many, and open up lots of possibilities. That seems to be the only Recording method missing.

Update ReadMe

Add the 2 new commands to the README file.

  • Get-DashboardZoomRooms
  • Get-ZoomRoomDevices

Problem with user-update in another language

Hello!)
user-update works fine if you pass names in English to the parameters (-FirstName and -LastName), but for the Russian language (which I need) this does not work. The script is executed successfully, but in the end the user has characters instead of a name: ?????

Example request:
Update-ZoomUser -UserId '[email protected]' -FirstName 'Александр' -LastName 'ded'

user

I could not solve this problem on my own, I ask for your help

Zoom Phone

Thanks a lot for creating this. Is it possible to add a script like the Get-ZoomUser script for Zoom Phone user settings?

Get-ZoomMeetingsFromuser getting inaccurate times in object "duration".

Information coming from Zoom Reports and Zoom API is not the same as the command output in Powershell.
Looks to me that the numbers are somehow rounded (maybe?) not sure, but all numbers are ending either on 5 or 0 (example 5,10,25,30, 45, etc)

Here are some pics to see if that helps identify the issue.

Awesome work with this module by the way! Thanks for all your hard work.
getzoomeetingsfromuser11

getzoomeetingsfromuser22

Feature request

I've noticed that if the user does not exist in zoom, the return is a 404 which is then just dumped to the output. It would be nice to have either a "User not found" message or just no return at all.

Get Zoom Room Locations.

I'm not sure what a good solution is to this but I need to get the hierarchy for a given room.

Zoom provides this API that get all locations with the parent location id so you can crawl up the chain or you can provide a parent ID and get just the one item returned.

My solution is this..

$ZoomRoomLocations = Get-ZoomRoomLocations -page_size 300

function Get-SingleZoomRoomLocation {
    [CmdletBinding()]
    param (
        [String]$location_id,
        [Array]$Locations
    )
    
    begin {
        if ($Locations) {
            
        }
        Else{
            $Locations = Get-ZoomRoomLocations -PageSize 300
        }
    }
    
    process {

        $FloorObj =  $Locations | Where { $_.id -like $location_id}
        $CampusObj = $Locations | Where { $_.id -like $FloorObj.parent_location_id}
        $CityObj = $Locations | Where { $_.id -like $CampusObj.parent_location_id}
        $StateObj = $Locations | Where { $_.id -like $CityObj.parent_location_id}
        $CountryObj = $Locations | Where { $_.id -like $StateObj.parent_location_id}

        $hierarchy = @{
            Floor = $FloorObj.name
            Campus = $CampusObj.name
            City = $CityObj.name
            State = $StateObj.name
            Country = $CountryObj.name
        }

    }
    
    end {
        $hierarchy
    }
}

This uses Get-ZoomRoomLocations which is a normal API call, and then pass that into the function above to spit out the floor,campus,city,state,country for the given (room).location_id

I gave it a param to accept the input from Get-ZoomRoomLocations because this will be used in a loop to build a ZoomRoom Object that contains all information for a zoom room (concat of each function in PSZoom that will be passed to a CMDB for us.

I'm sure there is a better way of doing this to have it included as a function of your module but i don't know what that looks like.

Unfortunately Get-ZoomRoomLocations only takes a parent_location_id so i can't include it else where as you need to start with a room ID and then you can crawl up the parent_location_id's to get the full list.

Zoom bug will return null recording elements, when recording size = 0

There's a bug in Zoom, probably due to the recent overwhelming load on their infrastructure, that leads to unpredictable results. Basically a Zoom bug that will fool PSZoom.

Particularly, I have manually trashed some videos from zoom.us website, and then restored them from trash, however the recordings now are back in the recordings list, with size = 0.
Nice, isn't it?

Now, when accessing this bugged recordings within PSZoom, null items are unexpectedly returned.

For instance:

# Get all Zoom accounts
$ZoomAccounts = Get-ZoomUsers

 # Loop all users
foreach ($userAccount in $ZoomAccounts) {
     $ZoomRecordingsList = Get-ZoomRecordings -UserId $userAccount.email  -From $rangeFrom -To $rangeTo | select meetings 
     $ZoomRecordingsObject = $ZoomRecordingsList.psobject.properties.value.recording_files

     # loop recordings for current user
     foreach ($item in $ZoomRecordingsObject) {
        # $item is null 
     }
}

Get-ZoomRoomDevices

Get-ZoomRoomDevices is missing also.


<#

.SYNOPSIS
Retrieve the ID, Room Name, Device Type, App Version, App Target Version Device System, Status.

.DESCRIPTION
Retrieve the ID, Room Name, Device Type, App Version, App Target Version Device System, Status.

.PARAMETER RoomID
The Unique Identifier of the zoom room. This can be retrived from (List-ZoomRooms).id

.PARAMETER ApiKey
The Api Key.

.PARAMETER ApiSecret
The Api Secret.

.OUTPUTS
[
    {
        "id":  "3923ZF49-E16E-48C5-8E3D-247406D7F059",
        "room_name":  "My Zoom Room1",
        "device_type":  "Controller",
        "app_version":  "5.1.2 (112.0821)",
        "device_system":  "iPad 13.6.1",
        "status":  "Offline"
    },
    {
        "id":  "o-rZ1K-hTeCpaL7mJN9Ngg-0",
        "room_name":  "My Zoom Room1",
        "device_type":  "Zoom Rooms Computer",      
        "app_version":  "5.1.1 (1624.0806)",        
        "app_target_version":  "5.1.2 (1697.0821)", 
        "device_system":  "Win 10",
        "status":  "Offline"
    }
]

.LINK
https://marketplace.zoom.us/docs/api-reference/zoom-api/rooms/listzrdevices

.EXAMPLE
List-ZoomRoomDevices -RoomID 'V5-1Nno-Sf-gtHn_k-GaRw'
#>

function Get-ZoomRoomDevices {
    [CmdletBinding()]
    param (
        # The status of the Zoom Room
        [Parameter(Mandatory = $True)]
        [string]$RoomID,

        [ValidateNotNullOrEmpty()]
        [string]$ApiKey,

        [ValidateNotNullOrEmpty()]
        [string]$ApiSecret
    )

    begin {
        #Generate Headers and JWT (JSON Web Token)
        $headers = New-ZoomHeaders -ApiKey $ApiKey -ApiSecret $ApiSecret
    }

    process {
        $request = [System.UriBuilder]"https://api.zoom.us/v2/rooms/$($RoomID)/devices"

        try {
            $response = Invoke-RestMethod -Uri $request.Uri -Headers $headers -Method GET
        }
        catch {
            Write-Error -Message "$($_.Exception.Message)" -ErrorId $_.Exception.Code -Category InvalidOperation
        }
        
        Write-Output $response.devices
    }
}

Get-ZoomAllMeetings returns 22 records every time

There's some sort of issue with the Get-ZoomAllMeeting, which is exactly what I happened to need for a new project. Every time I run it, it only returns 22 meeting records for a period of time despite some months having thousands of records. For the same period, Get-ZoomAccountRecordings returns over 1000 recordings, so it's not an access issue. I have tried date range variations, but it's always 22.
Any ideas?

Here's an example:

$ToDate = "2021-06-30";
$FromDate = "2021-06-01";

get-zoomallmeetings -PageSize 300 -From $FromDate -To $ToDate

Results:

from : 2021-06-01
to : 2021-06-30
page_count : 1
page_size : 300
total_records : 22
next_page_token :
meetings : {@{uuid=AOs0l8fMiRCy9IbHi3TgarQ==; id=91943221; topic=Joe Schmoe's Zoom Meeting; host=Joe

This works fine for recordings:

get-zoomaccountrecordings -AccountID me -PageSize 300 -From $FromDate -To $ToDate

from : 2021-06-01
to : 2021-06-30
page_size : 300
total_records : 1275

Get-ZoomRecordings on trashed files misses recordings properties

Hello I have tested Get-ZoomRecordings with -Trash $true option.
Returned data misses some properties such as recording_files.download_url and recording_files.file_type.
BTW Get-ZoomMeetingRecordings will fail when attempting to grab above missing information too, attempting to use an id of a trashed meeting/recording

To manage trashed recordings. it looks like you're required to undelete/recover the recording, then process as usual.

Any idea about adding a function to recover deleted recording?

Invoke-ZoomRestMethod Stopped working

Did something change in the past few months where my custom functions to Set-ZoomIMGroup and Set-ZoomRole no longer work properly?

When I run them I get this error:
New-ZoomHeaders : The term 'New-ZoomHeaders' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

If I run this:
$Token = New-ZoomApiToken -ApiKey $ZoomApiKey -ApiSecret $ZoomApiSecret

it gives me an error like:
Get-ZoomApiCredentials : The term 'Get-ZoomApiCredentials' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

I don't see any reference to New-ZoomHeaders or Get-ZoomApiCredentials as actual functions... where do I get those from?

New-ZoomMeetingPoll is not working

New-ZoomMeetingPoll is not working. I get a 400 Bad Request error when I run the example given in the help text for the function.

I tried this code and get errors.

$Questions = @(
    @('Favorite number?', 'multiple', @('1', '2', '3')), @('Favorite letter?', 'multiple', @('a', 'b', 'c'))
)
New-ZoomMeetingPoll $MeetingId -Title 'Favorite numbers and letters' -Questions $Questions

Invoke-ZoomRestMethod : The remote server returned an error: (400) Bad Request.
At C:\Program Files\WindowsPowerShell\Modules\PSZoom\1.14.0.1\Public\Meetings\New-ZoomMeetingPoll.ps1:85 char:21
+ ... $response = Invoke-ZoomRestMethod -Uri $request.Uri -Headers ([ref]$H ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (https://api.zoo...086105670/polls:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : 400,Invoke-ZoomRestMethod

Also, the help text says that the function New-ZoomMeetingPollQuestion can be used, but this function does not exist. To be precise, the code exists, but it is not available to users.

Example:
$Questions = @(
@('Favorite number?', 'multiple', @('1', '2', '3')), @('Favorite letter?', 'multiple', @('a', 'b', 'c'))
)
Can also pass New-ZoomMeetingPollQuestion as an array. Example:
$Questions = @(
(New-ZoomMeetingPollQuestion -Name 'Favorite Number?' -type 'multiple' -answers '1,2,3'),
(New-ZoomMeetingPollQuestion -Name 'Favorite letter??' -type 'multiple' -answers 'a,b,c))
)

Cloud Recordings

Thank you for writing this module. I just started testing out PSZoom. I am looking for a way to get Cloud recording usage and pull down cloud recordings so I can put them on Google Drive. When I try to call "Get-ZoomMeetingCloudRecordings", I get an error that this cmdlet/function does not exist. Any idea why this would happen. The other cmdlets seem to be working.

Store API Key/Secret in module scope variable

Storing the API Key/Secret in module scope variable instead of the global scope would protect them a little bit more. Right now everything running in PowerShell could see these variables.

Tagging my personal account @sassdawe to have a look at weekend and if time allows send a PR

Cannot bind argument to parameter 'InputObject' because it is null

Hi

I've just installed your module and found the above issue when running Connect-PSZoom.
It turns out the issue is when the machine doesn't have IE installed and changing the "$response = Invoke-WebRequest -uri $uri -headers $headers -Method Post" line in New-OAuthToken to include "-UseBasicParsing" resolves the issue.

Just thought I would let you know as I know IE is depricated and a lot of people and companies will be getting rid of it.

HTH

Matt

Unable to connect with new PSZoom version

I'm getting the error
ConvertFrom-Json : Cannot bind argument to parameter 'InputObject' because it is null.
At C:\Users\User\Documents\WindowsPowerShell\Modules\PSZoom\2.0.1.0\Public\Utils\New-OAuthToken.ps1:78 char:35
$token = ($response. Content | ConvertFrom-Json).access_token

Connect-PSZoom : Unable to retrieve token for account ID xxxxx.

I'm using the command
Connect-PSZoom -AccountID 'XXXX' -ClientID 'XXXX' -ClientSecret 'XXXX'

These settings are from the new Server-to-Server OAuth app I've created on Zoom.

What am I doing wrong?

Unable to use Update-ZoomMeeting InvalidOperation : (:) [Write-Error], WriteErrorException

Hello,

Thanks you for you great tools.

I begin to use it to manage our meeting, I'm able to create one and get content after, but now that I test the update function I have the following error :

if I type :
Update-ZoomMeeting -MeetingId '123456789' -Topic 'Petit dejeuner updated' -StartTime '2020-05-17T19:00:00' -Duration 30

I have the following error :
Update-ZoomMeeting : Le serveur distant a retourné une erreur : (400) Demande incorrecte.
Au caractère Ligne:1 : 1

  • Update-ZoomMeeting -MeetingId '78826924380' -Topic 'Petit dejeuner up ...
  •   + CategoryInfo          : InvalidOperation : (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Update-ZoomMeeting
    
    

I try to replace the MeetingId by the uuid, in this case I don't have error, but the meeting is not updated.

I also try to change or remove topic, startime etc without change.

Do you have any idea of what is wrong?

regards,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.