From 1ea6ecb5f2d092d3dbbad6c7d6540174c2c4b5ea Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Thu, 18 Jan 2024 14:52:54 -0500 Subject: [PATCH] Fixes --- .../MSFT_AADEntitlementManagementAccessPackage.psm1 | 7 +++++-- .../MSFT_AADEntitlementManagementAccessPackageCatalog.psm1 | 7 +++++-- ...MSFT_AADEntitlementManagementConnectedOrganization.psm1 | 5 ++++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementAccessPackage/MSFT_AADEntitlementManagementAccessPackage.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementAccessPackage/MSFT_AADEntitlementManagementAccessPackage.psm1 index a4a89be7c5..d3af2977c2 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementAccessPackage/MSFT_AADEntitlementManagementAccessPackage.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementAccessPackage/MSFT_AADEntitlementManagementAccessPackage.psm1 @@ -111,9 +111,12 @@ function Get-TargetResource -ErrorAction SilentlyContinue } - if ($null -eq $getValue -and -not [System.String]::IsNullOrEmpty($id)) + if ($null -eq $getValue) { - Write-Verbose -Message "Nothing with id {$id} was found" + if(-not [System.String]::IsNullOrEmpty($id)) + { + Write-Verbose -Message "Nothing with id {$id} was found" + } if (-Not [string]::IsNullOrEmpty($DisplayName)) { diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementAccessPackageCatalog/MSFT_AADEntitlementManagementAccessPackageCatalog.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementAccessPackageCatalog/MSFT_AADEntitlementManagementAccessPackageCatalog.psm1 index 9b7507631b..e277b29f1b 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementAccessPackageCatalog/MSFT_AADEntitlementManagementAccessPackageCatalog.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementAccessPackageCatalog/MSFT_AADEntitlementManagementAccessPackageCatalog.psm1 @@ -93,9 +93,12 @@ function Get-TargetResource $getValue = Get-MgBetaEntitlementManagementAccessPackageCatalog -AccessPackageCatalogId $id -ErrorAction SilentlyContinue } - if ($null -eq $getValue -and -not [System.String]::IsNullOrEmpty($Id)) + if ($null -eq $getValue) { - Write-Verbose -Message "Nothing with id {$id} was found" + if (-not [System.String]::IsNullOrEmpty($Id)) + { + Write-Verbose -Message "Nothing with id {$id} was found" + } if (-Not [string]::IsNullOrEmpty($DisplayName)) { diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementConnectedOrganization/MSFT_AADEntitlementManagementConnectedOrganization.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementConnectedOrganization/MSFT_AADEntitlementManagementConnectedOrganization.psm1 index 9f7c6f4e0e..6e7b94cf31 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementConnectedOrganization/MSFT_AADEntitlementManagementConnectedOrganization.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementConnectedOrganization/MSFT_AADEntitlementManagementConnectedOrganization.psm1 @@ -93,7 +93,10 @@ function Get-TargetResource if ($null -eq $getValue) { - Write-Verbose -Message "Entitlement Management Connected Organization with id {$id} was not found." + if (-not [System.String]::IsNullOrEmpty($id)) + { + Write-Verbose -Message "Entitlement Management Connected Organization with id {$id} was not found." + } if (-Not [string]::IsNullOrEmpty($DisplayName)) {