This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by steve.westner on 2015-02-06. | |
*/ | |
function pushDownDecorator(){ | |
return { | |
ok: function (target, $pushDownInstance) { | |
target.ok = $pushDownInstance.close; | |
}, | |
cancel: function (target, $pushDownInstance) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-EnvironmentVariableNames([System.EnvironmentVariableTarget] $Scope) { | |
switch ($Scope) { | |
'User' { Get-Item 'HKCU:\Environment' | Select-Object -ExpandProperty Property } | |
'Machine' { Get-Item 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' | Select-Object -ExpandProperty Property } | |
'Process' { Get-ChildItem Env:\ | Select-Object -ExpandProperty Key } | |
default { throw "Unsupported environment scope: $Scope" } | |
} | |
} | |
function Get-EnvironmentVariable([string] $Name, [System.EnvironmentVariableTarget] $Scope) { |