# encoding: ascii
# api: powershell
# title: LibraryInvocation.ps1
# description: From Windows PowerShell Cookbook (O’Reilly) by Lee Holmes
# version: 0.1
# type: script
# author: Lee Holmes
# license: CC0
# function: Get-ScriptName
# x-poshcode-id: 2192
# x-archived: 2016-03-19T00:33:13
# x-published: 2011-09-09T21:41:00
#
#
## From Windows PowerShell Cookbook (O'Reilly)
## by Lee Holmes (http://www.leeholmes.com/guide)
Set-StrictMode -Version Latest
## Return the name of the currently executing script
## By placing this in a function, we drastically simplify
## the logic it takes to determine the currently running
## script
function Get-ScriptName
{
$myInvocation.ScriptName
}
function Get-ScriptPath
{
Split-Path $myInvocation.ScriptName
}