Add PolicyId output to Get-TeamViewerGroup function#102
Conversation
Removed output details for TeamViewer group.
AchilleasMitos-TV
left a comment
There was a problem hiding this comment.
Please also bump the minor version of the TeamViewerPS.psd1 as well as add an entry to the CHANGELOG for it.
| else { | ||
| Write-Output ($response.groups | ConvertTo-TeamViewerGroup) | ||
| $groups = @($response.groups | ConvertTo-TeamViewerGroup) | ||
| $groups | ForEach-Object { $_.PSObject.Properties.Remove('PolicyId') } |
There was a problem hiding this comment.
question: why don't we want the PolicyId field when requesting multiple groups?
There was a problem hiding this comment.
Well yes, this is very individual. Personally, I don't need this information in the all group output.
If you say you want it, I can remove my filter again.
I just wanted to keep the "general" output streamlined.
There was a problem hiding this comment.
Since the WebApi endpoint exposes it, I don't see a reason for not including it in the Powershell's response :)
AchilleasMitos-TV
left a comment
There was a problem hiding this comment.
Thank you for the improvement on the Cmdlet!
| else { | ||
| Write-Output ($response.groups | ConvertTo-TeamViewerGroup) | ||
| $groups = @($response.groups | ConvertTo-TeamViewerGroup) | ||
| $groups | ForEach-Object { $_.PSObject.Properties.Remove('PolicyId') } |
There was a problem hiding this comment.
Since the WebApi endpoint exposes it, I don't see a reason for not including it in the Powershell's response :)
|
|
||
| # Version number of this module. | ||
| ModuleVersion = '2.5.1' | ||
| ModuleVersion = '2.5.2' |
There was a problem hiding this comment.
Patch version is for documentation changes and other such fixes. Here, we are doing much more than that, hence a minor version bump is in order.
| ModuleVersion = '2.5.2' | |
| ModuleVersion = '2.6.0' |
| @@ -1,5 +1,11 @@ | |||
| # Change Log | |||
|
|
|||
| ## 2.5.2 (not released yet) | |||
There was a problem hiding this comment.
| ## 2.5.2 (not released yet) | |
| ## 2.6.0 (not released yet) |
Please note that you have to request a release for this from @ChristianJ-TV or @stefanhubertus when it is merged.
Summary
This PR adds the
PolicyIdfield to the output of theGet-TeamViewerGroupfunction. This enhancement enables retreival of the PolicyID, assigned to a group via theGet-TeamViewerGroup -Id <groupID>cmdlet.Changes
PolicyIdfield toGet-TeamViewerGroupcmdlet outputConvertTo-TeamViewerGroupconversion function to support the new fieldMotivation & Context
Being able to set an Policy to a group, I thought, "Why can't I retrieve it via the PowerShell module?" In a script that I had built, I had to use Invoke-RestMethod in the middle of the script, which is a bit of a maintenance pain. So I updated the module to make this output available too.
Checklist