PSDevOps
PSDevOps copied to clipboard
Piping repo object to Get-/Set-ADOPermission sets the wrong value
Piping a repo object to Get-/Set-ADOPermission
sets the RepositoryID
parameter to the repo name instead of the repo ID.
Workaround:
$repo = Get-ADOProject -PAT $Token -Organization $Organization -Project $ProjectName | Get-ADORepository -RepositoryID $RepoName
$repo | Get-ADOPermission -RepositoryID { $_.id } -ExpandACL