This PowerShell script counts the number of characters in the given string.
GivenString Specifies the given string.
PS> ./count-characters.ps1 "Hello World"✅ 11 characters counted in 'Hello World'.Author: Markus Fleschutz | License: CC0
This PowerShell script copies image files from to sorted by year and month.
sourceDir Specifies the path to the source folder
targetDir Specifies the path to the target folder
PS> ./copy-photos-sorted.ps1 D:\iPhone\DCIM C:\MyPhotos⏳ Copying IMG_20240903_134445.jpg to C:\MyPhotos\2024\09 SEP\...✅ Copied 1 photo to 📂C:\MyPhotos in 13s (0 skipped).Author: Markus Fleschutz | License: CC0
This PowerShell script converts the comment-based help of a PowerShell script to Markdown.
filename Specifies the path to the PowerShell script
PS> ./convert-ps2md.ps1 myscript.ps1Author: Markus Fleschutz | License: CC0
This PowerShell script converts your command history into a PowerShell script. It saves all your commands into a script for automation (executed by e.g Jenkins or AutoHotkey).
path Specifies the file path of the new script ('script-from-history.ps1' by default)
PS> ./convert-history2ps1.ps1✅ Converted your command history into the PowerShell script: script-from-history.ps1Author: Markus Fleschutz | License: CC0
This PowerShell script converts a .CSV file into a text file and prints it.
Path Specifies the path to the .CSV file
PS> ./convert-csv2txt salaries.csvAuthor: Markus Fleschutz | License: CC0
This PowerShell script configures your Git user settings.
fullName Specifies the user's full name
emailAddress Specifies the user's email address
favoriteEditor Specifies the user's favorite text editor
PS> ./configure-git.ps1 "Joe Doe" joe@doe.com vim⏳ (1/5) Searching for Git executable... git version 2.42.0.windows.1⏳ (2/5) Asking for user details...⏳ (3/5) Saving basic settings (autocrlf,symlinks,longpaths,etc.)...⏳ (4/5) Saving user settings (name,email,editor)...⏳ (5/5) Saving user shortcuts ('git br', 'git ls', 'git st', etc.)...✅ Saved your Git configuration to ~/.gitconfig in 11s.Author: Markus Fleschutz | License: CC0
This PowerShell script deletes all untracked files and folders in a local Git repository (including submodules). NOTE: To be used with care! This cannot be undone!
path Specifies the file path to the local Git repository (current working directory by default)
PS> ./clean-repo.ps1 C:\Repos\rust⏳ (1/4) Searching for Git executable... git version 2.47.0⏳ (2/4) Checking local repository... C:\Repos\rust⏳ (3/4) Removing untracked files in repository...⏳ (4/4) Removing untracked files in submodules...✅ Repo 📂rust is clean now.Author: Markus Fleschutz | License: CC0
This PowerShell script queries the status of the VPN connection(s) and prints it.
PS> ./check-vpn.ps1✅ Internet VPN to NASA L2TP is connectedAuthor: Markus Fleschutz | License: CC0
This PowerShell script queries the computer's uptime (time between now and last boot up time) and prints it.
PS> ./check-uptime.ps1✅ OfficePC is up for 13 days since 1/25/2024Author: Markus Fleschutz | License: CC0
This PowerShell script queries the local time zone and prints it.
PS> ./check-time-zone.ps1✅ 3:27 PM West Europe Summer Time (UTC+01:00:00 +1h DST)Author: Markus Fleschutz | License: CC0