Skip to content

Get-UserProfileSize - rework process block a bit #38

@saladproblems

Description

@saladproblems

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions