mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-25 05:26:47 +01:00
Added go-home.ps1, go-downloads.ps1, and go-music.ps1
This commit is contained in:
parent
57bde59bce
commit
33f5b5b408
@ -29,6 +29,9 @@ enable-crash-dumps.ps1, enables the writing of crash dumps
|
||||
encrypt-file.ps1, encrypts the given file
|
||||
fetch-repos.ps1, fetches all Git repositories under the current/given directory (including submodules)
|
||||
generate-qrcode.ps1, generates a QR code
|
||||
go-downloads.ps1, go to the user's downloads folder
|
||||
go-home.ps1, go to the user's home folder
|
||||
go-music.ps1, go to the user's music folder
|
||||
hibernate.ps1, enables hibernate mode for the local computer (requires admin rights)
|
||||
inspect-exe.ps1, prints basic information of the given executable file
|
||||
list-anagrams.ps1, lists all anagrams of the given word
|
||||
|
|
@ -1,7 +1,7 @@
|
||||
Collection of PowerShell Scripts
|
||||
================================
|
||||
|
||||
**This repository contains 130+ useful and cross-platform PowerShell scripts in the [Scripts/ folder](Scripts/) - to be used by command-line interface (CLI), for remote control (RC), by context menu, by voice control, by automation software like Jenkins, automatically as daily tasks, or simply to learn PowerShell. See the [FAQ page](Misc/FAQ.md) if you need help or have any questions.**
|
||||
**This repository contains 140+ useful and cross-platform PowerShell scripts in the [Scripts/ folder](Scripts/) - to be used by command-line interface (CLI), for remote control (RC), by context menu, by voice control, by automation software like Jenkins, automatically as daily tasks, or simply to learn PowerShell. See the [FAQ page](Misc/FAQ.md) if you need help or have any questions.**
|
||||
|
||||
Scripts for Audio & Voice 🔊
|
||||
---------------------------
|
||||
@ -74,6 +74,9 @@ Scripts for Files & Folders 📁
|
||||
* [create-symlink.ps1](Scripts/create-symlink.ps1) - creates a symbolic link
|
||||
* [decrypt-file.ps1](Scripts/decrypt-file.ps1) - encrypts the given file
|
||||
* [encrypt-file.ps1](Scripts/encrypt-file.ps1) - encrypts the given file
|
||||
* [go-downloads.ps1](Scripts/go-downloads.ps1) - go to the user's downloads folder
|
||||
* [go-home.ps1](Scripts/go-home.ps1) - go to the user's home folder
|
||||
* [go-music.ps1](Scripts/go-music.ps1) - go to the user's music folder
|
||||
* [inspect-exe.ps1](Scripts/inspect-exe.ps1) - prints basic information of the given executable file
|
||||
* [list-empty-dirs.ps1](Scripts/list-empty-dirs.ps1) - lists empty subfolders within the given directory tree
|
||||
* [list-empty-files.ps1](Scripts/list-empty-files.ps1) - lists empty files within the given directory tree
|
||||
|
15
Scripts/go-downloads.ps1
Executable file
15
Scripts/go-downloads.ps1
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/powershell
|
||||
<#
|
||||
.SYNTAX ./go-downloads.ps1
|
||||
.DESCRIPTION go to the user's downloads folder
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
set-location $HOME/Downloads/
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
15
Scripts/go-home.ps1
Executable file
15
Scripts/go-home.ps1
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/powershell
|
||||
<#
|
||||
.SYNTAX ./go-home.ps1
|
||||
.DESCRIPTION go to the user's home folder
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
set-location $HOME
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
15
Scripts/go-music.ps1
Executable file
15
Scripts/go-music.ps1
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/powershell
|
||||
<#
|
||||
.SYNTAX ./go-music.ps1
|
||||
.DESCRIPTION go to the user's music folder
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
set-location $HOME/Music/
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
@ -66,7 +66,7 @@ try {
|
||||
$Vars = ListAutomaticVariables
|
||||
$Vars | format-table -property Variable,Content
|
||||
|
||||
write-host -foregroundColor green "OK - $($Vars.Count) automatic variables total"
|
||||
write-host -foregroundColor green "OK - $($Vars.Count) PowerShell automatic variables total"
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
0
Scripts/my-profile.ps1
Normal file → Executable file
0
Scripts/my-profile.ps1
Normal file → Executable file
@ -12,7 +12,7 @@ try {
|
||||
|
||||
copy-item "$PathToRepo/Scripts/my-profile.ps1" "$PathToProfile" -force
|
||||
|
||||
write-host -foregroundColor green "OK - updated profile 'CurrentUserCurrentHost' (gets active on next login)"
|
||||
write-host -foregroundColor green "OK - updated profile 'CurrentUserCurrentHost', gets active on next login"
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Loading…
Reference in New Issue
Block a user