Private/Get-PublicPath.ps1
function Get-PublicPath { <# .SYNOPSIS Gets the PstModules PublicPath variable .DESCRIPTION Gets the PstModules PublicPath variable amd writes the output .EXAMPLE Get-PublicPath #> begin { Write-Debug -Message "Begin '$($MyInvocation.MyCommand.Name)' at '$(Get-Date)'" } process { try { Write-Information -Message "Get variable 'PublicPath'" Write-Output $Script:PublicPath } 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)'" } } } |