Skip to content

Commit

Permalink
TeamsUpgradePolicy - Performance Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
NikCharlebois committed Nov 12, 2024
1 parent 2b03e07 commit c7dcfc0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
* M365DSCIntuneSettingsCatalogUtil
* Add ADMX handling for `edge~httpauthentication_`.
FIXES [#5378](https://github.com/microsoft/Microsoft365DSC/issues/5378) (2/2)
* TeamsUpgradePolicy
* Changes to how we're retrieving the users to improve performance.
* DEPENDENCIES
* Updated DSCParser to version 2.0.0.12.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ function Get-TargetResource

if ($Identity -eq 'Global')
{
[array]$users = Get-CsOnlineUser | Where-Object -Filter { $_.TeamsUpgradePolicy -eq $null }
[array]$users = Get-CsOnlineUser -Filter "TeamsUpgradePolicy eq null"
}
else
{
try
{
[array]$users = Get-CsOnlineUser -Filter "TeamsUpgradePolicy -eq '$Identity'"
[array]$users = Get-CsOnlineUser -Filter "TeamsUpgradePolicy eq '$Identity'"
}
catch
{
Expand Down

0 comments on commit c7dcfc0

Please sign in to comment.