Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-UserProfileSize - rework process block a bit #38

Open
saladproblems opened this issue Nov 23, 2018 · 0 comments
Open

Get-UserProfileSize - rework process block a bit #38

saladproblems opened this issue Nov 23, 2018 · 0 comments

Comments

@saladproblems
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant