Add list-recycle-bin.ps1

This commit is contained in:
Markus Fleschutz 2021-05-02 11:14:48 +02:00
parent 9c7a29cc8c
commit bc7ed352fa
3 changed files with 16 additions and 0 deletions

View File

@ -110,6 +110,7 @@ list-processes.ps1, lists the local computer processes
list-profiles.ps1, lists your PowerShell profiles list-profiles.ps1, lists your PowerShell profiles
list-random-passwords.ps1, prints a list of random passwords list-random-passwords.ps1, prints a list of random passwords
list-random-pins.ps1, prints a list of random PIN's list-random-pins.ps1, prints a list of random PIN's
list-recycle-bin.ps1, lists the content of the recycle bin folder
list-scripts.ps1, lists all PowerShell scripts in this repository list-scripts.ps1, lists all PowerShell scripts in this repository
list-services.ps1, lists the services on the local computer list-services.ps1, lists the services on the local computer
list-sql-tables.ps1, lists the SQL server tables list-sql-tables.ps1, lists the SQL server tables

1 Script Description
110 list-profiles.ps1 lists your PowerShell profiles
111 list-random-passwords.ps1 prints a list of random passwords
112 list-random-pins.ps1 prints a list of random PIN's
113 list-recycle-bin.ps1 lists the content of the recycle bin folder
114 list-scripts.ps1 lists all PowerShell scripts in this repository
115 list-services.ps1 lists the services on the local computer
116 list-sql-tables.ps1 lists the SQL server tables

View File

@ -122,6 +122,7 @@ Mega Collection of PowerShell Scripts
* [list-empty-files.ps1](Scripts/list-empty-files.ps1) - lists empty files within the given directory tree * [list-empty-files.ps1](Scripts/list-empty-files.ps1) - lists empty files within the given directory tree
* [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
* [list-hidden-files.ps1](Scripts/list-hidden-files.ps1) - lists hidden files within the given directory tree * [list-hidden-files.ps1](Scripts/list-hidden-files.ps1) - lists hidden files within the given directory tree
* [list-recycle-bin.ps1](Scripts/list-recycle-bin.ps1) - lists the content of the recycle bin folder
* [list-unused-files.ps1](Scripts/list-unused-files.ps1) - lists unused files in a directory tree * [list-unused-files.ps1](Scripts/list-unused-files.ps1) - lists unused files in a directory tree
* [list-workdir.ps1](Scripts/list-workdir.ps1) - lists the current working directory * [list-workdir.ps1](Scripts/list-workdir.ps1) - lists the current working directory
* [make-install.ps1](Scripts/make-install.ps1) - installs built executables and libs to the installation directory * [make-install.ps1](Scripts/make-install.ps1) - installs built executables and libs to the installation directory

14
Scripts/list-recycle-bin.ps1 Executable file
View File

@ -0,0 +1,14 @@
<#
.SYNTAX list-recycle-bin.ps1
.DESCRIPTION lists the content of the recycle bin folder
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
try {
(New-Object -ComObject Shell.Application).NameSpace(0x0a).Items() | Select-Object Name,Size,Path
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}