mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-23 05:01:37 +01:00
Add enable-god-mode.ps1
This commit is contained in:
parent
690c28a4e9
commit
5af77ba065
@ -33,6 +33,7 @@ decrypt-file.ps1, decrypts the given file
|
||||
display-time.ps1, displays the current time for 10 seconds by default
|
||||
download.ps1, downloads the file/directory from the given URL
|
||||
enable-crash-dumps.ps1, enables the writing of crash dumps
|
||||
enable-god-mode.ps1, enables the god mode (adds a new icon to the desktop)
|
||||
encrypt-file.ps1, encrypts the given file
|
||||
fetch-repo.ps1, fetches updates for the current/given Git repository (including submodules)
|
||||
fetch-repos.ps1, fetches updates for all Git repositories under the current/given directory (including submodules)
|
||||
|
|
@ -64,6 +64,7 @@ Collection of PowerShell Scripts
|
||||
* [close-thunderbird.ps1](Scripts/close-thunderbird.ps1) - closes Mozilla Thunderbird gracefully
|
||||
* [close-vlc.ps1](Scripts/close-vlc.ps1) - closes the VLC media player gracefully
|
||||
* [close-windows-terminal.ps1](Scripts/close-windows-terminal.ps1) - closes Windows Terminal gracefully
|
||||
* [enable-god-mode.ps1](Scripts/enable-god-mode.ps1) - enables the god mode (adds a new icon to the desktop)
|
||||
* [list-clipboard.ps1](Scripts/list-clipboard.ps1) - lists the contents of the clipboard
|
||||
* [new-email.ps1](Scripts/new-email.ps1) - starts the default email client to write a new email
|
||||
* [open-browser.ps1](Scripts/open-browser.ps1) - starts the default Web browser
|
||||
|
24
Scripts/enable-god-mode.ps1
Executable file
24
Scripts/enable-god-mode.ps1
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/powershell
|
||||
<#
|
||||
.SYNTAX ./enable-god-mode.ps1
|
||||
.DESCRIPTION enables the god mode (adds a new icon to the desktop)
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
#Requires -RunAsAdministrator
|
||||
|
||||
try {
|
||||
$godmodeSplat = @{
|
||||
Path = "$env:USERPROFILEDesktop"
|
||||
Name = "GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}"
|
||||
ItemType = 'Directory'
|
||||
}
|
||||
new-item @godmodeSplat
|
||||
|
||||
write-host -foregroundColor green "OK - see the new desktop icon"
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
Loading…
Reference in New Issue
Block a user