mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-18 07:58:25 +02:00
Add list-drives.ps1
This commit is contained in:
parent
be123b5af8
commit
153bdabaec
@ -4,6 +4,7 @@ check-drive-space.ps1, checks the given drive for free space left
|
|||||||
check-ipv4-address.ps1, checks the given IPv4 address for validity
|
check-ipv4-address.ps1, checks the given IPv4 address for validity
|
||||||
check-ipv6-address.ps1, checks the given IPv6 address for validity
|
check-ipv6-address.ps1, checks the given IPv6 address for validity
|
||||||
check-mac-address.ps1, checks the given MAC address for validity
|
check-mac-address.ps1, checks the given MAC address for validity
|
||||||
|
check-swap-space.ps1, checks the swap space for free space left
|
||||||
check-symlinks.ps1, checks every symlink in the given directory tree
|
check-symlinks.ps1, checks every symlink in the given directory tree
|
||||||
check-windows-system-files.ps1, checks the validity of the Windows system files
|
check-windows-system-files.ps1, checks the validity of the Windows system files
|
||||||
check-xml-file.ps1, checks the given XML file for validity
|
check-xml-file.ps1, checks the given XML file for validity
|
||||||
@ -46,6 +47,7 @@ list-branches.ps1, lists the Git branches in the current/given repository
|
|||||||
list-commits.ps1, lists the Git commits in the current/given repository
|
list-commits.ps1, lists the Git commits in the current/given repository
|
||||||
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-drives.ps1, lists all drives
|
||||||
list-environment-variables.ps1, lists all environment variables
|
list-environment-variables.ps1, lists all environment variables
|
||||||
list-empty-dirs.ps1, lists empty subfolders within the given directory tree
|
list-empty-dirs.ps1, lists empty subfolders within the given directory tree
|
||||||
list-empty-files.ps1, lists empty files within the given directory tree
|
list-empty-files.ps1, lists empty files within the given directory tree
|
||||||
|
|
@ -31,9 +31,11 @@ Collection of PowerShell Scripts
|
|||||||
---------------------------------
|
---------------------------------
|
||||||
* [add-firewall-rules.ps1](Scripts/add-firewall-rules.ps1) - adds firewall rules for the given executables (requires admin rights)
|
* [add-firewall-rules.ps1](Scripts/add-firewall-rules.ps1) - adds firewall rules for the given executables (requires admin rights)
|
||||||
* [check-drive-space.ps1](Scripts/check-drive-space.ps1) - checks the given drive for free space left
|
* [check-drive-space.ps1](Scripts/check-drive-space.ps1) - checks the given drive for free space left
|
||||||
|
* [check-swap-space.ps1](Scripts/check-swap-space.ps1) - checks the swap space for free space left
|
||||||
* [check-windows-system-files.ps1](Scripts/check-windows-system-files.ps1) - checks the validity of the Windows system files (requires admin rights)
|
* [check-windows-system-files.ps1](Scripts/check-windows-system-files.ps1) - checks the validity of the Windows system files (requires admin rights)
|
||||||
* [enable-crash-dumps.ps1](Scripts/enable-crash-dumps.ps1) - enables the writing of crash dumps
|
* [enable-crash-dumps.ps1](Scripts/enable-crash-dumps.ps1) - enables the writing of crash dumps
|
||||||
* [hibernate.ps1](Scripts/hibernate.ps1) - enables hibernate mode for the local computer (requires admin rights)
|
* [hibernate.ps1](Scripts/hibernate.ps1) - enables hibernate mode for the local computer (requires admin rights)
|
||||||
|
* [list-drives.ps1](Scripts/list-drives.ps1) - lists all drives
|
||||||
* [list-network-shares.ps1](Scripts/list-network-shares.ps1) - lists the network shares of the local computer
|
* [list-network-shares.ps1](Scripts/list-network-shares.ps1) - lists the network shares of the local computer
|
||||||
* [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-installed-apps.ps1](Scripts/list-installed-apps.ps1) - lists the installed Windows Store apps
|
* [list-installed-apps.ps1](Scripts/list-installed-apps.ps1) - lists the installed Windows Store apps
|
||||||
|
15
Scripts/list-drives.ps1
Executable file
15
Scripts/list-drives.ps1
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/powershell
|
||||||
|
<#
|
||||||
|
.SYNTAX ./list-drives.ps1
|
||||||
|
.DESCRIPTION lists all drives
|
||||||
|
.LINK https://github.com/fleschutz/PowerShell
|
||||||
|
.NOTES Author: Markus Fleschutz / License: CC0
|
||||||
|
#>
|
||||||
|
|
||||||
|
try {
|
||||||
|
get-PSDrive -PSProvider FileSystem
|
||||||
|
exit 0
|
||||||
|
} catch {
|
||||||
|
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
exit 1
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user