GenXdev.Helpers
A Windows PowerShell module with helpers mostly used by other GenXdev modules
MIT License
Copyright (c) 2025 GenXdev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Install-Module "GenXdev.Helpers"
Import-Module "GenXdev.Helpers"
Update-Module
Command | Aliases | Description |
---|---|---|
alignScript | Returns a string (with altered indentation) of a provided scriptblock string | |
ConvertTo-HashTable | Converts a PSCustomObject to a HashTable recursively. | |
ConvertTo-JsonEx | tojsonex | Converts an object to a JSON string with extended options. |
EnsureGenXdev | ||
EnsureNuGetAssembly | Downloads and loads .NET assemblies from NuGet packages based on package key or ID. | |
Get-DefaultWebLanguage | Gets the default web language key based on the system's current language settings. | |
Get-GenXDevCmdlet | gcmds | Retrieves and lists all GenXdev cmdlets and their details. |
Get-ImageGeolocation | Extracts geolocation data from an image file. | |
Get-ImageMetadata | Extracts comprehensive metadata from an image file. | |
Get-WebLanguageDictionary | Returns a reversed dictionary for all languages supported by Google Search | |
Import-GenXdevModules | reloadgenxdev | Imports all GenXdev PowerShell modules into the global scope. |
Initialize-SearchPaths | Initializes and configures system search paths for package management. | |
Invoke-OnEachGenXdevModule | foreach-genxdev-module-do | Executes a script block on each GenXdev module in the workspace. |
Out-Serial | Sends a string to a serial port | |
Remove-JSONComments | Removes comments from JSON content. | |
Show-GenXDevCmdlet | cmds | Displays GenXdev PowerShell modules with their cmdlets and aliases. |
Show-Verb | showverbs | Shows a short alphabetical list of all PowerShell verbs. |
Command | Aliases | Description |
---|---|---|
Get-FreeFallHeight | Calculates the height fallen during free fall for a given time duration. | |
Get-FreeFallTime | Calculates the time it takes for an object to fall a specified distance. |
alignScript
Returns a string (with altered indentation) of a provided scriptblock string
alignScript [[-script] <String>] [[-spaces] <Int32>] [<CommonParameters>]
Changes the indentation of a scriptblock string while respecting the original code-block identations
-script <String>
The scriptblock string
Required? false
Position? 1
Default value
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-spaces <Int32>
The minimum number of spaces for each line
Required? false
Position? 2
Default value 0
Accept pipeline input? false
Aliases
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
ConvertTo-HashTable
Converts a PSCustomObject to a HashTable recursively.
ConvertTo-HashTable [-InputObject] <Object[]> [<CommonParameters>]
This function converts a PSCustomObject and all its nested PSCustomObject
properties into HashTables. It handles arrays and other collection types by
processing each element recursively.
-InputObject <Object[]>
The PSCustomObject to convert into a HashTable. Accepts pipeline input.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Aliases
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
ConvertTo-JsonEx --> tojsonex
Converts an object to a JSON string with extended options.
ConvertTo-JsonEx [-Object] <Object> [-Compress] [<CommonParameters>]
Converts a PowerShell object to a JSON string using the GenXdev.Helpers.
Serialization library. This function provides enhanced JSON serialization
capabilities with optional compression to remove whitespace for reduced
output size. The function is designed to handle complex PowerShell objects
and provide more control over the JSON conversion process compared to the
built-in ConvertTo-Json cmdlet.
-Object <Object>
The PowerShell object to convert to JSON format. This can be any type of
PowerShell object including hashtables, arrays, custom objects, or primitive
types.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Aliases
Accept wildcard characters? false
-Compress [<SwitchParameter>]
When specified, removes all unnecessary whitespace from the output JSON string
to minimize the size. This is useful when transmitting JSON data over
networks or storing in space-constrained environments.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
EnsureGenXdev
Ensures all GenXdev modules are properly loaded by invoking all Ensure*
cmdlets.
EnsureGenXdev [-Force] [-DownloadLMStudioModels] [-DownloadAllNugetPackages] [<CommonParameters>]
This function retrieves all GenXdev cmdlets that start with "Ensure" and
executes each one to guarantee that all required GenXdev modules and
dependencies are properly loaded and available for use. Any failures during
the execution are caught and displayed as informational messages.
Optionally, it can also download and load all NuGet packages defined in the
packages.json manifest file, and initialize LMStudio models for AI functionality.
-Force [<SwitchParameter>]
Forces the execution of ensure operations even if they appear to be already
completed.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-DownloadLMStudioModels [<SwitchParameter>]
Downloads and initializes LMStudio models for various AI query types.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-DownloadAllNugetPackages [<SwitchParameter>]
Downloads and loads all NuGet packages defined in the packages.json manifest
file.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
EnsureNuGetAssembly
Downloads and loads .NET assemblies from NuGet packages based on package key or ID.
EnsureNuGetAssembly [-PackageKey] <String> [-ManifestPath <String>] [-Version <String>] [-TypeName <String>] [-ForceLatest] [-Destination <String>] [<CommonParameters>]
This function ensures that the specified NuGet package assemblies are downloaded
and loaded into the current PowerShell session. It supports automatic detection
and loading with fallback to a JSON manifest for configuration overrides,
handling edge cases like stub dependencies (e.g., SQLite). Installation uses
the dotnet CLI exclusively for reliable package management and loads assemblies
directly from the global NuGet cache without copying. Lazy loading checks if
the type is already available before proceeding.
-PackageKey <String>
The unique identifier for the package, either a key from the packages.json
manifest or the direct NuGet PackageId.
Required? true
Position? 1
Default value
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-ManifestPath <String>
Optional path to the packages.json manifest. Defaults to module root if omitted.
Required? false
Position? named
Default value
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-Version <String>
Optional specific version to install and load. If omitted, uses highest from
JSON or latest from NuGet.
Required? false
Position? named
Default value
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-TypeName <String>
Optional .NET type name to verify after loading (e.g., 'Microsoft.Data.Sqlite.SQLiteConnection').
Required? false
Position? named
Default value
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-ForceLatest [<SwitchParameter>]
Switch to fallback to latest version if specified version fails.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-Destination <String>
Optional custom destination path for package installation. Defaults to persistent local or global cache.
Required? false
Position? named
Default value
Accept pipeline input? false
Aliases
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
Get-DefaultWebLanguage
Gets the default web language key based on the system's current language settings.
Get-DefaultWebLanguage [<CommonParameters>]
Retrieves the current system language and culture settings and maps them to the
corresponding web language dictionary key used by translation services.
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
Get-GenXDevCmdlet --> gcmds
Retrieves and lists all GenXdev cmdlets and their details.
Get-GenXDevCmdlet [[-CmdletName] <String>] [[-DefinitionMatches] <String>] [[-ModuleName] <String[]>] [-NoLocal] [-OnlyPublished] [-FromScripts] [-IncludeScripts] [-OnlyReturnModuleNames] [-ExactMatch] [<CommonParameters>]
Searches through installed GenXdev modules and script files to find cmdlets,
their aliases, and descriptions. Can filter by name pattern and module name.
Supports filtering by cmdlet definitions and provides flexible search options
across both local and published module paths.
-CmdletName <String>
Search pattern to filter cmdlets. Supports wildcards (*) and exact matching.
When ExactMatch is false, automatically wraps simple strings with wildcards.
Required? false
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Aliases
Accept wildcard characters? true
-DefinitionMatches <String>
Regular expression to match cmdlet definitions. Used to filter cmdlets based
on their function content or implementation details.
Required? false
Position? 2
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Aliases
Accept wildcard characters? false
-ModuleName <String[]>
One or more GenXdev module names to search. Can omit GenXdev prefix. Supports
wildcards and validates module name patterns for GenXdev modules.
Required? false
Position? 3
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Aliases
Accept wildcard characters? true
-NoLocal [<SwitchParameter>]
Skip searching in local module paths. When specified, only searches in
published or system module locations.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-OnlyPublished [<SwitchParameter>]
Limit search to published module paths only. Excludes local development
modules and focuses on released versions.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-FromScripts [<SwitchParameter>]
Search in script files instead of module files. Changes the search target
from PowerShell modules to standalone script files.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-IncludeScripts [<SwitchParameter>]
Includes the scripts directory in addition to regular modules. Expands the
search scope to cover both modules and scripts simultaneously.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-OnlyReturnModuleNames [<SwitchParameter>]
Only return unique module names instead of full cmdlet details. Provides a
summary view of available modules rather than detailed cmdlet information.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-ExactMatch [<SwitchParameter>]
Perform exact matching instead of wildcard matching. When specified, disables
automatic wildcard wrapping for simple search patterns.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
Get-ImageGeolocation
Extracts geolocation data from an image file.
Get-ImageGeolocation [-ImagePath] <String> [<CommonParameters>]
This function reads EXIF metadata from an image file to extract its latitude and
longitude coordinates. It supports images that contain GPS metadata in their EXIF
data. The function uses the System.Drawing.Image class to load the image and
parse the GPS coordinates from property items.
-ImagePath <String>
The full path to the image file to analyze. The file must be a valid image format
that supports EXIF metadata (JPEG, TIFF, etc.).
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Aliases
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
Get-ImageMetadata
Extracts comprehensive metadata from an image file.
Get-ImageMetadata [-ImagePath] <String> [<CommonParameters>]
This function reads EXIF, IPTC and other metadata from an image file. It extracts
a wide range of information including camera details, exposure settings, GPS coordinates,
dates, copyright information, and more. It supports images that contain metadata
in their EXIF data (JPEG, TIFF) as well as PNG metadata.
-ImagePath <String>
The full path to the image file to analyze. The file must be a valid image format
that supports metadata (JPEG, TIFF, PNG, etc.).
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Aliases
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
Get-WebLanguageDictionary
Returns a reversed dictionary for all languages supported by Google Search
Get-WebLanguageDictionary [<CommonParameters>]
Returns a reversed dictionary for all languages supported by Google Search
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
Import-GenXdevModules --> reloadgenxdev
Imports all GenXdev PowerShell modules into the global scope.
Import-GenXdevModules [-DebugFailedModuleDefinitions] [<CommonParameters>]
Scans the parent directory for GenXdev modules and imports each one into the
global scope. Uses location stack management to preserve the working directory
and provides visual feedback for successful and failed imports. Tracks function
count changes during the import process.
-DebugFailedModuleDefinitions [<SwitchParameter>]
When enabled, provides detailed debug output for modules that fail to import.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
Initialize-SearchPaths
Initializes and configures system search paths for package management.
Initialize-SearchPaths [[-WorkspaceFolder] <String>] [<CommonParameters>]
This function builds a comprehensive list of search paths by combining default
system locations, chocolatey paths, development tool paths, and custom package
paths. It then updates the system's PATH environment variable with these
consolidated paths.
-WorkspaceFolder <String>
The workspace folder path to use for node modules and PowerShell paths.
Required? false
Position? 1
Default value "$PSScriptRoot\..\..\..\..\..\"
Accept pipeline input? false
Aliases
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
Invoke-OnEachGenXdevModule --> foreach-genxdev-module-do
Executes a script block on each GenXdev module in the workspace.
Invoke-OnEachGenXdevModule [-Script] <ScriptBlock> [[-ModuleName] <String[]>] [-NoLocal] [-OnlyPublished] [-FromScripts] [-IncludeScripts] [-IncludeGenXdevMainModule] [<CommonParameters>]
This function iterates through GenXdev modules in the workspace and executes
a provided script block against each module. It can filter modules by name
pattern, exclude local modules, include only published modules, or process
scripts instead of modules. The function automatically navigates to the
correct module directory before executing the script block.
-Script <ScriptBlock>
The script block to execute for each GenXdev module. The module object is
passed as an argument to the script block.
Required? true
Position? 1
Default value
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-ModuleName <String[]>
Filter to apply to module names. Supports wildcards and multiple patterns.
Defaults to 'GenXdev*' to include all GenXdev modules.
Required? false
Position? 2
Default value @('GenXdev*')
Accept pipeline input? true (ByValue, ByPropertyName)
Aliases
Accept wildcard characters? true
-NoLocal [<SwitchParameter>]
Excludes local development modules from processing.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-OnlyPublished [<SwitchParameter>]
Includes only published modules that have LICENSE and README.md files.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-FromScripts [<SwitchParameter>]
Process scripts directory instead of module directories.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-IncludeScripts [<SwitchParameter>]
Includes the scripts directory in addition to regular modules.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-IncludeGenXdevMainModule [<SwitchParameter>]
Includes the main GenXdev module in addition to sub-modules.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
Out-Serial
Sends a string to a serial port
Out-Serial [[-Portname] <String>] [[-BaudRate] <Int32>] [[-MaxBytesToRead] <UInt32>] [[-ReadTimeout] <UInt32>] [[-WriteTimeout] <UInt32>] [[-Parity] <String>] [[-DataBits] <Int32>] [[-StopBits] <String>] [-Text] <Object> [-AddCRLinefeeds] [<CommonParameters>]
Allows you to send a string to a serial communication port
-Portname <String>
The port to use (for example, COM1).
Required? false
Position? 1
Default value COM5
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-BaudRate <Int32>
The baud rate.
Required? false
Position? 2
Default value 9600
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-MaxBytesToRead <UInt32>
Limits the nr of bytes to read.
Required? false
Position? 3
Default value 0
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-ReadTimeout <UInt32>
Enables reading with a specified timeout in milliseconds.
Required? false
Position? 4
Default value 0
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-WriteTimeout <UInt32>
Enables writing with a specified timeout in milliseconds.
Required? false
Position? 5
Default value 0
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-Parity <String>
One of the System.IO.Ports.SerialPort.Parity values.
Required? false
Position? 6
Default value None
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-DataBits <Int32>
The data bits value.
Required? false
Position? 7
Default value 8
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-StopBits <String>
One of the System.IO.Ports.SerialPort.StopBits values.
Required? false
Position? 8
Default value One
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-Text <Object>
Text to sent to serial port.
Required? true
Position? 9
Default value
Accept pipeline input? true (ByValue)
Aliases
Accept wildcard characters? false
-AddCRLinefeeds [<SwitchParameter>]
Add linefeeds to input text parts.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
Remove-JSONComments
Removes comments from JSON content.
Remove-JSONComments [-Json] <String[]> [<CommonParameters>]
Processes JSON content and removes both single-line and multi-line comments while
preserving the JSON structure. This is useful for cleaning up JSON files that
contain documentation comments before parsing.
-Json <String[]>
The JSON content to process as a string array. Each element represents a line of
JSON content.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Aliases
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
Show-GenXdevCmdlet --> cmds
Displays GenXdev PowerShell modules with their cmdlets and aliases.
Show-GenXdevCmdlet [[-CmdletName] <String>] [[-DefinitionMatches] <String>] [[-ModuleName] <String[]>] [-NoLocal] [-OnlyPublished] [-FromScripts] [-IncludeScripts] [-OnlyReturnModuleNames] [-ExactMatch] [-Online] [-OnlyAliases] [-ShowTable] [-PassThru] [<CommonParameters>]
Lists all installed GenXdev PowerShell modules and their associated cmdlets and
aliases. Uses Get-GenXDevCmdlet to retrieve cmdlet information and optionally
their script positions. Provides filtering and various display options.
-CmdletName <String>
Search pattern to filter cmdlets. Supports wildcards (*) and exact matching.
When ExactMatch is false, automatically wraps simple strings with wildcards.
Required? false
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Aliases
Accept wildcard characters? true
-DefinitionMatches <String>
Regular expression to match cmdlet definitions. Used to filter cmdlets based
on their function content or implementation details.
Required? false
Position? 2
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Aliases
Accept wildcard characters? false
-ModuleName <String[]>
One or more GenXdev module names to search. Can omit GenXdev prefix. Supports
wildcards and validates module name patterns for GenXdev modules.
Required? false
Position? 3
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Aliases
Accept wildcard characters? true
-NoLocal [<SwitchParameter>]
Skip searching in local module paths. When specified, only searches in
published or system module locations.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-OnlyPublished [<SwitchParameter>]
Limit search to published module paths only. Excludes local development
modules and focuses on released versions.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-FromScripts [<SwitchParameter>]
Search in script files instead of module files. Changes the search target
from PowerShell modules to standalone script files.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-IncludeScripts [<SwitchParameter>]
Includes the scripts directory in addition to regular modules. Expands the
search scope to cover both modules and scripts simultaneously.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-OnlyReturnModuleNames [<SwitchParameter>]
Only return unique module names instead of full cmdlet details. Provides a
summary view of available modules rather than detailed cmdlet information.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-ExactMatch [<SwitchParameter>]
Perform exact matching instead of wildcard matching. When specified, disables
automatic wildcard wrapping for simple search patterns.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-Online [<SwitchParameter>]
When specified, opens the GitHub documentation page instead of console output.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-OnlyAliases [<SwitchParameter>]
When specified displays only aliases of cmdlets who have them.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-ShowTable [<SwitchParameter>]
When specified, displays results in a table format with Name and Description.
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-PassThru [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? false
Aliases
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
Show-Verb --> showverbs
Shows a short alphabetical list of all PowerShell verbs.
Show-Verb [[-Verb] <String[]>] [<CommonParameters>]
Displays PowerShell approved verbs in a comma-separated list. If specific verbs
are provided as input, only matching verbs will be shown. Supports wildcards.
-Verb <String[]>
One or more verb patterns to filter the output. Supports wildcards.
If omitted, all approved verbs are shown.
Required? false
Position? 1
Default value @()
Accept pipeline input? true (ByValue, ByPropertyName)
Aliases
Accept wildcard characters? true
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
Get-FreeFallHeight
Calculates the height fallen during free fall for a given time duration.
Get-FreeFallHeight [-DurationInSeconds] <Double> [[-TerminalVelocityInMs] <Double>] [<CommonParameters>]
This function calculates the distance fallen during free fall using a
numerical method that accounts for air resistance and terminal velocity. The
calculation uses small time steps to accurately model the physics of falling
objects with realistic terminal velocity constraints.
-DurationInSeconds <Double>
The time duration of the fall in seconds for which to calculate the height.
Required? true
Position? 1
Default value 0
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-TerminalVelocityInMs <Double>
The terminal velocity in meters per second. Defaults to 53 m/s which is the
typical terminal velocity for a human in free fall.
Required? false
Position? 2
Default value 53
Accept pipeline input? false
Aliases
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
Get-FreeFallTime
Calculates the time it takes for an object to fall a specified distance.
Get-FreeFallTime [-HeightInMeters] <Double> [[-TerminalVelocityInMs] <Double>] [<CommonParameters>]
This function calculates the time it takes for an object to fall from a given
height, taking into account terminal velocity due to air resistance. It uses a
numerical method with small time steps for accurate calculation.
-HeightInMeters <Double>
The initial height of the falling object in meters.
Required? true
Position? 1
Default value 0
Accept pipeline input? false
Aliases
Accept wildcard characters? false
-TerminalVelocityInMs <Double>
The terminal velocity of the falling object in meters per second. Default value
is 53 m/s, which is the approximate terminal velocity of a human in free fall.
Required? false
Position? 2
Default value 53
Accept pipeline input? false
Aliases
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).