This is a part of PsBananaUtils module.
Install the module via Install-Module or Install-PsResource
# Install the module
Install-PsResource -Name PsBananaUtils.PowerShell -TrustedRepo -Scope CurrentUser
# Then import in your session
Import-Module PsBananaUtils.PowerShellHere a list of the main commands from this module:
-
Find-PowerShellHistory: Permit to find in powershell history and also exportshsearchalias -
Get-PathFromCommand: Ecquivalent ofwhereison linux (export alsowhereisalias) -
Get-PowerShellVersions: List all available PowerShell version founded on the current machine -
Invoke-CustomPowerShell: Permit to launch command inside custom PowerShell session withouth lose serialization and withouth the need of exiting from your actual session.For example inside PowerShell 5.1:
$SomeInputObject | Invoke-PowerShellCustom {Start-CmdletNotCompatibleWithLegacyPowerShell} | ? { # this is perfectly tollerated becouse the Invoke-PowerShellCustom produce a serialized valid object $_.MyProps -match "MyString" }
Invoke-PowerShellCustomalso support user defined$SomeInputObject | Invoke-PowerShellCustom -PsCustomPath ".\Path\To\pwsh.exe" {Start-CmdletNotCompatibleWithLegacyPowerShell} | ? { # this is perfectly tollerated becouse the Invoke-PowerShellCustom produce a serialized valid object $_.MyProps -match "MyString" }
-
Uninstall-ModuleOneDrive: Uninistall module placed on OneDrive module folder that for a know bug thrigger Permnission Error using legacy Uninstall-Module
If you like my work, leave a star on this repository or donate me a coffee: