Skip to content

Commit

Permalink
Merge pull request #3999 from ifinch/new-branch-AADAdminUnit
Browse files Browse the repository at this point in the history
Adding Filtering option to AADAdministrativeUnit
  • Loading branch information
NikCharlebois authored Dec 6, 2023
2 parents ad65bc5 + ff64883 commit f4109f4
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,10 @@ function Export-TargetResource
[OutputType([System.String])]
param
(
[Parameter()]
[System.String]
$Filter,

[Parameter()]
[System.Management.Automation.PSCredential]
$Credential,
Expand Down Expand Up @@ -989,12 +993,14 @@ function Export-TargetResource
Add-M365DSCTelemetryEvent -Data $data
#endregion




try
{
$Script:ExportMode = $true
#region resource generator code
[array] $Script:exportedInstances = Get-MgBetaDirectoryAdministrativeUnit -All `
-ErrorAction Stop
[array] $Script:exportedInstances = Get-MgBetaDirectoryAdministrativeUnit -Filter $Filter -All:$true -ErrorAction Stop
#endregion

$i = 1
Expand Down

0 comments on commit f4109f4

Please sign in to comment.