mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-25 03:18:16 +02:00
Improved list-automatic-variables.ps1
This commit is contained in:
parent
60eb59b52a
commit
7e1b9fe79f
@ -63,7 +63,9 @@ function ListAutomaticVariables {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ListAutomaticVariables | format-table -property Variable,Content
|
$Vars = ListAutomaticVariables
|
||||||
|
$Vars | format-table -property Variable,Content
|
||||||
|
write-output "($($Vars.Count) automatic variables total)"
|
||||||
exit 0
|
exit 0
|
||||||
} catch {
|
} catch {
|
||||||
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user