Skip to content

Commit

Permalink
Merge pull request #2531 from NikCharlebois/Fix-#2503
Browse files Browse the repository at this point in the history
Fixes #2503
  • Loading branch information
NikCharlebois authored Nov 11, 2022
2 parents 67d500a + 589fe20 commit 2e0bed9
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change log for Microsoft365DSC

# UNRELEASED

* SCRetentionCompliancePolicy
* Fixes the Location parameters to be a string array instead of an object array.
FIXES [#2503](https://github.com/microsoft/Microsoft365DSC/issues/2503)

# 1.22.1109.1

* EXODataClassification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,19 +155,19 @@ function Get-TargetResource
Ensure = 'Present'
Name = $PolicyObject.Name
Comment = $PolicyObject.Comment
DynamicScopeLocation = [array]$PolicyObject.DynamicScopeLocation
DynamicScopeLocation = [array]$PolicyObject.DynamicScopeLocation.DisplayName
Enabled = $PolicyObject.Enabled
ExchangeLocation = [array]$PolicyObject.ExchangeLocation
ExchangeLocation = [array]$PolicyObject.ExchangeLocation.DisplayName
ExchangeLocationException = [array]$PolicyObject.ExchangeLocationException
ModernGroupLocation = [array]$PolicyObject.ModernGroupLocation
ModernGroupLocation = [array]$PolicyObject.ModernGroupLocation.DisplayName
ModernGroupLocationException = [array]$PolicyObject.ModernGroupLocationException
OneDriveLocation = [array]$PolicyObject.OneDriveLocation
OneDriveLocation = [array]$PolicyObject.OneDriveLocation.DisplayName
OneDriveLocationException = [array]$PolicyObject.OneDriveLocationException
PublicFolderLocation = [array]$PolicyObject.PublicFolderLocation
PublicFolderLocation = [array]$PolicyObject.PublicFolderLocation.DisplayName
RestrictiveRetention = $PolicyObject.RestrictiveRetention
SharePointLocation = [array]$PolicyObject.SharePointLocation
SharePointLocation = [array]$PolicyObject.SharePointLocation.DisplayName
SharePointLocationException = $PolicyObject.SharePointLocationException
SkypeLocation = [array]$PolicyObject.SkypeLocation
SkypeLocation = [array]$PolicyObject.SkypeLocation.DisplayName
SkypeLocationException = $PolicyObject.SkypeLocationException
Credential = $Credential
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,24 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Mock -CommandName Get-RetentionCompliancePolicy -MockWith {
return @{
Name = "TestPolicy"
ExchangeLocation = "https://contoso.sharepoint.com/sites/demo"
ExchangeLocation = @{
DisplayName = "https://contoso.sharepoint.com/sites/demo"
}
ExchangeLocationException = "https://contoso.sharepoint.com"
OneDriveLocation = "https://contoso.sharepoint.com/sites/demo"
OneDriveLocation = @{
DisplayName = "https://contoso.sharepoint.com/sites/demo"
}
OneDriveLocationException = "https://contoso.com"
PublicFolderLocation = "\\contoso\PF"
SkypeLocation = "https://contoso.sharepoint.com/sites/demo"
PublicFolderLocation = @{
DisplayName = "\\contoso\PF"
}
SkypeLocation = @{
DisplayName = "https://contoso.sharepoint.com/sites/demo"
}
SkypeLocationException = "https://contoso.sharepoint.com/"
SharePointLocation = "https://contoso.sharepoint.com/sites/demo"
SharePointLocation = @{
DisplayName = "https://contoso.sharepoint.com/sites/demo"
}
SharePointLocationException = "https://contoso.com"
}
}
Expand Down

0 comments on commit 2e0bed9

Please sign in to comment.