Skip to main content

3 posts tagged with "PSF"

View All Tags

Release - PSFramework v1.13.414

· 2 min read
Friedrich Weinmann
Cloud Solution Architect @MSFT

Just released v1.13.414 of the PSFramework module!

The key feature for this release is the Invoke-PSFRunspace command, beyond which a few minor fixes and tweaks were included:

  • New Options for Tab Expansion Scriptblocks: It is now possible to disable automatic filtering (in case you want to do your own), or limit the maximum number of completions shown.
  • Waiting for a Runspace Workflow to complete now supports showing a progress bar

Invoke-PSFRunspace

The idea behind this command is to step into the role of both ForEach-Object -Parallel and Start-ThreadJob, granting access to their functionality for both Windows PowerShell (5.1) and later core versions (7.*). And improve upon it.

A few example usages:

Get-ADUser -Filter * | Invoke-PSFRunspace { $_ | Get-ADPrincipalGroupMembership }

Retrieve all users from Active Directory, then retrieve their group memberships

Get-ADUser -Filter * | Invoke-PSFRunspace { $_ | Get-ADPrincipalGroupMembership } -OutputStyle Result

Retrieve all users from Active Directory, then retrieve their group memberships, returning a report object, mapping each user to their group memberships.

$task = Get-ADUser -Filter * | Invoke-PSFRunspace { $_ | Get-ADPrincipalGroupMembership }

# Collect the data received so far
$task.CollectCurrentResult()

# Wait until completed and collact all remaining results
$task.CollectResult()

First start searching for all users' group memberships. Then later collect some or all the results in convenient result datasets, mapping input to output and including all errors / warnings / etc.

Release - PSFramework v1.13.406

· One min read
Friedrich Weinmann
Cloud Solution Architect @MSFT

Just released v1.13.406 of the PSFramework module!

This comes with a huge range of changes, far more than can usefully put into an announcement blog post.

A few highlights: