Get-ForgeContext.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
function Get-ForgeContext { <# .SYNOPSIS Get-ForgeContext synopsis. .DESCRIPTION Get-ForgeContext description. .EXAMPLE Get-FogeContext #... #> [CmdletBinding()] Param( [String]$ContextName = $(Get-CallerModuleName) ) $Context = $Script:ForgeContexts[$ContextName] if (!($Context)) { throw "Unable to find context for name '$ContextName', did you call Initialize-ForgeContext ?" } return $Context } |