diff --git a/AzurePipelinesPS/Private/Set-APUri.ps1 b/AzurePipelinesPS/Private/Set-APUri.ps1 index cddcdca..f37b388 100644 --- a/AzurePipelinesPS/Private/Set-APUri.ps1 +++ b/AzurePipelinesPS/Private/Set-APUri.ps1 @@ -84,7 +84,7 @@ function Set-APUri process { - If ($ApiVersion -match '5.*' -and ($Instance.Host -eq 'dev.azure.com' -or $Instance.Host -like '*.visualstudio.com')) + If (($ApiVersion -match '5.*' -or $ApiVersion -match '6.*') -and ($Instance.Host -eq 'dev.azure.com' -or $Instance.Host -like '*.visualstudio.com')) { # Api endpoint matches release If ($ApiEndpoint -match 'release') diff --git a/AzurePipelinesPS/Public/Add-APGroupMembership.ps1 b/AzurePipelinesPS/Public/Add-APGroupMembership.ps1 index bfe5cbc..52d2111 100644 --- a/AzurePipelinesPS/Public/Add-APGroupMembership.ps1 +++ b/AzurePipelinesPS/Public/Add-APGroupMembership.ps1 @@ -150,10 +150,6 @@ function Add-APGroupMembership process { - If ($ApiVersion -notmatch '5.*') - { - Write-Error "[$($MyInvocation.MyCommand.Name)]: Groups are not supported in api versions earlier the 5.0." -ErrorAction 'Stop' - } $apiEndpoint = (Get-APApiEndpoint -ApiType 'graph-containerDescriptor') -f $SubjectDescriptor, $ContainerDescriptor $setAPUriSplat = @{ Collection = $Collection diff --git a/AzurePipelinesPS/Public/Get-APDescriptor.ps1 b/AzurePipelinesPS/Public/Get-APDescriptor.ps1 index 8089307..2a9920b 100644 --- a/AzurePipelinesPS/Public/Get-APDescriptor.ps1 +++ b/AzurePipelinesPS/Public/Get-APDescriptor.ps1 @@ -145,10 +145,6 @@ function Get-APDescriptor process { - If ($ApiVersion -notmatch '5.*') - { - Write-Error "[$($MyInvocation.MyCommand.Name)]: Groups are not supported in api versions earlier the 5.0." -ErrorAction 'Stop' - } $apiEndpoint = (Get-APApiEndpoint -ApiType 'graph-descriptorStorageKey') -f $StorageKey $queryParameters = Set-APQueryParameters -InputObject $PSBoundParameters $setAPUriSplat = @{ diff --git a/AzurePipelinesPS/Public/Get-APGroup.ps1 b/AzurePipelinesPS/Public/Get-APGroup.ps1 index 8b5a32c..3dd77fa 100644 --- a/AzurePipelinesPS/Public/Get-APGroup.ps1 +++ b/AzurePipelinesPS/Public/Get-APGroup.ps1 @@ -146,10 +146,6 @@ function Get-APGroup process { - If ($ApiVersion -notmatch '5.*') - { - Write-Error "[$($MyInvocation.MyCommand.Name)]: Groups are not supported in api versions earlier the 5.0." -ErrorAction 'Stop' - } $apiEndpoint = (Get-APApiEndpoint -ApiType 'graph-groupId') -f $GroupDescriptor $queryParameters = Set-APQueryParameters -InputObject $PSBoundParameters $setAPUriSplat = @{ diff --git a/AzurePipelinesPS/Public/Get-APGroupEntitlementsList.ps1 b/AzurePipelinesPS/Public/Get-APGroupEntitlementsList.ps1 index e0b2c57..a8f2ace 100644 --- a/AzurePipelinesPS/Public/Get-APGroupEntitlementsList.ps1 +++ b/AzurePipelinesPS/Public/Get-APGroupEntitlementsList.ps1 @@ -137,10 +137,6 @@ function Get-APGroupEntitlementsList process { - If ($ApiVersion -notmatch '5.*') - { - Write-Error "[$($MyInvocation.MyCommand.Name)]: Groups are not supported in api versions earlier the 5.0." -ErrorAction 'Stop' - } $apiEndpoint = Get-APApiEndpoint -ApiType 'groupentitlements-entitlements' $setAPUriSplat = @{ Collection = $Collection diff --git a/AzurePipelinesPS/Public/Get-APGroupList.ps1 b/AzurePipelinesPS/Public/Get-APGroupList.ps1 index 280e4e5..f03dea9 100644 --- a/AzurePipelinesPS/Public/Get-APGroupList.ps1 +++ b/AzurePipelinesPS/Public/Get-APGroupList.ps1 @@ -161,10 +161,6 @@ function Get-APGroupList process { - If ($ApiVersion -notmatch '5.*') - { - Write-Error "[$($MyInvocation.MyCommand.Name)]: Groups are not supported in api versions earlier the 5.0." -ErrorAction 'Stop' - } $apiEndpoint = Get-APApiEndpoint -ApiType 'graph-groups' $queryParameters = Set-APQueryParameters -InputObject $PSBoundParameters $setAPUriSplat = @{ diff --git a/AzurePipelinesPS/Public/Get-APGroupMembership.ps1 b/AzurePipelinesPS/Public/Get-APGroupMembership.ps1 index b0c3c51..a836fe2 100644 --- a/AzurePipelinesPS/Public/Get-APGroupMembership.ps1 +++ b/AzurePipelinesPS/Public/Get-APGroupMembership.ps1 @@ -156,10 +156,6 @@ function Get-APGroupMembership process { - If ($ApiVersion -notmatch '5.*') - { - Write-Error "[$($MyInvocation.MyCommand.Name)]: Groups are not supported in api versions earlier the 5.0." -ErrorAction 'Stop' - } $apiEndpoint = (Get-APApiEndpoint -ApiType 'graph-containerDescriptor') -f $SubjectDescriptor, $ContainerDescriptor $queryParameters = Set-APQueryParameters -InputObject $PSBoundParameters $setAPUriSplat = @{ diff --git a/AzurePipelinesPS/Public/Get-APGroupMembershipList.ps1 b/AzurePipelinesPS/Public/Get-APGroupMembershipList.ps1 index 41e96ad..80c007c 100644 --- a/AzurePipelinesPS/Public/Get-APGroupMembershipList.ps1 +++ b/AzurePipelinesPS/Public/Get-APGroupMembershipList.ps1 @@ -167,10 +167,6 @@ function Get-APGroupMembershipList process { - If ($ApiVersion -notmatch '5.*') - { - Write-Error "[$($MyInvocation.MyCommand.Name)]: Groups are not supported in api versions earlier the 5.0." -ErrorAction 'Stop' - } $apiEndpoint = (Get-APApiEndpoint -ApiType 'graph-memberships') -f $SubjectDescriptor $queryParameters = Set-APQueryParameters -InputObject $PSBoundParameters $setAPUriSplat = @{ diff --git a/AzurePipelinesPS/Public/Get-APStorageKey.ps1 b/AzurePipelinesPS/Public/Get-APStorageKey.ps1 index 59fb719..97c53a0 100644 --- a/AzurePipelinesPS/Public/Get-APStorageKey.ps1 +++ b/AzurePipelinesPS/Public/Get-APStorageKey.ps1 @@ -146,10 +146,6 @@ function Get-APStorageKey process { - If ($ApiVersion -notmatch '5.*') - { - Write-Error "[$($MyInvocation.MyCommand.Name)]: User list is not supported in api versions earlier the 5.0." -ErrorAction 'Stop' - } $apiEndpoint = (Get-APApiEndpoint -ApiType 'graph-storagekeys') -f $SubjectDescriptor $setAPUriSplat = @{ Collection = $Collection diff --git a/AzurePipelinesPS/Public/Get-APUser.ps1 b/AzurePipelinesPS/Public/Get-APUser.ps1 index f9b0598..b22aa73 100644 --- a/AzurePipelinesPS/Public/Get-APUser.ps1 +++ b/AzurePipelinesPS/Public/Get-APUser.ps1 @@ -146,10 +146,6 @@ function Get-APUser process { - If ($ApiVersion -notmatch '5.*') - { - Write-Error "[$($MyInvocation.MyCommand.Name)]: User list is not supported in api versions earlier the 5.0." -ErrorAction 'Stop' - } $apiEndpoint = (Get-APApiEndpoint -ApiType 'graph-userId') -f $UserDescriptor $queryParameters = Set-APQueryParameters -InputObject $PSBoundParameters $setAPUriSplat = @{ diff --git a/AzurePipelinesPS/Public/Get-APUserList.ps1 b/AzurePipelinesPS/Public/Get-APUserList.ps1 index 0209d00..f932a07 100644 --- a/AzurePipelinesPS/Public/Get-APUserList.ps1 +++ b/AzurePipelinesPS/Public/Get-APUserList.ps1 @@ -153,10 +153,6 @@ function Get-APUserList process { - If ($ApiVersion -notmatch '5.*') - { - Write-Error "[$($MyInvocation.MyCommand.Name)]: User list is not supported in api versions earlier the 5.0." -ErrorAction 'Stop' - } $apiEndpoint = Get-APApiEndpoint -ApiType 'graph-users' $queryParameters = Set-APQueryParameters -InputObject $PSBoundParameters $setAPUriSplat = @{ diff --git a/AzurePipelinesPS/Public/Remove-APGroupMembership.ps1 b/AzurePipelinesPS/Public/Remove-APGroupMembership.ps1 index c1756ba..914aa95 100644 --- a/AzurePipelinesPS/Public/Remove-APGroupMembership.ps1 +++ b/AzurePipelinesPS/Public/Remove-APGroupMembership.ps1 @@ -167,10 +167,6 @@ function Remove-APGroupMembership process { - If ($ApiVersion -notmatch '5.*') - { - Write-Error "[$($MyInvocation.MyCommand.Name)]: Groups are not supported in api versions earlier the 5.0." -ErrorAction 'Stop' - } $apiEndpoint = (Get-APApiEndpoint -ApiType 'graph-containerDescriptor') -f $SubjectDescriptor, $ContainerDescriptor $setAPUriSplat = @{ Collection = $Collection