Skip to content

Commit aa7941c

Browse files
committed
2203530 - [ Get-AzsDirectoryTenant] Provide default value for the ResourceGroupName
1 parent 0835b99 commit aa7941c

File tree

1 file changed

+7
-3
lines changed
  • src/StackAdmin/Azs.Subscriptions.Admin/Module/Azs.Subscriptions.Admin/Generated.PowerShell.Commands/SwaggerPathCommands

1 file changed

+7
-3
lines changed

src/StackAdmin/Azs.Subscriptions.Admin/Module/Azs.Subscriptions.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Get-AzsDirectoryTenant.ps1

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@ function Get-AzsDirectoryTenant
5050
[System.String]
5151
$ResourceId,
5252

53-
[Parameter(Mandatory = $true, ParameterSetName = 'ResourceId_DirectoryTenants_Get')]
54-
[Parameter(Mandatory = $true, ParameterSetName = 'DirectoryTenants_List')]
55-
[Parameter(Mandatory = $true, ParameterSetName = 'DirectoryTenants_Get')]
53+
[Parameter(Mandatory = $false, ParameterSetName = 'DirectoryTenants_List')]
54+
[Parameter(Mandatory = $false, ParameterSetName = 'DirectoryTenants_Get')]
5655
[System.String]
5756
$ResourceGroupName,
5857

@@ -97,6 +96,11 @@ function Get-AzsDirectoryTenant
9796

9897
$Tenant = $Name
9998

99+
if (-not $PSBoundParameters.ContainsKey('ResourceGroupName'))
100+
{
101+
$ResourceGroupName = "System." + (Get-AzureRMLocation).Location
102+
$PSBoundParameters.Add("ResourceGroupName", $ResourceGroupName)
103+
}
100104

101105
if('ResourceId_DirectoryTenants_Get' -eq $PsCmdlet.ParameterSetName) {
102106
$GetArmResourceIdParameterValue_params = @{

0 commit comments

Comments
 (0)