-
Notifications
You must be signed in to change notification settings - Fork 15
Add new cmdlet Get-TeamViewerRoleByUser #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0250e0d to
ef1f65d
Compare
| -ErrorAction Stop | ||
|
|
||
| if ($response.nextPaginationToken) { | ||
| $resourceUri += '?paginationToken=' + $response.nextPaginationToken |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have a REALLY large list, it could be that the loops gets to this line multiple times. Then the resourceUri variable gets longer and longer. Already on the second loop, it will be invalid with twice the paginationToken parameter. You need to use a temporary variable instead of directly updating the resourceUri in every loop.
|
|
||
| ## SYNOPSIS | ||
|
|
||
| Returns the assigned role id of the user or null. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There can be multiple roles:
| Returns the assigned role id of the user or null. | |
| Returns the assigned role ids of the user or null. |
|
|
||
| ## DESCRIPTION | ||
|
|
||
| Lists the assigned role of a user in the TeamViewer company associated with the API access token. If no role is assigned or user id is unknown, null is returned. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above:
| Lists the assigned role of a user in the TeamViewer company associated with the API access token. If no role is assigned or user id is unknown, null is returned. | |
| Lists the assigned roles of a user in the TeamViewer company associated with the API access token. If no role is assigned or user id is unknown, null is returned. |
| PS /> Get-TeamViewerRoleByUser -UserId "u123456777" | ||
| ``` | ||
|
|
||
| Lists the assigned role of the user with the ID u123456777. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above:
| Lists the assigned role of the user with the ID u123456777. | |
| Lists the assigned roles of the user with the ID u123456777. |
|
|
||
| ### -UserId | ||
|
|
||
| User to list its assigned role. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above:
| User to list its assigned role. | |
| User to list its assigned roles. |
ef1f65d to
771ee92
Compare
No description provided.