From bda68c7e92aa25518eefc4e6bb3efdd04f82f7ce Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Fri, 19 Jan 2024 08:21:29 -0500 Subject: [PATCH] Update MSFT_SPOSharingSettings.psm1 --- .../MSFT_SPOSharingSettings.psm1 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSharingSettings/MSFT_SPOSharingSettings.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSharingSettings/MSFT_SPOSharingSettings.psm1 index 33916b54fb..b8dd694459 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSharingSettings/MSFT_SPOSharingSettings.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SPOSharingSettings/MSFT_SPOSharingSettings.psm1 @@ -193,15 +193,9 @@ function Get-TargetResource { $DefaultLinkPermission = $SPOSharingSettings.DefaultLinkPermission } - - if ([System.String]::IsNullOrEmpty($MySiteSharingCapability)) - { - $MySiteSharingCapability = $null - } - return @{ + $results = @{ IsSingleInstance = 'Yes' SharingCapability = $SPOSharingSettings.SharingCapability - MySiteSharingCapability = $MySiteSharingCapability ShowEveryoneClaim = $SPOSharingSettings.ShowEveryoneClaim ShowAllUsersClaim = $SPOSharingSettings.ShowAllUsersClaim ShowEveryoneExceptExternalUsersClaim = $SPOSharingSettings.ShowEveryoneExceptExternalUsersClaim @@ -233,6 +227,12 @@ function Get-TargetResource Managedidentity = $ManagedIdentity.IsPresent Ensure = 'Present' } + + if (-not [System.String]::IsNullOrEmpty($MySiteSharingCapability)) + { + $results.Add('MySiteSharingCapability', $MySiteSharingCapability) + } + return $results } catch {