[Doc]: Update-AzGallery -Tenant has incorrect documentation

Open Beginner friendly
#29,302 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Quiet
Tech stack
azure, powershell

Research direction

Start at the linked Update-AzGallery Learn page and inspect the -Tenant example. Compare the documented comma-separated value with the working PowerShell string[] example provided in the issue. Done means the page accurately documents syntax that works for multiple tenant IDs.

Written by the indexing model from the issue text.

Description

needs-triage
Type of issue

Code doesn't work

Feedback

https://learn.microsoft.com/en-us/powershell/module/az.compute/update-azgallery?view=azps-15.4.0

this example shows

Update-AzGallery -ResourceGroupName $rgname -Name $galleryName -Permission Groups -Share -Tenant xxxxxxxx-xxx-xxxxxxx,zzzzzz-zzzzzzz-zzzzzz

that tenantIds should be comma separated values, but it doesn't work like it shows

I have got it to work by passing a string[]

for example

$tenantIds = @( 'xxxxxxxx-xxx-xxxxxxx'; 'zzzzzz-zzzzzzz-zzzzzz')
Update-AzGallery -ResourceGroupName $rgname -Name $galleryName -Permission Groups -Share -Tenant $tenantIds

works, but

$tenantIds = @( 'xxxxxxxx-xxx-xxxxxxx'; 'zzzzzz-zzzzzzz-zzzzzz')
Update-AzGallery -ResourceGroupName $rgname -Name $galleryName -Permission Groups -Share -Tenant $($tenantIds -join ',')

doesn't work

Page URL

https://learn.microsoft.com/en-us/powershell/module/az.compute/update-azgallery?view=azps-15.4.0

Content source URL

No response

Author

No response

Document Id

No response

Platform Id

No response

Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
3d 21h
Merged PRs (30d)
49

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/azure-powershell

All issues in Azure/azure-powershell

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.