Speeding Access to Office 365 PowerShell Data Using Where Instead of Where-Object

%3CLINGO-SUB%20id%3D%22lingo-sub-1640767%22%20slang%3D%22en-US%22%3ESpeeding%20Access%20to%20Office%20365%20PowerShell%20Data%20Using%20Where%20Instead%20of%20Where-Object%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1640767%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20Office%20365%20for%20IT%20Pros%20eBook%20includes%20many%20PowerShell%20examples%2C%20and%20while%20we%20mostly%20concentrate%20on%20illustrating%20the%20principles%20of%20how%20PowerShell%20is%20used%20to%20solve%20problems%2C%20we%20do%20care%20about%20performance.%20Which%20is%20why%20we%E2%80%99re%20always%20interested%20in%20finding%20ways%20to%20speed%20up%20our%20code.%20This%20this%20article%20we%20explore%20how%20to%20use%20the%20Where%20method%20to%20replace%20the%20Where-Object%20cmdlet%20to%20filter%20objects.%20The%20good%20news%20is%20that%20it%E2%80%99s%20an%20easy%20way%20to%20get%20better%20code%20performance.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Foffice365itpros.com%2F2020%2F09%2F07%2Fspeed-powershell-code-where-method%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Foffice365itpros.com%2F2020%2F09%2F07%2Fspeed-powershell-code-where-method%2F%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1640767%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
MVP

The Office 365 for IT Pros eBook includes many PowerShell examples, and while we mostly concentrate on illustrating the principles of how PowerShell is used to solve problems, we do care about performance. Which is why we’re always interested in finding ways to speed up our code. This this article we explore how to use the Where method to replace the Where-Object cmdlet to filter objects. The good news is that it’s an easy way to get better code performance.

 

https://office365itpros.com/2020/09/07/speed-powershell-code-where-method/

0 Replies