Skip to content

Commit 6599bde

Browse files
committed
organize functions
1 parent 342a78a commit 6599bde

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

Modules/CIPPCore/Public/Functions/Expand-CIPPTenantGroups.ps1 renamed to Modules/CIPPCore/Public/TenantGroups/Expand-CIPPTenantGroups.ps1

File renamed without changes.

Modules/CIPPCore/Public/Functions/Get-TenantGroups.ps1 renamed to Modules/CIPPCore/Public/TenantGroups/Get-TenantGroups.ps1

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ function Get-TenantGroups {
1111
#>
1212
[CmdletBinding()]
1313
param(
14-
$GroupId,
15-
$TenantFilter
14+
[string]$GroupId,
15+
[string]$TenantFilter,
16+
[switch]$Dynamic
1617
)
1718

1819
$GroupTable = Get-CippTable -tablename 'TenantGroups'
@@ -30,6 +31,12 @@ function Get-TenantGroups {
3031
}
3132
$Tenants = Get-Tenants @TenantParams
3233

34+
if ($Dynamic.IsPresent) {
35+
$GroupTable.Filter = "PartitionKey eq 'TenantGroup' and GroupType eq 'dynamic'"
36+
} else {
37+
$GroupTable.Filter = "PartitionKey eq 'TenantGroup'"
38+
}
39+
3340
if ($GroupId) {
3441
$Groups = Get-CIPPAzDataTableEntity @GroupTable -Filter "RowKey eq '$GroupId'"
3542
$AllMembers = Get-CIPPAzDataTableEntity @MembersTable -Filter "GroupId eq '$GroupId'"

Modules/CIPPCore/Public/Functions/Update-CIPPDynamicTenantGroups.ps1 renamed to Modules/CIPPCore/Public/TenantGroups/Update-CIPPDynamicTenantGroups.ps1

File renamed without changes.

0 commit comments

Comments
 (0)