Hi,
Sometime ago I watched Trevor Sullivan video on Channel 9 about TabExpansionPlusPlus and I was blow away. I though WOW how much this can make my job easier.
TabExpansionPlusPlus is PowerShell module created by Jason Shirk which can be downloaded from GitHub https://github.com/lzybkr/TabExpansionPlusPlus or using PowerShell Find-Module command. This module after installation allow me create custom tab completion object for command which do not offer tab complation for all parameters.

TabExpansion module

Module Commands
I decide to use TabExpansion module to create tab completion for Unlock-ADAccount command. Running Unlock-ADAccount we need to specify Identity of user account we want to unlock, which make necessary to run Search-ADAccount -LockedOut command to find out which account is locked at this moment.

Search-AdAccount Command
My custom Tab completion command runs Search-ADAccount -LockedOut inside ScriptBlock and provide this information to command Unlock-ADAccount while specifying -Identity parameter. We get Tab Completion list of users account lock-out at this point of time. Simply selecting correct user and pressing enter will unlock that user.

Script for tabExpansion

Command with custom tabexpansion
Cheers,
Sebastian
Pingback: PowerShell module TabExtensionPlusPlus help with AD tasks – Virtual Elementary·
Pingback: More fun with PowerShell module TabExpensionPlusPlus | Virtual Elementary·