Skip to content

Commit

Permalink
Merge pull request #5388 from NikCharlebois/TeamsUpgradePolicy---Perf…
Browse files Browse the repository at this point in the history
…ormance-Improvements

TeamsUpgradePolicy - Performance Improvements
  • Loading branch information
NikCharlebois authored Nov 12, 2024
2 parents 2b03e07 + c7dcfc0 commit cff7129
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 cff7129

Please sign in to comment.