For PowerShell 3.0 users – following works for both modules and script files:
function Get-ScriptDirectory {
Split-Path -parent $PSCommandPath
}
For PowerShell 3.0 users – following works for both modules and script files:
function Get-ScriptDirectory {
Split-Path -parent $PSCommandPath
}