Skip to content

Commit

Permalink
Merge pull request #3110 from NikCharlebois/Fixes-#3062
Browse files Browse the repository at this point in the history
Fixes #3062 - UseNewTeamsClient
  • Loading branch information
NikCharlebois authored Mar 31, 2023
2 parents 525c253 + 902fb31 commit 681e800
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@
FIXES [#3066](https://github.com/microsoft/Microsoft365DSC/issues/3066)
* TeamsMeetingPolicy
* [BREAKING CHANGE] Remove deprecated parameter RecordingStorageMode
* TeamsUpdateManagementPolicy
* Added support for the new UseNewTeamsClient parameter.
FIXES [#3062](https://github.com/microsoft/Microsoft365DSC/issues/3062)
* DRG
* Various fixes
* Cleanup generated code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ function Get-TargetResource
[System.String]
$UpdateTimeOfDay,

[Parameter()]
[System.Boolean]
$UseNewTeamsClient,

[Parameter()]
[ValidateSet('Present', 'Absent')]
[System.String]
Expand Down Expand Up @@ -98,6 +102,7 @@ function Get-TargetResource
AllowPublicPreview = $policy.AllowPublicPreview
UpdateDayOfWeek = $policy.UpdateDayOfWeek
UpdateTime = $policy.UpdateTime
UseNewTeamsClient = $policy.UseNewTeamsClient
Ensure = 'Present'
Credential = $Credential
ApplicationId = $ApplicationId
Expand Down Expand Up @@ -162,6 +167,10 @@ function Set-TargetResource
[System.String]
$UpdateTimeOfDay,

[Parameter()]
[System.Boolean]
$UseNewTeamsClient,

[Parameter()]
[ValidateSet('Present', 'Absent')]
[System.String]
Expand Down Expand Up @@ -274,6 +283,10 @@ function Test-TargetResource
[System.String]
$UpdateTimeOfDay,

[Parameter()]
[System.Boolean]
$UseNewTeamsClient,

[Parameter()]
[ValidateSet('Present', 'Absent')]
[System.String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class MSFT_TeamsUpdateManagementPolicy : OMI_BaseResource
[Write, Description("Determines the day of week to perform the updates. Value shoud be between 0 and 6.")] UInt32 UpdateDayOfWeek;
[Write, Description("Determines the time of day to perform the updates. Must be a valid HH:MM format string with leading 0. For instance 08:30.")] String UpdateTime;
[Write, Description("Determines the time of day to perform the updates. Accepts a DateTime as string. Only the time will be considered.")] String UpdateTimeOfDay;
[Write, Description("Determines whether or not users will use the new Teams client.")] Boolean UseNewTeamsClient;
[Write, Description("Present ensures the policy exists, absent ensures it is removed."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure;
[Write, Description("Credentials of the Teams Admin"), EmbeddedInstance("MSFT_Credential")] string Credential;
[Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Configuration Example
UpdateDayOfWeek = 1;
UpdateTime = "18:00";
UpdateTimeOfDay = "2022-05-06T18:00:00";
UseNewTeamsClient = $True
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
$Credential = New-Object System.Management.Automation.PSCredential ('[email protected]', $secpasswd)
$DateTimeValue = [System.DateTime]::Parse("2022-12-08 6:00:00PM")
$Global:PartialExportFileName = 'c:\TestPath'

Mock -CommandName Save-M365DSCPartialExport -MockWith {
}

Expand Down Expand Up @@ -60,6 +60,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
UpdateDayOfWeek = 1
UpdateTime = '18:00'
UpdateTimeOfDay = '6:00 PM'
UseNewTeamsClient = $True
Ensure = 'Present'
Credential = $Credential
}
Expand Down Expand Up @@ -94,6 +95,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
UpdateDayOfWeek = 1
UpdateTime = '18:00'
UpdateTimeOfDay = '6:00 PM'
UseNewTeamsClient = $True
Ensure = 'Present'
Credential = $Credential
}
Expand All @@ -108,6 +110,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
UpdateDayOfWeek = 3; #Drift
UpdateTime = '18:00'
UpdateTimeOfDay = $DateTimeValue
UseNewTeamsClient = $True
}
}
}
Expand Down Expand Up @@ -138,6 +141,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
UpdateDayOfWeek = 1
UpdateTime = '18:00'
UpdateTimeOfDay = '6:00 PM'
UseNewTeamsClient = $True
Ensure = 'Present'
Credential = $Credential
}
Expand All @@ -152,6 +156,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
UpdateDayOfWeek = 1
UpdateTime = '18:00'
UpdateTimeOfDay = $DateTimeValue
UseNewTeamsClient = $True
}
}
}
Expand Down Expand Up @@ -183,6 +188,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
UpdateDayOfWeek = 1
UpdateTime = '18:00'
UpdateTimeOfDay = $DateTimeValue
UseNewTeamsClient = $True
}
}
}
Expand Down Expand Up @@ -219,6 +225,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
UpdateDayOfWeek = 1
UpdateTime = '18:00'
UpdateTimeOfDay = $DateTimeValue
UseNewTeamsClient = $True
}
}
}
Expand Down

0 comments on commit 681e800

Please sign in to comment.