What scopes does a variable exist in
for larry weiss, et al
give variable name, , show visible instances of variable in the local , parent scopes, , it's value in each scope.
function get-variablescopes($var){ $stack = new-object collections.stack $scope = 1 while (1){ try { $props = @{ name = $var scope = $scope -1 value = (get-variable $var -scope $scope -ea 0).value } $stack.push((new-object psobject -property $props | select name,scope,value)) } catch {return $stack} $scope ++ } }
[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
that’s cool
justin rich
http://jrich523.wordpress.com
powershell v3 guide (technet)
please remember mark replies answers if , unmark them if provide no help.
Windows Server > Windows PowerShell
Comments
Post a Comment