Private/Get-ModuleRootFilePath.ps1
function Get-ModuleRootFilePath { <# .SYNOPSIS Gets the PstModules ModuleRootFilePath variable .DESCRIPTION Gets the PstModules ModuleRootFilePath variable amd writes the output .EXAMPLE Get-ModuleRootFilePath #> begin { Write-Debug -Message "Begin '$($MyInvocation.MyCommand.Name)' at '$(Get-Date)'" } process { try { Write-Information -Message "Get variable 'ModuleRootFilePath'" Write-Output $Script:ModuleRootFilePath } catch { if ($_.Exception -and $_.Exception.Message) { Write-Error "An error occurred: $($_.Exception.Message)" } else { Write-Error "An error occurred, but no additional information is available." } } } end { if ($?) { Write-Debug -Message "End '$($MyInvocation.MyCommand.Name)' at '$(Get-Date)'" } } } |