Added list-environment-variables.ps1

This commit is contained in:
Markus Fleschutz 2021-02-01 07:30:14 +01:00
parent fdda80f09e
commit b57c776d64
3 changed files with 18 additions and 1 deletions

View File

@ -23,9 +23,10 @@ generate-qrcode.ps1, generates a QR code
inspect-exe.ps1, prints basic information of the given executable file inspect-exe.ps1, prints basic information of the given executable file
list-anagrams.ps1, lists all anagrams of the given word list-anagrams.ps1, lists all anagrams of the given word
list-automatic-variables.ps1, lists PowerShell automatic variables list-automatic-variables.ps1, lists PowerShell automatic variables
list-empty-dirs.ps1, lists empty subfolders in a directory tree
list-current-timezone.ps1, lists the current time zone details list-current-timezone.ps1, lists the current time zone details
list-clipboard.ps1, lists the contents of the clipboard list-clipboard.ps1, lists the contents of the clipboard
list-environment-variables.ps1, lists all environment variables
list-empty-dirs.ps1, lists empty subfolders in a directory tree
list-files.ps1, lists all files in the given folder and also in every subfolder list-files.ps1, lists all files in the given folder and also in every subfolder
list-formatted.ps1, lists the current working directory formatted in columns list-formatted.ps1, lists the current working directory formatted in columns
list-fritzbox-calls.ps1, lists the FRITZ!Box calls list-fritzbox-calls.ps1, lists the FRITZ!Box calls

1 Filename,Description
23 inspect-exe.ps1, prints basic information of the given executable file
24 list-anagrams.ps1, lists all anagrams of the given word
25 list-automatic-variables.ps1, lists PowerShell automatic variables
list-empty-dirs.ps1, lists empty subfolders in a directory tree
26 list-current-timezone.ps1, lists the current time zone details
27 list-clipboard.ps1, lists the contents of the clipboard
28 list-environment-variables.ps1, lists all environment variables
29 list-empty-dirs.ps1, lists empty subfolders in a directory tree
30 list-files.ps1, lists all files in the given folder and also in every subfolder
31 list-formatted.ps1, lists the current working directory formatted in columns
32 list-fritzbox-calls.ps1, lists the FRITZ!Box calls

View File

@ -33,6 +33,7 @@ The following PowerShell scripts can be found in the [Scripts/](Scripts/) subfol
* [list-automatic-variables.ps1](Scripts/list-automatic-variables.ps1) - lists PowerShell automatic variables * [list-automatic-variables.ps1](Scripts/list-automatic-variables.ps1) - lists PowerShell automatic variables
* [list-clipboard.ps1](Scripts/list-clipboard.ps1) - lists the contents of the clipboard * [list-clipboard.ps1](Scripts/list-clipboard.ps1) - lists the contents of the clipboard
* [list-current-timezone.ps1](Scripts/list-current-timezone.ps1) - lists the current time zone details * [list-current-timezone.ps1](Scripts/list-current-timezone.ps1) - lists the current time zone details
* [list-environment-variables.ps1](Scripts/list-environment-variables.ps1) - lists all environment variables
* [list-empty-dirs.ps1](Scripts/list-empty-dirs.ps1) - lists empty subfolders in a directory tree * [list-empty-dirs.ps1](Scripts/list-empty-dirs.ps1) - lists empty subfolders in a directory tree
* [list-installed-software.ps1](Scripts/list-installed-software.ps1) - lists the installed software * [list-installed-software.ps1](Scripts/list-installed-software.ps1) - lists the installed software
* [list-files.ps1](Scripts/list-files.ps1) - lists all files in the given folder and also in every subfolder * [list-files.ps1](Scripts/list-files.ps1) - lists all files in the given folder and also in every subfolder

View File

@ -0,0 +1,15 @@
#!/snap/bin/powershell
<#
.SYNTAX ./list-environment-variables.ps1
.DESCRIPTION lists all environment variables
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
try {
Get-ChildItem env:
exit 0
} catch {
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}