Skip To Content
PowerShell Gallery
Toggle navigation
Packages
Publish
Documentation
Sign in
Search PowerShell packages:
CMBuild
1.0.8
Private/getScriptDirectory.ps1
function
getScriptDirectory
{
$Invocation
=
(
Get-Variable
MyInvocation
-Scope
1
)
.
Value
try
{
Write-Output
$(
Split-Path
$Invocation
.
MyCommand
.
Path
)
}
catch
{
Write-Output
$pwd
}
}