Pattern: Use of global function
Issue: -
Globally scoped functions override existing functions within the sessions with matching names. This name collision can cause difficult to debug issues for consumers of modules.
To understand more about scoping, see Get-Help about_Scopes
.
Use other scope modifiers for functions.
Example of incorrect code:
function global:functionName {}
Example of correct code:
function functionName {}