SyntaxFix
Write A Post
Hire A Developer
Questions
For PowerShell 3.0 users - following works for both modules and script files:
PowerShell 3.0
function Get-ScriptDirectory { Split-Path -parent $PSCommandPath }