You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Get-UserProfileSize iterates one by one through each computer and doesn't return output until the last one is complete, when it outputs the result array in its entirety. I suggest skipping the array altogether and just letting each PSObject hit the pipeline as it completes.
Also, the logic for listing profiles is performed in a separate command from querying the profile sizes. If that were moved into the script block, you could drop the foreach-object and allow it to just use Invoke-Command against $ComputerName, allowing it to use Invoke-Command built-in asynchronous query ability.
The text was updated successfully, but these errors were encountered:
Currently Get-UserProfileSize iterates one by one through each computer and doesn't return output until the last one is complete, when it outputs the result array in its entirety. I suggest skipping the array altogether and just letting each PSObject hit the pipeline as it completes.
Also, the logic for listing profiles is performed in a separate command from querying the profile sizes. If that were moved into the script block, you could drop the foreach-object and allow it to just use Invoke-Command against $ComputerName, allowing it to use Invoke-Command built-in asynchronous query ability.
The text was updated successfully, but these errors were encountered: