PowerShellCookbook.psm1 150 Bytes
Newer Older
O'Reilly Media, Inc.'s avatar
O'Reilly Media, Inc. committed
1 2 3 4 5
$env:PATH += ";$psScriptRoot"

$MyInvocation.MyCommand.ScriptBlock.Module.OnRemove = {
    $env:PATH = $env:PATH.Replace(";$psScriptRoot", "")
}