Skip to content

Commit

Permalink
2203530 - [ Get-AzsDirectoryTenant] Provide default value for the Res…
Browse files Browse the repository at this point in the history
…ourceGroupName
  • Loading branch information
giesler committed Mar 15, 2018
1 parent 0835b99 commit aa7941c
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ function Get-AzsDirectoryTenant
[System.String]
$ResourceId,

[Parameter(Mandatory = $true, ParameterSetName = 'ResourceId_DirectoryTenants_Get')]
[Parameter(Mandatory = $true, ParameterSetName = 'DirectoryTenants_List')]
[Parameter(Mandatory = $true, ParameterSetName = 'DirectoryTenants_Get')]
[Parameter(Mandatory = $false, ParameterSetName = 'DirectoryTenants_List')]
[Parameter(Mandatory = $false, ParameterSetName = 'DirectoryTenants_Get')]
[System.String]
$ResourceGroupName,

Expand Down Expand Up @@ -97,6 +96,11 @@ function Get-AzsDirectoryTenant

$Tenant = $Name

if (-not $PSBoundParameters.ContainsKey('ResourceGroupName'))
{
$ResourceGroupName = "System." + (Get-AzureRMLocation).Location
$PSBoundParameters.Add("ResourceGroupName", $ResourceGroupName)
}

if('ResourceId_DirectoryTenants_Get' -eq $PsCmdlet.ParameterSetName) {
$GetArmResourceIdParameterValue_params = @{
Expand Down

0 comments on commit aa7941c

Please sign in to comment.