From 7e7b318aaf2e9eb5656cf56b4f30301d9dd25454 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Wed, 6 Aug 2025 15:18:49 +0200 Subject: [PATCH] Updated the manuals --- docs/add-firewall-rules.md | 2 +- docs/alert.md | 2 +- docs/build-repo.md | 69 ++- docs/build-repos.md | 4 +- docs/calculate-BMI.md | 61 ++ docs/cd-autostart.md | 4 +- docs/cd-crashdumps.md | 4 +- docs/cd-desktop.md | 4 +- docs/cd-docs.md | 12 +- docs/cd-downloads.md | 4 +- docs/cd-dropbox.md | 4 +- docs/cd-etc.md | 20 +- docs/cd-fonts.md | 4 +- docs/cd-home.md | 4 +- docs/cd-jenkins.md | 8 +- docs/cd-logs.md | 33 +- docs/cd-music.md | 6 +- docs/cd-nextcloud.md | 16 +- docs/cd-onedrive.md | 6 +- docs/cd-pics.md | 10 +- docs/cd-public.md | 10 +- docs/cd-recent.md | 25 +- docs/cd-recycle-bin.md | 37 +- docs/cd-repo.md | 10 +- docs/cd-repos.md | 10 +- docs/cd-root.md | 6 +- docs/cd-screenshots.md | 27 +- docs/cd-scripts.md | 10 +- docs/cd-ssh.md | 12 +- docs/cd-sync.md | 18 +- docs/cd-temp.md | 41 +- docs/cd-templates.md | 6 +- docs/cd-trash.md | 37 +- docs/cd-up.md | 14 +- docs/cd-up2.md | 16 +- docs/cd-up3.md | 16 +- docs/cd-up4.md | 16 +- docs/cd-users.md | 11 +- docs/cd-videos.md | 16 +- docs/cd-windows.md | 29 +- docs/change-wallpaper.md | 2 +- docs/check-admin.md | 2 +- docs/check-apps.md | 2 +- docs/check-bios.md | 2 +- docs/check-cpu.md | 2 +- docs/check-credentials.md | 2 +- docs/check-day.md | 2 +- docs/check-dns.md | 2 +- docs/check-drive-space.md | 2 +- docs/check-drives.md | 2 +- docs/check-dusk.md | 2 +- docs/check-easter-sunday.md | 2 +- docs/check-file-system.md | 2 +- docs/check-file.md | 2 +- docs/check-firewall.md | 2 +- docs/check-gpu.md | 2 +- docs/check-hardware.md | 2 +- docs/check-health.md | 2 +- docs/check-independence-day.md | 2 +- docs/check-ipv4-address.md | 2 +- docs/check-ipv6-address.md | 2 +- docs/check-iss-position.md | 2 +- docs/check-mac-address.md | 2 +- docs/check-midnight.md | 2 +- docs/check-month.md | 2 +- docs/check-moon-phase.md | 2 +- docs/check-motherboard.md | 2 +- docs/check-network.md | 2 +- docs/check-noon.md | 2 +- docs/check-os.md | 2 +- docs/check-outlook.md | 2 +- docs/check-password.md | 2 +- docs/check-pending-reboot.md | 2 +- docs/check-pnp-devices.md | 2 +- docs/check-power.md | 2 +- docs/check-powershell.md | 2 +- docs/check-ps1-file.md | 2 +- docs/check-ram.md | 2 +- docs/check-repo.md | 18 +- docs/check-repos.md | 14 +- docs/check-santa.md | 2 +- docs/check-smart-devices.md | 2 +- docs/check-software.md | 2 +- docs/check-subnet-mask.md | 2 +- docs/check-swap-space.md | 2 +- docs/check-symlinks.md | 44 +- docs/check-time-zone.md | 2 +- docs/check-uptime.md | 2 +- docs/check-vpn.md | 2 +- docs/check-weather.md | 2 +- docs/check-week.md | 2 +- docs/check-wind.md | 2 +- docs/check-windows-system-files.md | 2 +- docs/check-xml-file.md | 2 +- docs/check-xml-files.md | 2 +- docs/clean-repo.md | 21 +- docs/clean-repos.md | 4 +- docs/clear-dns-cache.md | 14 +- docs/clear-recycle-bin.md | 2 +- docs/clone-repos.md | 2 +- docs/clone-shallow.md | 2 +- docs/close-calculator.md | 2 +- docs/close-chrome.md | 2 +- docs/close-cortana.md | 2 +- docs/close-edge.md | 2 +- docs/close-file-explorer.md | 2 +- docs/close-firefox.md | 2 +- docs/close-git-extensions.md | 2 +- docs/close-magnifier.md | 2 +- docs/close-microsoft-paint.md | 2 +- docs/close-microsoft-store.md | 2 +- docs/close-netflix.md | 2 +- docs/close-notepad.md | 2 +- docs/close-obs-studio.md | 2 +- docs/close-one-calendar.md | 2 +- docs/close-outlook.md | 2 +- docs/close-paint-three-d.md | 2 +- docs/close-program.md | 2 +- docs/close-serenade.md | 2 +- docs/close-snipping-tool.md | 2 +- docs/close-spotify.md | 2 +- docs/close-task-manager.md | 2 +- docs/close-three-d-viewer.md | 2 +- docs/close-thunderbird.md | 2 +- docs/close-visual-studio.md | 2 +- docs/close-vlc.md | 2 +- docs/close-windows-terminal.md | 2 +- docs/configure-git.md | 2 +- docs/connect-vpn.md | 2 +- docs/convert-csv2txt.md | 2 +- docs/convert-dir27z.md | 2 +- docs/convert-dir2zip.md | 2 +- docs/convert-docx2md.md | 2 +- docs/convert-frames2mp4.md | 2 +- docs/convert-history2ps1.md | 2 +- docs/convert-image2ascii.md | 2 +- docs/convert-image2blurred-frames.md | 2 +- docs/convert-image2pixelated-frames.md | 2 +- docs/convert-images2webp.md | 2 +- docs/convert-md2docx.md | 2 +- docs/convert-md2html.md | 2 +- docs/convert-md2pdf.md | 2 +- docs/convert-mysql2csv.md | 2 +- docs/convert-ps2bat.md | 2 +- docs/convert-ps2md.md | 2 +- docs/convert-sql2csv.md | 2 +- docs/convert-txt2wav.md | 2 +- docs/copy-broken-file.md | 686 +++++++++++++++++++++ docs/copy-photos-sorted.md | 2 +- docs/copy-videos-sorted.md | 2 +- docs/count-characters.md | 2 +- docs/count-lines.md | 2 +- docs/decrypt-file.md | 2 +- docs/disable-ipv6.md | 2 +- docs/disconnect-vpn.md | 2 +- docs/download-dir.md | 2 +- docs/download-file.md | 2 +- docs/edit.md | 3 +- docs/enable-crash-dumps.md | 22 +- docs/enable-god-mode.md | 2 +- docs/enable-ipv6.md | 2 +- docs/encrypt-file.md | 2 +- docs/enter-chat.md | 2 +- docs/enter-host.md | 12 +- docs/export-to-manuals.md | 2 +- docs/fetch-repo.md | 4 +- docs/fetch-repos.md | 2 +- docs/firefox-installer.md | 2 +- docs/get-md5.md | 2 +- docs/get-sha1.md | 2 +- docs/get-sha256.md | 2 +- docs/get-sha512.md | 2 +- docs/hello-world.md | 2 +- docs/hibernate.md | 2 +- docs/import-vm.md | 2 +- docs/inspect-exe.md | 2 +- docs/install-audacity.md | 4 +- docs/install-basic-apps.md | 34 +- docs/install-basic-snaps.md | 6 +- docs/install-calibre-server.md | 6 +- docs/install-chocolatey.md | 4 +- docs/install-chrome.md | 4 +- docs/install-crystal-disk-info.md | 4 +- docs/install-crystal-disk-mark.md | 4 +- docs/install-discord.md | 4 +- docs/install-edge.md | 4 +- docs/install-edit.md | 74 +++ docs/install-evcc.md | 6 +- docs/install-firefox.md | 24 +- docs/install-fonts.md | 4 +- docs/install-git-extensions.md | 4 +- docs/install-git-for-windows.md | 4 +- docs/install-github-cli.md | 6 +- docs/install-gitlab.md | 3 +- docs/install-h2static.md | 4 +- docs/install-irfanview.md | 4 +- docs/install-jenkins-agent.md | 4 +- docs/install-knot-resolver.md | 6 +- docs/install-microsoft-teams.md | 4 +- docs/install-mini-dlna.md | 4 +- docs/install-netflix.md | 4 +- docs/install-obs-studio.md | 4 +- docs/install-octoprint.md | 3 +- docs/install-one-calendar.md | 4 +- docs/install-opera-browser.md | 4 +- docs/install-opera-gx.md | 4 +- docs/install-paint-3d.md | 4 +- docs/install-power-toys.md | 4 +- docs/install-powershell.md | 4 +- docs/install-rufus.md | 4 +- docs/install-salesforce-cli.md | 6 +- docs/install-scoop.md | 3 +- docs/install-signal-cli.md | 10 +- docs/install-spotify.md | 4 +- docs/install-ssh-client.md | 4 +- docs/install-ssh-server.md | 6 +- docs/install-syncthing.md | 4 +- docs/install-thunderbird.md | 4 +- docs/install-unbound-server.md | 6 +- docs/install-updates.md | 20 +- docs/install-visual-studio-code.md | 6 +- docs/install-vivaldi.md | 4 +- docs/install-vlc.md | 4 +- docs/install-windows-terminal.md | 4 +- docs/install-wsl.md | 4 +- docs/install-zoom.md | 4 +- docs/introduce-powershell.md | 2 +- docs/kill-process.md | 65 +- docs/list-aliases.md | 2 +- docs/list-anagrams.md | 2 +- docs/list-apps.md | 2 +- docs/list-ascii-table.md | 2 +- docs/list-automatic-variables.md | 2 +- docs/list-battery-status.md | 2 +- docs/list-bios.md | 2 +- docs/list-bluetooth-devices.md | 2 +- docs/list-branches.md | 2 +- docs/list-calendar.md | 2 +- docs/list-cheat-sheet.md | 2 +- docs/list-city-weather.md | 2 +- docs/list-cli-tools.md | 4 +- docs/list-clipboard.md | 2 +- docs/list-cmdlets.md | 2 +- docs/list-coffee-prices.md | 15 +- docs/list-commit-stats.md | 2 +- docs/list-commits.md | 2 +- docs/list-console-colors.md | 2 +- docs/list-countries.md | 2 +- docs/list-cpu.md | 2 +- docs/list-crypto-rates.md | 2 +- docs/list-defender-settings.md | 2 +- docs/list-dir-tree.md | 40 +- docs/list-dns-servers.md | 2 +- docs/list-drives.md | 2 +- docs/list-earthquakes.md | 2 +- docs/list-emojis.md | 2 +- docs/list-empty-dirs.md | 2 +- docs/list-empty-files.md | 2 +- docs/list-encrypted-files.md | 2 +- docs/list-environment-variables.md | 2 +- docs/list-error-types.md | 2 +- docs/list-exchange-rates.md | 2 +- docs/list-executables.md | 2 +- docs/list-fibonacci.md | 2 +- docs/list-files.md | 2 +- docs/list-folder.md | 7 +- docs/list-fritzbox-calls.md | 2 +- docs/list-fritzbox-devices.md | 2 +- docs/list-headlines.md | 2 +- docs/list-hidden-files.md | 2 +- docs/list-installed-hotfixes.md | 2 +- docs/list-installed-languages.md | 2 +- docs/list-installed-scripts.md | 2 +- docs/list-installed-software.md | 2 +- docs/list-internet-ip.md | 2 +- docs/list-ipv6.md | 2 +- docs/list-latest-tag.md | 2 +- docs/list-latest-tags.md | 2 +- docs/list-local-ip.md | 2 +- docs/list-mDNS.md | 2 +- docs/list-memos.md | 2 +- docs/list-mysql-tables.md | 2 +- docs/list-network-connections.md | 2 +- docs/list-network-neighbors.md | 2 +- docs/list-network-routes.md | 2 +- docs/list-network-shares.md | 8 +- docs/list-news.md | 2 +- docs/list-nic.md | 2 +- docs/list-nina-warnings.md | 2 +- docs/list-old-branches.md | 2 +- docs/list-os-releases.md | 2 +- docs/list-os-updates.md | 2 +- docs/list-os.md | 2 +- docs/list-outlook-inbox.md | 2 +- docs/list-outlook-sent.md | 2 +- docs/list-passwords.md | 2 +- docs/list-pins.md | 2 +- docs/list-power-schemes.md | 2 +- docs/list-powershell-modules.md | 2 +- docs/list-powershell-profiles.md | 2 +- docs/list-powershell-verbs.md | 2 +- docs/list-print-jobs.md | 2 +- docs/list-printers.md | 2 +- docs/list-processes.md | 2 +- docs/list-pull-requests.md | 2 +- docs/list-ram.md | 2 +- docs/list-read-only-files.md | 2 +- docs/list-recycle-bin.md | 2 +- docs/list-repos.md | 2 +- docs/list-scripts.md | 2 +- docs/list-scsi-devices.md | 2 +- docs/list-services.md | 2 +- docs/list-special-folders.md | 2 +- docs/list-sql-tables.md | 2 +- docs/list-ssh-key.md | 2 +- docs/list-submodules.md | 2 +- docs/list-suggestions.md | 2 +- docs/list-system-devices.md | 2 +- docs/list-system-files.md | 2 +- docs/list-system-info.md | 2 +- docs/list-tags.md | 2 +- docs/list-tasks.md | 2 +- docs/list-timezone.md | 2 +- docs/list-timezones.md | 2 +- docs/list-tiobe-index.md | 2 +- docs/list-unused-files.md | 2 +- docs/list-updates.md | 4 +- docs/list-usb-devices.md | 2 +- docs/list-user-accounts.md | 2 +- docs/list-user-groups.md | 2 +- docs/list-voices.md | 2 +- docs/list-weather.md | 2 +- docs/list-wifi.md | 2 +- docs/list-window-titles.md | 2 +- docs/list-workdir.md | 2 +- docs/list-wsl-distros.md | 2 +- docs/locate-city.md | 2 +- docs/locate-ipaddress.md | 2 +- docs/locate-my-phone.md | 2 +- docs/locate-zip-code.md | 2 +- docs/lock-desktop.md | 2 +- docs/log-off.md | 2 +- docs/make-install.md | 2 +- docs/measure-BubbleSort.md | 2 +- docs/measure-BucketSort.md | 2 +- docs/measure-CountingSort.md | 2 +- docs/measure-HeapSort.md | 2 +- docs/measure-InsertionSort.md | 2 +- docs/measure-MergeSort.md | 2 +- docs/measure-QuickSort.md | 2 +- docs/measure-SelectionSort.md | 2 +- docs/measure-sorting-algorithms.md | 2 +- docs/merry-christmas.md | 2 +- docs/minimize-all-windows.md | 2 +- docs/move-mouse-pointer.md | 2 +- docs/move-vm.md | 2 +- docs/my-profile.md | 2 +- docs/new-branch.md | 52 +- docs/new-dir.md | 4 +- docs/new-email.md | 4 +- docs/new-junction.md | 7 +- docs/new-linux-vm.md | 2 +- docs/new-markdown-file.md | 4 +- docs/new-power-plan.md | 2 +- docs/new-powershell-script.md | 4 +- docs/new-qrcode.md | 2 +- docs/new-reboot-task.md | 2 +- docs/new-shortcut.md | 2 +- docs/new-ssh-key.md | 2 +- docs/new-symlink.md | 4 +- docs/new-tab.md | 2 +- docs/new-tag.md | 6 +- docs/new-text-file.md | 2 +- docs/new-user.md | 4 +- docs/new-windows-vm.md | 2 +- docs/on-desktop-login.md | 2 +- docs/open-URL.md | 15 +- docs/open-apps-folder.md | 4 +- docs/open-auto-start-folder.md | 4 +- docs/open-bing-maps.md | 4 +- docs/open-booking-com.md | 4 +- docs/open-c-drive.md | 4 +- docs/open-calculator.md | 4 +- docs/open-chrome.md | 4 +- docs/open-clock.md | 4 +- docs/open-cortana.md | 4 +- docs/open-d-drive.md | 4 +- docs/open-dashboards.md | 17 +- docs/open-deep-l-translator.md | 8 +- docs/open-default-browser.md | 14 +- docs/open-desktop-folder.md | 8 +- docs/open-documents-folder.md | 8 +- docs/open-downloads-folder.md | 4 +- docs/open-dropbox-folder.md | 4 +- docs/open-duck-duck-go.md | 4 +- docs/open-e-drive.md | 4 +- docs/open-edge.md | 8 +- docs/open-egg-timer.md | 4 +- docs/open-email-client.md | 4 +- docs/open-f-drive.md | 8 +- docs/open-file-explorer.md | 4 +- docs/open-fire-place.md | 4 +- docs/open-firefox.md | 8 +- docs/open-flight-radar.md | 8 +- docs/open-g-drive.md | 4 +- docs/open-git-extensions.md | 24 +- docs/open-google-books.md | 8 +- docs/open-google-calendar.md | 8 +- docs/open-google-contacts.md | 4 +- docs/open-google-docs.md | 8 +- docs/open-google-earth.md | 8 +- docs/open-google-mail.md | 8 +- docs/open-google-maps.md | 8 +- docs/open-google-news.md | 8 +- docs/open-google-photos.md | 8 +- docs/open-google-play.md | 8 +- docs/open-google-search.md | 8 +- docs/open-google-stadia.md | 8 +- docs/open-google-translate.md | 8 +- docs/open-home-folder.md | 8 +- docs/open-internet-archive.md | 8 +- docs/open-jitsi-meet.md | 8 +- docs/open-m-drive.md | 8 +- docs/open-magnifier.md | 10 +- docs/open-microsoft-paint.md | 8 +- docs/open-microsoft-solitaire.md | 8 +- docs/open-microsoft-store.md | 8 +- docs/open-microsoft-teams.md | 8 +- docs/open-music-folder.md | 10 +- docs/open-netflix.md | 8 +- docs/open-notepad.md | 4 +- docs/open-obs-studio.md | 26 +- docs/open-office-365.md | 8 +- docs/open-one-drive-folder.md | 8 +- docs/open-outlook.md | 26 +- docs/open-paint-three-d.md | 10 +- docs/open-pictures-folder.md | 10 +- docs/open-rdp.md | 8 +- docs/open-recycle-bin-folder.md | 6 +- docs/open-remote-desktop.md | 10 +- docs/open-repos-folder.md | 8 +- docs/open-screen-clip.md | 8 +- docs/open-screen-sketch.md | 8 +- docs/open-skype.md | 8 +- docs/open-snipping-tool.md | 8 +- docs/open-speed-test.md | 8 +- docs/open-spotify.md | 8 +- docs/open-stack-overflow.md | 8 +- docs/open-start-page.md | 8 +- docs/open-street-map.md | 8 +- docs/open-task-manager.md | 8 +- docs/open-temporary-folder.md | 26 +- docs/open-three-d-viewer.md | 8 +- docs/open-thunderbird.md | 26 +- docs/open-videos-folders.md | 8 +- docs/open-visual-studio.md | 24 +- docs/open-voice-recorder.md | 4 +- docs/open-vpn-settings.md | 8 +- docs/open-windows-defender.md | 8 +- docs/open-windows-terminal.md | 8 +- docs/open-windy.md | 47 +- docs/open-xing.md | 6 +- docs/pick-commit.md | 2 +- docs/ping-host.md | 8 +- docs/ping-internet.md | 2 +- docs/ping-local-devices.md | 2 +- docs/ping-weather.md | 2 +- docs/play-bee-sound.md | 2 +- docs/play-beep-sound.md | 2 +- docs/play-big-ben.md | 2 +- docs/play-cat-sound.md | 2 +- docs/play-chess.md | 2 +- docs/play-cow-sound.md | 2 +- docs/play-dog-sound.md | 2 +- docs/play-donkey-sound.md | 2 +- docs/play-drug-wars.md | 2 +- docs/play-elephant-sound.md | 2 +- docs/play-elk-sound.md | 2 +- docs/play-files.md | 2 +- docs/play-frog-sound.md | 2 +- docs/play-goat-sound.md | 2 +- docs/play-gorilla-sound.md | 2 +- docs/play-happy-birthday.md | 2 +- docs/play-horse-sound.md | 2 +- docs/play-imperial-march.md | 2 +- docs/play-jingle-bells.md | 2 +- docs/play-lion-sound.md | 2 +- docs/play-m3u.md | 2 +- docs/play-mission-impossible.md | 2 +- docs/play-mp3.md | 2 +- docs/play-parrot-sound.md | 2 +- docs/play-pig-sound.md | 2 +- docs/play-pong.md | 2 +- docs/play-rattlesnake-sound.md | 2 +- docs/play-rick.md | 2 +- docs/play-snake.md | 2 +- docs/play-super-mario.md | 2 +- docs/play-system-sounds.md | 2 +- docs/play-tetris-melody.md | 2 +- docs/play-vulture-sound.md | 2 +- docs/play-wolf-sound.md | 2 +- docs/poweroff.md | 2 +- docs/print-image.md | 2 +- docs/publish-to-ipfs.md | 2 +- docs/pull-repo.md | 32 +- docs/pull-repos.md | 4 +- docs/query-smart-data.md | 2 +- docs/reboot-fritzbox.md | 2 +- docs/reboot-into-bios.md | 2 +- docs/reboot.md | 2 +- docs/remember.md | 2 +- docs/remind-me.md | 2 +- docs/remove-dir.md | 86 +++ docs/remove-empty-dirs.md | 2 +- docs/remove-old-dirs.md | 2 +- docs/remove-print-jobs.md | 2 +- docs/remove-tag.md | 2 +- docs/remove-user.md | 2 +- docs/remove-vm.md | 2 +- docs/replace-in-files.md | 2 +- docs/restart-network-adapters.md | 2 +- docs/roll-a-dice.md | 2 +- docs/save-credentials.md | 2 +- docs/save-screenshot.md | 2 +- docs/scan-folder.md | 2 +- docs/scan-network.md | 2 +- docs/scan-ports.md | 2 +- docs/search-filename.md | 2 +- docs/search-files.md | 2 +- docs/search-repo.md | 2 +- docs/send-email.md | 2 +- docs/send-tcp.md | 2 +- docs/send-udp.md | 2 +- docs/set-timer.md | 2 +- docs/set-volume.md | 2 +- docs/set-wallpaper.md | 2 +- docs/show-lightnings.md | 2 +- docs/show-notification-motivation-quote.md | 2 +- docs/show-notification.md | 2 +- docs/show-traffic.md | 2 +- docs/simulate-presence.md | 2 +- docs/smart-data2csv.md | 2 +- docs/speak-arabic.md | 4 +- docs/speak-checklist.md | 4 +- docs/speak-countdown.md | 4 +- docs/speak-croatian.md | 4 +- docs/speak-danish.md | 4 +- docs/speak-dutch.md | 4 +- docs/speak-english.md | 4 +- docs/speak-epub.md | 4 +- docs/speak-esperanto.md | 4 +- docs/speak-file.md | 4 +- docs/speak-finnish.md | 4 +- docs/speak-french.md | 4 +- docs/speak-german.md | 4 +- docs/speak-greek.md | 4 +- docs/speak-hebrew.md | 4 +- docs/speak-hindi.md | 4 +- docs/speak-italian.md | 4 +- docs/speak-japanese.md | 4 +- docs/speak-korean.md | 4 +- docs/speak-latin.md | 4 +- docs/speak-mandarin.md | 4 +- docs/speak-norwegian.md | 4 +- docs/speak-polish.md | 4 +- docs/speak-portuguese.md | 4 +- docs/speak-russian.md | 4 +- docs/speak-spanish.md | 4 +- docs/speak-swedish.md | 4 +- docs/speak-test.md | 26 +- docs/speak-text.md | 4 +- docs/speak-thai.md | 4 +- docs/speak-turkish.md | 4 +- docs/speak-ukrainian.md | 4 +- docs/spell-word.md | 2 +- docs/start-ipfs-server.md | 2 +- docs/suspend.md | 2 +- docs/switch-branch.md | 44 +- docs/switch-shelly1.md | 2 +- docs/switch-tabs.md | 2 +- docs/sync-dir.md | 2 +- docs/sync-repo.md | 14 +- docs/tell-joke.md | 2 +- docs/tell-new-year.md | 2 +- docs/tell-quote.md | 2 +- docs/toggle-caps-lock.md | 2 +- docs/toggle-num-lock.md | 2 +- docs/toggle-scroll-lock.md | 2 +- docs/touch.md | 2 +- docs/translate-file.md | 2 +- docs/translate-files.md | 2 +- docs/translate-text.md | 2 +- docs/turn-volume-down.md | 2 +- docs/turn-volume-fully-up.md | 2 +- docs/turn-volume-off.md | 2 +- docs/turn-volume-on.md | 2 +- docs/turn-volume-up.md | 2 +- docs/uninstall-all-apps.md | 2 +- docs/uninstall-bloatware.md | 2 +- docs/uninstall-new-outlook.md | 2 +- docs/uninstall-outlook.md | 2 +- docs/update-powershell-profile.md | 2 +- docs/upgrade-ubuntu.md | 2 +- docs/upload-file.md | 2 +- docs/upload-to-dropbox.md | 2 +- docs/wake-up-host.md | 2 +- docs/wake-up-human.md | 2 +- docs/watch-commits.md | 2 +- docs/watch-crypto-rates.md | 2 +- docs/watch-file.md | 2 +- docs/watch-host.md | 2 +- docs/watch-news.md | 2 +- docs/watch-ping.md | 2 +- docs/weather-report.md | 2 +- docs/weather.md | 2 +- docs/what-is.md | 2 +- docs/windefender.md | 2 +- docs/write-animated.md | 2 +- docs/write-ascii-image.md | 12 +- docs/write-big.md | 2 +- docs/write-blue.md | 2 +- docs/write-braille.md | 2 +- docs/write-centered.md | 2 +- docs/write-changelog.md | 2 +- docs/write-chart.md | 2 +- docs/write-clock.md | 2 +- docs/write-code.md | 2 +- docs/write-credits.md | 2 +- docs/write-date.md | 2 +- docs/write-fractal.md | 2 +- docs/write-green.md | 2 +- docs/write-hands-off.md | 2 +- docs/write-headline.md | 2 +- docs/write-help.md | 19 +- docs/write-in-emojis.md | 2 +- docs/write-joke.md | 2 +- docs/write-location.md | 2 +- docs/write-lowercase.md | 2 +- docs/write-marquee.md | 2 +- docs/write-matrix.md | 2 +- docs/write-moon.md | 2 +- docs/write-morse-code.md | 2 +- docs/write-motd.md | 2 +- docs/write-pi.md | 2 +- docs/write-progress-bar.md | 11 +- docs/write-qr-code.md | 2 +- docs/write-quote.md | 2 +- docs/write-red.md | 2 +- docs/write-rot13.md | 2 +- docs/write-shit.md | 2 +- docs/write-sine-curves.md | 2 +- docs/write-story.md | 2 +- docs/write-time.md | 2 +- docs/write-typewriter.md | 2 +- docs/write-uppercase.md | 2 +- docs/write-value.md | 75 ++- docs/write-vertical.md | 2 +- docs/write-xmas-tree.md | 2 +- scripts/calculate-BMI.ps1 | 0 scripts/copy-broken-file.ps1 | 0 scripts/open-windy.ps1 | 0 661 files changed, 2839 insertions(+), 1288 deletions(-) create mode 100644 docs/calculate-BMI.md create mode 100644 docs/copy-broken-file.md create mode 100644 docs/install-edit.md create mode 100644 docs/remove-dir.md mode change 100644 => 100755 scripts/calculate-BMI.ps1 mode change 100644 => 100755 scripts/copy-broken-file.ps1 mode change 100644 => 100755 scripts/open-windy.ps1 diff --git a/docs/add-firewall-rules.md b/docs/add-firewall-rules.md index 756f61f0..f4fb642e 100644 --- a/docs/add-firewall-rules.md +++ b/docs/add-firewall-rules.md @@ -116,4 +116,4 @@ try { ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:33)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/alert.md b/docs/alert.md index 57f86a0a..417360dd 100644 --- a/docs/alert.md +++ b/docs/alert.md @@ -72,4 +72,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:33)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/build-repo.md b/docs/build-repo.md index 48858c9e..8845bf0d 100644 --- a/docs/build-repo.md +++ b/docs/build-repo.md @@ -28,9 +28,9 @@ Example ------- ```powershell PS> ./build-repo.ps1 C:\Repos\ninja -⏳ Building πŸ“‚ninja by using CMake... +⏳ Building 'ninja' by executing cmake... ... -βœ… Build of πŸ“‚ninja succeeded in 47s, results at: πŸ“‚C:\Repos\ninja\_results +βœ… Build of 'ninja' succeeded in 47s, results at: πŸ“‚C:\Repos\ninja\_results ``` @@ -55,9 +55,9 @@ Script Content Specifies the file path to the Git repository (default: current working directory) .EXAMPLE PS> ./build-repo.ps1 C:\Repos\ninja - ⏳ Building πŸ“‚ninja by using CMake... + ⏳ Building 'ninja' by executing cmake... ... - βœ… Build of πŸ“‚ninja succeeded in 47s, results at: πŸ“‚C:\Repos\ninja\_results + βœ… Build of 'ninja' succeeded in 47s, results at: πŸ“‚C:\Repos\ninja\_results .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -69,117 +69,120 @@ param([string]$path = "$PWD") function BuildFolder([string]$path) { $dirName = (Get-Item "$path").Name if (Test-Path "$path/CMakeLists.txt" -pathType leaf) { - "⏳ (1/4) Building πŸ“‚$dirName by using CMake..." + "⏳ (1/3) Building '$dirName' by executing cmake..." $global:results = "$path/_results/" if (-not(Test-Path $global:results -pathType container)) { & mkdir $global:results } Set-Location $global:results - - "⏳ (2/4) Executing 'cmake' to generate the Makefile..." & cmake .. if ($lastExitCode -ne 0) { throw "Executing 'cmake ..' failed with exit code $lastExitCode" } - "⏳ (3/4) Executing 'make -j4' to compile and link..." + "⏳ (2/3) Executing 'make -j4' to compile and link..." & make -j4 if ($lastExitCode -ne 0) { throw "Executing 'make -j4' failed with exit code $lastExitCode" } - "⏳ (4/4) Executing 'ctest -V'... (if tests are provided)" + "⏳ (3/3) Checking '$dirName' by executing 'ctest -V'... (if tests are provided)" & ctest -V if ($lastExitCode -ne 0) { throw "Executing 'ctest -V' failed with exit code $lastExitCode" } } elseif (Test-Path "$path/.cargo/release.toml" -pathType leaf) { - "⏳ (1/4) Building πŸ“‚$dirName by using Cargo..." - Set-Location "$path/" + "⏳ Building '$dirName' by executing 'cargo build'..." + Set-Location "$path/" & cargo build --config .cargo/release.toml --release if ($lastExitCode -ne 0) { throw "Executing 'cargo build' failed with exit code $lastExitCode" } } elseif (Test-Path "$path/autogen.sh" -pathType leaf) { - "⏳ Building πŸ“‚$dirName by executing 'autogen.sh'..." + + "⏳ (1/3) Building '$dirName' by executing 'autogen.sh'..." Set-Location "$path/" & ./autogen.sh --force if ($lastExitCode -ne 0) { throw "Executing './autogen.sh --force' failed with exit code $lastExitCode" } - "⏳ Executing './configure'..." - + "⏳ (2/3) Executing './configure'..." & ./configure if ($lastExitCode -ne 0) { throw "Executing './configure' failed with exit code $lastExitCode" } + "⏳ (3/3) Executing 'make -j4' to compile and link..." & make -j4 if ($lastExitCode -ne 0) { throw "Executing 'make -j4' failed with exit code $lastExitCode" } } elseif (Test-Path "$path/configure" -pathType leaf) { - "⏳ Building πŸ“‚$dirName by executing './configure' and 'make'..." - Set-Location "$path/" + "⏳ (1/3) Building '$dirName' by executing './configure'..." + Set-Location "$path/" & ./configure #if ($lastExitCode -ne 0) { throw "Executing './configure' exited with error code $lastExitCode" } + "⏳ (2/3) Compiling and linking '$dirName' by executing 'make -j4'..." & make -j4 if ($lastExitCode -ne 0) { throw "Executing 'make -j4' failed with exit code $lastExitCode" } + "⏳ (3/3) Checking '$dirName' by executing 'make test'..." & make test if ($lastExitCode -ne 0) { throw "Executing 'make test' failed with exit code $lastExitCode" } } elseif (Test-Path "$path/build.gradle" -pathType leaf) { - "⏳ Building πŸ“‚$dirName by using Gradle..." - Set-Location "$path" + "⏳ (1/2) Building '$dirName' by executing 'gradle build'..." + Set-Location "$path" & gradle build if ($lastExitCode -ne 0) { throw "Executing 'gradle build' failed with exit code $lastExitCode" } + "⏳ (2/2) Checking '$dirName' by executing 'gradle test'..." & gradle test if ($lastExitCode -ne 0) { throw "Executing 'gradle test' failed with exit code $lastExitCode" } } elseif (Test-Path "$path/meson.build" -pathType leaf) { - "⏳ Building πŸ“‚$dirName by using Meson..." + "⏳ Building '$dirName' by using Meson..." Set-Location "$path" & meson . build --prefix=/usr/local if ($lastExitCode -ne 0) { throw "Executing 'meson . build' failed with exit code $lastExitCode" } } elseif (Test-Path "$path/Imakefile" -pathType leaf) { - "⏳ Building πŸ“‚$dirName by using Imakefile..." + "⏳ Building '$dirName' by using Imakefile..." Set-Location "$path/" - & xmkmf if ($lastExitCode -ne 0) { throw "Executing 'xmkmf' failed with exit code $lastExitCode" } + "⏳ Executing 'make -j4' to compile and link..." & make -j4 if ($lastExitCode -ne 0) { throw "Executing 'make -j4' failed with exit code $lastExitCode" } } elseif (Test-Path "$path/Makefile" -pathType leaf) { - "⏳ Building πŸ“‚$dirName by using Makefile..." - Set-Location "$path" + "⏳ Building '$dirName' by using Makefile..." + Set-Location "$path" & make -j4 if ($lastExitCode -ne 0) { throw "Executing 'make -j4' failed with exit code $lastExitCode" } } elseif (Test-Path "$path/makefile" -pathType leaf) { - "⏳ Building πŸ“‚$dirName by using makefile..." + "⏳ Building '$dirName' by using makefile..." Set-Location "$path" & make -j4 if ($lastExitCode -ne 0) { throw "Executing 'make -j4' failed with exit code $lastExitCode" } } elseif (Test-Path "$path/compile.sh" -pathType leaf) { - "⏳ Building πŸ“‚$dirName by executing 'compile.sh'..." - Set-Location "$path/" + "⏳ Building '$dirName' by executing 'compile.sh'..." + Set-Location "$path/" & ./compile.sh if ($lastExitCode -ne 0) { throw "Executing './compile.sh' failed with exit code $lastExitCode" } + "⏳ Executing 'make -j4' to compile and link..." & make -j4 if ($lastExitCode -ne 0) { throw "Executing 'make -j4' failed with exit code $lastExitCode" } } elseif (Test-Path "$path/attower/src/build/DevBuild/build.bat" -pathType leaf) { - Write-Host "⏳ Building πŸ“‚$dirName by executing 'build.bat'..." + Write-Host "⏳ Building '$dirName' by executing 'build.bat'..." Set-Location "$path/attower/src/build/DevBuild/" & ./build.bat build-core-release if ($lastExitCode -ne 0) { throw "Executing 'build.bat' failed with exit code $lastExitCode" } $global:results = "$path\attower\Executables" } elseif (Test-Path "$path/$dirName" -pathType container) { - "⏳ No make rule found, trying subfolder πŸ“‚$($dirName)..." + "⏳ No make rule found, trying subfolder '$($dirName)'..." BuildFolder "$path/$dirName" } else { Write-Warning "Sorry, no make rule applies to: πŸ“‚$dirName" @@ -197,19 +200,19 @@ try { BuildFolder "$path" Set-Location "$previousPath" - $repoDirName = (Get-Item "$path").Name + $dirName = (Get-Item "$path").Name [int]$elapsed = $stopWatch.Elapsed.TotalSeconds if ($global:results -eq "") { - "βœ… Build of πŸ“‚$repoDirName succeeded in $($elapsed)s." + "βœ… Build of '$dirName' succeeded in $($elapsed)s." } else { - "βœ… Build of πŸ“‚$repoDirName succeeded in $($elapsed)s, results at: πŸ“‚$($global:results)" + "βœ… Build of '$dirName' succeeded in $($elapsed)s, results at: πŸ“‚$($global:results)" } exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." Set-Location "$previousPath" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/build-repos.md b/docs/build-repos.md index 646352a8..9b7326e6 100644 --- a/docs/build-repos.md +++ b/docs/build-repos.md @@ -78,9 +78,9 @@ try { "βœ… Built $FolderCount Git repositories at πŸ“‚$ParentDirName in $Elapsed sec" exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/calculate-BMI.md b/docs/calculate-BMI.md new file mode 100644 index 00000000..95991637 --- /dev/null +++ b/docs/calculate-BMI.md @@ -0,0 +1,61 @@ +The *calculate-BMI.ps1* Script +=========================== + +This PowerShell script calculates the BMI. + +Parameters +---------- +```powershell +/Repos/PowerShell/scripts/calculate-BMI.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Example +------- +```powershell +PS> ./calculate-BMI.ps1 + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Calculate the BMI +.DESCRIPTION + This PowerShell script calculates the BMI. +.EXAMPLE + PS> ./calculate-BMI.ps1 +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +#requires -version 5.1 + +try { + [float]$height = Read-Host("Enter your height in m ") + [float]$weight = Read-Host("Enter your weight in kg") + $BMI = $weight / ($height * $height) + "Your BMI is $BMI, for adults the WHO regards <16 as Underweight (severe thinness), 16-17 as Underweight (moderate thinness), 17-18.5 as Underweight (mild thinness), 18.5-25 as Normal range, 25-30 as Overweight (pre-obese), 30-35 as Obese (class I), 35-40 as Obese (class II), and >=40 as Obese (class III)." + exit 0 # success +} catch { + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." + exit 1 +} +``` + +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-autostart.md b/docs/cd-autostart.md index d88ceafb..21db0f13 100644 --- a/docs/cd-autostart.md +++ b/docs/cd-autostart.md @@ -46,6 +46,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $path = Resolve-Path "~/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup" if (-not(Test-Path "$path" -pathType container)) { @@ -60,4 +62,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-crashdumps.md b/docs/cd-crashdumps.md index 8d571b6a..a75746d1 100644 --- a/docs/cd-crashdumps.md +++ b/docs/cd-crashdumps.md @@ -46,6 +46,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { if ($IsLinux) { throw "Sorry, Windows only" } @@ -65,4 +67,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-desktop.md b/docs/cd-desktop.md index 714acde1..ebbab9f6 100644 --- a/docs/cd-desktop.md +++ b/docs/cd-desktop.md @@ -46,6 +46,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { if ($IsLinux -or $IsMacOS) { if (-not(Test-Path "~/Desktop" -pathType container)) { @@ -69,4 +71,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-docs.md b/docs/cd-docs.md index accddde1..947b04c1 100644 --- a/docs/cd-docs.md +++ b/docs/cd-docs.md @@ -1,7 +1,7 @@ The *cd-docs.ps1* Script =========================== -This PowerShell script sets the current working directory to the documents folder. +This PowerShell script changes the current working directory to the documents folder. Parameters ---------- @@ -36,7 +36,7 @@ Script Content .SYNOPSIS Sets the working dir to the documents folder .DESCRIPTION - This PowerShell script sets the current working directory to the documents folder. + This PowerShell script changes the current working directory to the documents folder. .EXAMPLE PS> ./cd-docs.ps1 πŸ“‚C:\Users\Markus\Documents with 3 files and 0 folders entered. @@ -46,10 +46,12 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { if ($IsLinux -or $IsMacOS) { if (-not(Test-Path "~/Documents" -pathType container)) { - throw "No 'Documents' folder in your home directory yet" + throw "Your home directory has no 'Documents' folder yet" } $path = Resolve-Path "~/Documents" } else { @@ -64,9 +66,9 @@ try { "πŸ“‚$path with $($files.Count) files and $($folders.Count) folders entered." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-downloads.md b/docs/cd-downloads.md index 143fd9ac..9e0862e0 100644 --- a/docs/cd-downloads.md +++ b/docs/cd-downloads.md @@ -46,6 +46,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { if ($IsLinux -or $IsMacOS) { if (-not(Test-Path "~/Downloads" -pathType container)) { @@ -69,4 +71,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-dropbox.md b/docs/cd-dropbox.md index 9fef7a6a..f59ecdf9 100644 --- a/docs/cd-dropbox.md +++ b/docs/cd-dropbox.md @@ -46,6 +46,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { if (-not(Test-Path "~/Dropbox" -pathType container)) { throw "No 'Dropbox' folder in your home directory - is Dropbox installed?" @@ -62,4 +64,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-etc.md b/docs/cd-etc.md index 173ce926..88603f10 100644 --- a/docs/cd-etc.md +++ b/docs/cd-etc.md @@ -1,7 +1,7 @@ The *cd-etc.ps1* Script =========================== -This PowerShell script changes the working directory to the /etc directory. +This PowerShell script changes the current working directory to the /etc directory. Parameters ---------- @@ -16,8 +16,8 @@ Parameters Example ------- ```powershell -PS> ./cd-etc -πŸ“‚C:\Windows\System32\drivers\etc (has 5 files and 0 folders) +PS> ./cd-etc.ps1 +πŸ“‚C:\Windows\System32\drivers\etc with 5 files and 0 folders entered. ``` @@ -36,16 +36,18 @@ Script Content .SYNOPSIS Changes to the /etc directory .DESCRIPTION - This PowerShell script changes the working directory to the /etc directory. + This PowerShell script changes the current working directory to the /etc directory. .EXAMPLE - PS> ./cd-etc - πŸ“‚C:\Windows\System32\drivers\etc (has 5 files and 0 folders) + PS> ./cd-etc.ps1 + πŸ“‚C:\Windows\System32\drivers\etc with 5 files and 0 folders entered. .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { if ($IsLinux -or $IsMacOS) { $path = "/etc" @@ -58,12 +60,12 @@ try { Set-Location "$path" $files = Get-ChildItem $path -attributes !Directory $folders = Get-ChildItem $path -attributes Directory - "πŸ“‚$path entered (has $($files.Count) files and $($folders.Count) folders)" + "πŸ“‚$path with $($files.Count) files and $($folders.Count) folders entered." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-fonts.md b/docs/cd-fonts.md index a70f9cac..7669bf50 100644 --- a/docs/cd-fonts.md +++ b/docs/cd-fonts.md @@ -46,6 +46,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $path = [Environment]::GetFolderPath('Fonts') if (-not(Test-Path "$path" -pathType container)) { @@ -61,4 +63,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-home.md b/docs/cd-home.md index 10834d67..a9e20c73 100644 --- a/docs/cd-home.md +++ b/docs/cd-home.md @@ -46,6 +46,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { if (-not(Test-Path "~" -pathType container)) { throw "No home directory at: $path" } $path = Resolve-Path "~" @@ -60,4 +62,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-jenkins.md b/docs/cd-jenkins.md index 07085c0c..800574ec 100644 --- a/docs/cd-jenkins.md +++ b/docs/cd-jenkins.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./cd-jenkins +PS> ./cd-jenkins.ps1 πŸ“‚C:\Users\Markus\.jenkins entered (has 2 files and 21 folders) ``` @@ -38,7 +38,7 @@ Script Content .DESCRIPTION This PowerShell script changes the working directory to the Jenkins home directory. .EXAMPLE - PS> ./cd-jenkins + PS> ./cd-jenkins.ps1 πŸ“‚C:\Users\Markus\.jenkins entered (has 2 files and 21 folders) .LINK https://github.com/fleschutz/PowerShell @@ -46,6 +46,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { if (Test-Path "~/.jenkins" -pathType container) { $path = "~/.jenkins" @@ -65,4 +67,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-logs.md b/docs/cd-logs.md index ebaca55e..e54de58a 100644 --- a/docs/cd-logs.md +++ b/docs/cd-logs.md @@ -1,19 +1,34 @@ The *cd-logs.ps1* Script =========================== -cd-logs.ps1 - +This PowerShell script changes the current working directory to the logs directory. Parameters ---------- ```powershell - +/Repos/PowerShell/scripts/cd-logs.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. ``` +Example +------- +```powershell +PS> ./cd-logs.ps1 +πŸ“‚/var/logs with 3 files and 2 folders entered. + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + Script Content -------------- ```powershell @@ -23,14 +38,16 @@ Script Content .DESCRIPTION This PowerShell script changes the current working directory to the logs directory. .EXAMPLE - PS> ./cd-logs - πŸ“‚/var/logs entered (has 3 files and 2 subfolders) + PS> ./cd-logs.ps1 + πŸ“‚/var/logs with 3 files and 2 folders entered. .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + function GetLogsDir { if ($IsLinux -or $IsMacOS) { return "/var/logs" } $WinDir = [System.Environment]::GetFolderPath('Windows') @@ -42,12 +59,12 @@ try { Set-Location "$path" $files = Get-ChildItem $path -attributes !Directory $folders = Get-ChildItem $path -attributes Directory - "πŸ“‚$path entered (has $($files.Count) files and $($folders.Count) subfolders)" + "πŸ“‚$path with $($files.Count) files and $($folders.Count) folders entered." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-music.md b/docs/cd-music.md index 92ec1572..5481d786 100644 --- a/docs/cd-music.md +++ b/docs/cd-music.md @@ -46,6 +46,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { if ($IsLinux) { if (-not(Test-Path "~/Music/" -pathType container)) { @@ -64,9 +66,9 @@ try { "πŸ“‚$path with $($folders.Count) folders and $($files.Count) files entered." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-nextcloud.md b/docs/cd-nextcloud.md index c718465c..a6a99c0a 100644 --- a/docs/cd-nextcloud.md +++ b/docs/cd-nextcloud.md @@ -16,8 +16,8 @@ Parameters Example ------- ```powershell -PS> ./cd-nextcloud -πŸ“‚C:\Users\Markus\NextCloud entered (has 2 files and 0 folders) +PS> ./cd-nextcloud.ps1 +πŸ“‚C:\Users\Markus\NextCloud with 2 files and 0 folders entered. ``` @@ -38,14 +38,16 @@ Script Content .DESCRIPTION This PowerShell script changes the working directory to the user's NextCloud folder. .EXAMPLE - PS> ./cd-nextcloud - πŸ“‚C:\Users\Markus\NextCloud entered (has 2 files and 0 folders) + PS> ./cd-nextcloud.ps1 + πŸ“‚C:\Users\Markus\NextCloud with 2 files and 0 folders entered. .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { if (-not(Test-Path "~/NextCloud" -pathType container)) { throw "No 'NextCloud' folder in your home directory - is NextCloud installed?" @@ -54,12 +56,12 @@ try { Set-Location "$path" $files = Get-ChildItem $path -attributes !Directory $folders = Get-ChildItem $path -attributes Directory - "πŸ“‚$path entered (has $($files.Count) files and $($folders.Count) folders)" + "πŸ“‚$path with $($files.Count) files and $($folders.Count) folders entered." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-onedrive.md b/docs/cd-onedrive.md index a565d8c9..70d6cd24 100644 --- a/docs/cd-onedrive.md +++ b/docs/cd-onedrive.md @@ -46,6 +46,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { if (-not(Test-Path "~/OneDrive" -pathType container)) { throw "No 'OneDrive' folder in your home directory - is OneDrive installed?" @@ -57,9 +59,9 @@ try { "πŸ“‚$path with $($files.Count) files and $($folders.Count) folders entered." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-pics.md b/docs/cd-pics.md index 46529347..f474b602 100644 --- a/docs/cd-pics.md +++ b/docs/cd-pics.md @@ -1,7 +1,7 @@ The *cd-pics.ps1* Script =========================== -This PowerShell script sets the current working directory to the user's pictures folder. +This PowerShell script changes the current working directory to the user's pictures folder. Parameters ---------- @@ -36,7 +36,7 @@ Script Content .SYNOPSIS Sets the working dir to the user's pictures folder .DESCRIPTION - This PowerShell script sets the current working directory to the user's pictures folder. + This PowerShell script changes the current working directory to the user's pictures folder. .EXAMPLE PS> ./cd-pics.ps1 πŸ“‚C:\Users\Markus\Pictures with 7 files and 0 folders entered. @@ -46,6 +46,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { if ($IsLinux) { if (-not(Test-Path "~/Pictures" -pathType container)) { @@ -64,9 +66,9 @@ try { "πŸ“‚$path with $($files.Count) files and $($folders.Count) folders entered." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-public.md b/docs/cd-public.md index ff00d9d0..38d5b05e 100644 --- a/docs/cd-public.md +++ b/docs/cd-public.md @@ -1,7 +1,7 @@ The *cd-public.ps1* Script =========================== -This PowerShell script sets the current working directory to the Public folder. +This PowerShell script changes the current working directory to the Public folder. Parameters ---------- @@ -36,7 +36,7 @@ Script Content .SYNOPSIS Sets the working dir to the Public folder .DESCRIPTION - This PowerShell script sets the current working directory to the Public folder. + This PowerShell script changes the current working directory to the Public folder. .EXAMPLE PS> ./cd-public.ps1 πŸ“‚C:\Users\Public with 2 files and 3 folders entered. @@ -46,6 +46,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { if ($IsLinux) { if (-not(Test-Path "~/Public" -pathType container)) { @@ -64,9 +66,9 @@ try { "πŸ“‚$path with $($files.Count) files and $($folders.Count) folders entered." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-recent.md b/docs/cd-recent.md index 5ac64365..9721ba1c 100644 --- a/docs/cd-recent.md +++ b/docs/cd-recent.md @@ -1,7 +1,7 @@ The *cd-recent.ps1* Script =========================== -This PowerShell script changes the working directory to the 'recent' folder. +This PowerShell script changes the current working directory to the 'recent' folder. Parameters ---------- @@ -16,8 +16,8 @@ Parameters Example ------- ```powershell -PS> ./cd-recent -πŸ“‚C:\Users\Markus\AppData\Roaming\Microsoft\Windows\Recent entered (has 2 files and 3 subfolders) +PS> ./cd-recent.ps1 +πŸ“‚C:\Users\Markus\AppData\Roaming\Microsoft\Windows\Recent with 2 files and 3 folders entered. ``` @@ -36,30 +36,31 @@ Script Content .SYNOPSIS Sets the working directory to the 'recent' folder .DESCRIPTION - This PowerShell script changes the working directory to the 'recent' folder. + This PowerShell script changes the current working directory to the 'recent' folder. .EXAMPLE - PS> ./cd-recent - πŸ“‚C:\Users\Markus\AppData\Roaming\Microsoft\Windows\Recent entered (has 2 files and 3 subfolders) + PS> ./cd-recent.ps1 + πŸ“‚C:\Users\Markus\AppData\Roaming\Microsoft\Windows\Recent with 2 files and 3 folders entered. .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $path = [Environment]::GetFolderPath('Recent') - if (-not(Test-Path "$path" -pathType container)) { - throw "No recent folder at $path" - } + if (-not(Test-Path "$path" -pathType container)) { throw "No recent folder at $path" } + Set-Location "$path" $files = Get-ChildItem $path -attributes !Directory $folders = Get-ChildItem $path -attributes Directory - "πŸ“‚$path entered (has $($files.Count) files and $($folders.Count) subfolders)" + "πŸ“‚$path with $($files.Count) files and $($folders.Count) folders entered." exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-recycle-bin.md b/docs/cd-recycle-bin.md index 1c0bf08f..c0947670 100644 --- a/docs/cd-recycle-bin.md +++ b/docs/cd-recycle-bin.md @@ -1,36 +1,53 @@ The *cd-recycle-bin.ps1* Script =========================== -cd-recycle-bin.ps1 - +This PowerShell script changes the current working directory to the user's recycle bin folder. Parameters ---------- ```powershell - +/Repos/PowerShell/scripts/cd-recycle-bin.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. ``` +Example +------- +```powershell +PS> ./cd-recycle-bin.ps1 +πŸ“‚C:\$Recycle.Bin\S-1-5-21-123404-23309-294260-1001 with 2 files and 0 folders entered. + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + Script Content -------------- ```powershell <# .SYNOPSIS - Sets the working directory to the recycle bin folder + Sets the working dir to the recycle bin folder .DESCRIPTION - This PowerShell script changes the working directory to the user's recycle bin folder. + This PowerShell script changes the current working directory to the user's recycle bin folder. .EXAMPLE - PS> ./cd-recycle-bin - πŸ“‚C:\$Recycle.Bin\S-1-5-21-123404-23309-294260-1001 entered (has 2 files and 0 subfolders) + PS> ./cd-recycle-bin.ps1 + πŸ“‚C:\$Recycle.Bin\S-1-5-21-123404-23309-294260-1001 with 2 files and 0 folders entered. .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + function GetCurrentUserSID { [CmdletBinding()] param() Add-Type -AssemblyName System.DirectoryServices.AccountManagement return ([System.DirectoryServices.AccountManagement.UserPrincipal]::Current).SID.Value @@ -49,12 +66,12 @@ try { Set-Location "$path" $files = Get-ChildItem $path -attributes !Directory $folders = Get-ChildItem $path -attributes Directory - "πŸ“‚$path entered (has $($files.Count) files and $($folders.Count) subfolders)" + "πŸ“‚$path with $($files.Count) files and $($folders.Count) folders entered." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-repo.md b/docs/cd-repo.md index 2586cbf0..3c4f3d4b 100644 --- a/docs/cd-repo.md +++ b/docs/cd-repo.md @@ -1,7 +1,7 @@ The *cd-repo.ps1* Script =========================== -This PowerShell script changes the working directory to the given local Git repository. +This PowerShell script changes the current working directory to the given local Git repository. Parameters ---------- @@ -46,7 +46,7 @@ Script Content .SYNOPSIS Sets the working directory to a repo .DESCRIPTION - This PowerShell script changes the working directory to the given local Git repository. + This PowerShell script changes the current working directory to the given local Git repository. .PARAMETER folderName Specifies the folder name of the Git repository .EXAMPLE @@ -58,6 +58,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$folderName = "") try { @@ -85,9 +87,9 @@ try { & git status --branch --short exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-repos.md b/docs/cd-repos.md index 93e57f72..347e4c1e 100644 --- a/docs/cd-repos.md +++ b/docs/cd-repos.md @@ -1,7 +1,7 @@ The *cd-repos.ps1* Script =========================== -This PowerShell script changes the working directory to the folder for Git repositories. +This PowerShell script changes the current working directory to the folder for Git repositories. Parameters ---------- @@ -36,7 +36,7 @@ Script Content .SYNOPSIS Sets the working dir to the repos folder .DESCRIPTION - This PowerShell script changes the working directory to the folder for Git repositories. + This PowerShell script changes the current working directory to the folder for Git repositories. .EXAMPLE PS> ./cd-repos.ps1 πŸ“‚C:\Repos with 33 folders entered. @@ -46,6 +46,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { if (Test-Path "~/Repos" -pathType container) { $path = "~/Repos" } elseif (Test-Path "~/repos" -pathType container) { $path = "~/repos" @@ -64,9 +66,9 @@ try { "πŸ“‚$path with $($folders.Count) folders entered." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-root.md b/docs/cd-root.md index 952b9349..8723f3a1 100644 --- a/docs/cd-root.md +++ b/docs/cd-root.md @@ -46,6 +46,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { if ($IsLinux -or $IsMacOS) { $path = "/" } else { $path = "C:\" } Set-Location "$path" @@ -54,9 +56,9 @@ try { "πŸ“‚$path with $($folders.Count) folders and $($files.Count) files entered." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-screenshots.md b/docs/cd-screenshots.md index 615cc5e3..4f91878f 100644 --- a/docs/cd-screenshots.md +++ b/docs/cd-screenshots.md @@ -1,19 +1,34 @@ The *cd-screenshots.ps1* Script =========================== -cd-screenshots.ps1 - +This PowerShell script sets the current working directory to the user's screenshots folder. Parameters ---------- ```powershell - +/Repos/PowerShell/scripts/cd-screenshots.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. ``` +Example +------- +```powershell +PS> ./cd-screenshots.ps1 +πŸ“‚C:\Users\Markus\Pictures\Screenshots with 7 files and 0 folders entered. + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + Script Content -------------- ```powershell @@ -31,6 +46,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + function GetScreenshotsFolder { if ($IsLinux) { if (-not(Test-Path "~/Pictures" -pathType container)) { throw "No 'Pictures' folder in your home directory yet" } @@ -52,9 +69,9 @@ try { "πŸ“‚$path with $($files.Count) files and $($folders.Count) folders entered." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-scripts.md b/docs/cd-scripts.md index 9c943556..1ef4d6a4 100644 --- a/docs/cd-scripts.md +++ b/docs/cd-scripts.md @@ -1,7 +1,7 @@ The *cd-scripts.ps1* Script =========================== -This PowerShell script changes the working directory to the PowerShell scripts folder. +This PowerShell script changes the currrent working directory to the PowerShell scripts folder. Parameters ---------- @@ -36,7 +36,7 @@ Script Content .SYNOPSIS Sets the working directory to the PowerShell scripts folder .DESCRIPTION - This PowerShell script changes the working directory to the PowerShell scripts folder. + This PowerShell script changes the currrent working directory to the PowerShell scripts folder. .EXAMPLE PS> ./cd-scripts.ps1 πŸ“‚C:\Repos\PowerShell\scripts with 655 scripts entered. @@ -46,6 +46,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $path = Resolve-Path "$PSScriptRoot" if (-not(Test-Path "$path" -pathType container)) { throw "No scripts folder at: $path" } @@ -54,9 +56,9 @@ try { "πŸ“‚$path with $($files.Count) scripts entered." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-ssh.md b/docs/cd-ssh.md index d3fc780c..037ab85e 100644 --- a/docs/cd-ssh.md +++ b/docs/cd-ssh.md @@ -1,7 +1,7 @@ The *cd-ssh.ps1* Script =========================== -This PowerShell script sets the current working directory to the user's secure shell (SSH) folder. +This PowerShell script changes the current working directory to the user's secure shell (SSH) folder. Parameters ---------- @@ -36,7 +36,7 @@ Script Content .SYNOPSIS Sets the working dir to the SSH folder .DESCRIPTION - This PowerShell script sets the current working directory to the user's secure shell (SSH) folder. + This PowerShell script changes the current working directory to the user's secure shell (SSH) folder. .EXAMPLE PS> ./cd-ssh.ps1 πŸ“‚C:\Users\Markus\.ssh with 4 files entered. @@ -46,10 +46,12 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $path = "~/.ssh" if (-not(Test-Path "$path" -pathType container)) { - throw "No '.ssh' folder in your home directory yet - Is SSH installed?" + throw "No '.ssh' folder in your home directory yet - Please install SSH." } $path = Resolve-Path "$path" Set-Location "$path" @@ -57,9 +59,9 @@ try { "πŸ“‚$path with $($files.Count) files entered." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-sync.md b/docs/cd-sync.md index f5f00d8c..634e6cdb 100644 --- a/docs/cd-sync.md +++ b/docs/cd-sync.md @@ -1,7 +1,7 @@ The *cd-sync.ps1* Script =========================== -This PowerShell script changes the working directory to the user's Syncthing folder. +This PowerShell script changes the current working directory to the user's Syncthing folder. Parameters ---------- @@ -17,7 +17,7 @@ Example ------- ```powershell PS> ./cd-sync.ps1 -πŸ“‚C:\Users\Markus\Sync entered (has 2 files and 0 folders) +πŸ“‚C:\Users\Markus\Sync with 2 files and 0 folders entered. ``` @@ -36,30 +36,32 @@ Script Content .SYNOPSIS Sets the working directory to the user's Sync folder .DESCRIPTION - This PowerShell script changes the working directory to the user's Syncthing folder. + This PowerShell script changes the current working directory to the user's Syncthing folder. .EXAMPLE PS> ./cd-sync.ps1 - πŸ“‚C:\Users\Markus\Sync entered (has 2 files and 0 folders) + πŸ“‚C:\Users\Markus\Sync with 2 files and 0 folders entered. .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { if (-not(Test-Path "~/Sync" -pathType container)) { - throw "No 'Sync' folder in your home directory - is Syncthing installed?" + throw "No 'Sync' folder in your home directory yet - Please install Syncthing." } $path = Resolve-Path "~/Sync" Set-Location "$path" $files = Get-ChildItem $path -attributes !Directory $folders = Get-ChildItem $path -attributes Directory - "πŸ“‚$path entered (has $($files.Count) files and $($folders.Count) folders)" + "πŸ“‚$path with $($files.Count) files and $($folders.Count) folders entered." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-temp.md b/docs/cd-temp.md index 1246adac..c4a80e59 100644 --- a/docs/cd-temp.md +++ b/docs/cd-temp.md @@ -1,19 +1,34 @@ The *cd-temp.ps1* Script =========================== -cd-temp.ps1 - +This PowerShell script changes the current working directory to the temporary folder. Parameters ---------- ```powershell - +/Repos/PowerShell/scripts/cd-temp.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. ``` +Example +------- +```powershell +PS> ./cd-temp.ps1 +πŸ“‚C:\Users\Markus\AppData\Local\Temp with 2 files and 3 subfolders entered. + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + Script Content -------------- ```powershell @@ -21,37 +36,37 @@ Script Content .SYNOPSIS Sets the working directory to the temporary folder .DESCRIPTION - This PowerShell script changes the working directory to the temporary folder. + This PowerShell script changes the current working directory to the temporary folder. .EXAMPLE - PS> ./cd-temp - πŸ“‚C:\Users\Markus\AppData\Local\Temp (has 2 files and 3 subfolders) + PS> ./cd-temp.ps1 + πŸ“‚C:\Users\Markus\AppData\Local\Temp with 2 files and 3 subfolders entered. .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + function GetTempDir { if ("$env:TEMP" -ne "") { return "$env:TEMP" } if ("$env:TMP" -ne "") { return "$env:TMP" } - if ($IsLinux) { return "/tmp" } + if ($IsLinux -or $IsMacOS) { return "/tmp" } return "C:\Temp" } try { $path = GetTempDir - if (-not(Test-Path "$path" -pathType container)) { throw - "No temporary folder at $path" - } + if (-not(Test-Path "$path" -pathType container)) { throw "No temporary folder at: $path" } Set-Location "$path" $files = Get-ChildItem $path -attributes !Directory $folders = Get-ChildItem $path -attributes Directory - "πŸ“‚$path entered (has $($files.Count) files and $($folders.Count) subfolders)" + "πŸ“‚$path with $($files.Count) files and $($folders.Count) subfolders entered." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-templates.md b/docs/cd-templates.md index bce43d27..dfdd92e3 100644 --- a/docs/cd-templates.md +++ b/docs/cd-templates.md @@ -46,6 +46,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { if ($IsLinux) { if (-not(Test-Path "~/Templates" -pathType container)) { @@ -64,9 +66,9 @@ try { "πŸ“‚$path with $($files.Count) files and $($folders.Count) folders entered." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-trash.md b/docs/cd-trash.md index 00c24127..03a3ff94 100644 --- a/docs/cd-trash.md +++ b/docs/cd-trash.md @@ -1,36 +1,53 @@ The *cd-trash.ps1* Script =========================== -cd-trash.ps1 - +This PowerShell script changes the current working directory to the user's trash folder. Parameters ---------- ```powershell - +/Repos/PowerShell/scripts/cd-trash.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. ``` +Example +------- +```powershell +PS> ./cd-trash.ps1 +πŸ“‚C:\$Recycle.Bin\S-1-5-21-123404-23309-294260-1001 with 4 files and 0 folders entered. + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + Script Content -------------- ```powershell <# .SYNOPSIS - Sets the working directory to the trash folder + Sets the working dir to the trash folder .DESCRIPTION - This PowerShell script changes the working directory to the user's trash folder. + This PowerShell script changes the current working directory to the user's trash folder. .EXAMPLE - PS> ./cd-trash - πŸ“‚C:\$Recycle.Bin\S-1-5-21-123404-23309-294260-1001 entered (has 4 files and 0 subfolders) + PS> ./cd-trash.ps1 + πŸ“‚C:\$Recycle.Bin\S-1-5-21-123404-23309-294260-1001 with 4 files and 0 folders entered. .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + function GetCurrentUserSID { [CmdletBinding()] param() Add-Type -AssemblyName System.DirectoryServices.AccountManagement return ([System.DirectoryServices.AccountManagement.UserPrincipal]::Current).SID.Value @@ -49,12 +66,12 @@ try { Set-Location "$path" $files = Get-ChildItem $path -attributes !Directory $folders = Get-ChildItem $path -attributes Directory - "πŸ“‚$path entered (has $($files.Count) files and $($folders.Count) subfolders)" + "πŸ“‚$path with $($files.Count) files and $($folders.Count) folders entered." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-up.md b/docs/cd-up.md index 1136ba99..8af73e41 100644 --- a/docs/cd-up.md +++ b/docs/cd-up.md @@ -1,7 +1,7 @@ The *cd-up.ps1* Script =========================== -This PowerShell script changes the working directory to one directory level up. +This PowerShell script changes the current working directory to one directory level up. Parameters ---------- @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> .\cd-up +PS> .\cd-up.ps1 πŸ“‚C:\Users ``` @@ -36,9 +36,9 @@ Script Content .SYNOPSIS Sets the working directory to one level up .DESCRIPTION - This PowerShell script changes the working directory to one directory level up. + This PowerShell script changes the current working directory to one directory level up. .EXAMPLE - PS> .\cd-up + PS> .\cd-up.ps1 πŸ“‚C:\Users .LINK https://github.com/fleschutz/PowerShell @@ -46,6 +46,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $path = Resolve-Path ".." if (-not(Test-Path "$path" -pathType container)) { throw "Folder at πŸ“‚$path doesn't exist (yet)" } @@ -53,9 +55,9 @@ try { "πŸ“‚$path" exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-up2.md b/docs/cd-up2.md index e52ca1b9..97dc3160 100644 --- a/docs/cd-up2.md +++ b/docs/cd-up2.md @@ -1,7 +1,7 @@ The *cd-up2.ps1* Script =========================== -This PowerShell script changes the working directory to two directory level up. +This PowerShell script changes the current working directory to two directory level up. Parameters ---------- @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./cd-up2 +PS> ./cd-up2.ps1 πŸ“‚C:\ ``` @@ -34,11 +34,11 @@ Script Content ```powershell <# .SYNOPSIS - Sets the working directory to two directory levels up + Sets the working directory 2 directory levels up .DESCRIPTION - This PowerShell script changes the working directory to two directory level up. + This PowerShell script changes the current working directory to two directory level up. .EXAMPLE - PS> ./cd-up2 + PS> ./cd-up2.ps1 πŸ“‚C:\ .LINK https://github.com/fleschutz/PowerShell @@ -46,6 +46,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $path = Resolve-Path "../.." if (-not(Test-Path "$path" -pathType container)) { throw "Folder at πŸ“‚$path doesn't exist (yet)" } @@ -53,9 +55,9 @@ try { "πŸ“‚$path" exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-up3.md b/docs/cd-up3.md index eaf2e3e7..7acc6135 100644 --- a/docs/cd-up3.md +++ b/docs/cd-up3.md @@ -1,7 +1,7 @@ The *cd-up3.ps1* Script =========================== -This PowerShell script changes the working directory to three directory levels up. +This PowerShell script changes the current working directory to three directory levels up. Parameters ---------- @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./cd-up3 +PS> ./cd-up3.ps1 πŸ“‚C:\ ``` @@ -34,11 +34,11 @@ Script Content ```powershell <# .SYNOPSIS - Sets the working directory to three directory levels up + Sets the working directory 3 directory levels up .DESCRIPTION - This PowerShell script changes the working directory to three directory levels up. + This PowerShell script changes the current working directory to three directory levels up. .EXAMPLE - PS> ./cd-up3 + PS> ./cd-up3.ps1 πŸ“‚C:\ .LINK https://github.com/fleschutz/PowerShell @@ -46,6 +46,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $path = Resolve-Path "../../.." if (-not(Test-Path "$path" -pathType container)) { throw "Folder at πŸ“‚$path doesn't exist (yet)" } @@ -53,9 +55,9 @@ try { "πŸ“‚$path" exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-up4.md b/docs/cd-up4.md index 99aa489c..8702430f 100644 --- a/docs/cd-up4.md +++ b/docs/cd-up4.md @@ -1,7 +1,7 @@ The *cd-up4.ps1* Script =========================== -This PowerShell script changes the working directory to four directory levels up. +This PowerShell script changes the current working directory to four directory levels up. Parameters ---------- @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./cd-up4 +PS> ./cd-up4.ps1 πŸ“‚C:\ ``` @@ -34,11 +34,11 @@ Script Content ```powershell <# .SYNOPSIS - Sets the working directory to four directory levels up + Sets the working directory 4 directory levels up .DESCRIPTION - This PowerShell script changes the working directory to four directory levels up. + This PowerShell script changes the current working directory to four directory levels up. .EXAMPLE - PS> ./cd-up4 + PS> ./cd-up4.ps1 πŸ“‚C:\ .LINK https://github.com/fleschutz/PowerShell @@ -46,6 +46,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $path = Resolve-Path "../../../.." if (-not(Test-Path "$path" -pathType container)) { throw "Folder at πŸ“‚$path doesn't exist (yet)" } @@ -53,9 +55,9 @@ try { "πŸ“‚$path" exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-users.md b/docs/cd-users.md index d37ab15f..5fb58e60 100644 --- a/docs/cd-users.md +++ b/docs/cd-users.md @@ -46,19 +46,20 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $path = Resolve-Path "~/.." - if (-not(Test-Path "$path" -pathType container)) { - throw "No users directory at: $path" - } + if (-not(Test-Path "$path" -pathType container)) { throw "No users directory at: $path" } + Set-Location "$path" $folders = Get-ChildItem $path -attributes Directory "πŸ“‚$path with $($folders.Count) folders entered." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-videos.md b/docs/cd-videos.md index 38d8e372..fc0fa3e2 100644 --- a/docs/cd-videos.md +++ b/docs/cd-videos.md @@ -16,8 +16,8 @@ Parameters Example ------- ```powershell -PS> ./cd-videos -πŸ“‚C:\Users\Markus\Videos entered (has 3 files and 0 subfolders) +PS> ./cd-videos.ps1 +πŸ“‚C:\Users\Markus\Videos with 3 files and 0 folders entered. ``` @@ -38,14 +38,16 @@ Script Content .DESCRIPTION This PowerShell script changes the working directory to the user's videos folder. .EXAMPLE - PS> ./cd-videos - πŸ“‚C:\Users\Markus\Videos entered (has 3 files and 0 subfolders) + PS> ./cd-videos.ps1 + πŸ“‚C:\Users\Markus\Videos with 3 files and 0 folders entered. .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { if ($IsLinux) { $path = Resolve-Path "~/Videos" @@ -58,12 +60,12 @@ try { Set-Location "$path" $files = Get-ChildItem $path -attributes !Directory $folders = Get-ChildItem $path -attributes Directory - "πŸ“‚$path entered (has $($files.Count) files and $($folders.Count) subfolders)" + "πŸ“‚$path with $($files.Count) files and $($folders.Count) folders entered." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/cd-windows.md b/docs/cd-windows.md index 758c5606..3d5b5d2c 100644 --- a/docs/cd-windows.md +++ b/docs/cd-windows.md @@ -1,7 +1,7 @@ The *cd-windows.ps1* Script =========================== -This PowerShell script changes the working directory to the Windows directory. +This PowerShell script sets the current working directory to the Windows directory. Parameters ---------- @@ -16,8 +16,8 @@ Parameters Example ------- ```powershell -PS> ./cd-windows -πŸ“‚C:\Windows entered (has 7 files and 42 folders) +PS> ./cd-windows.ps1 +πŸ“‚C:\Windows with 7 files and 42 folders entered. ``` @@ -34,32 +34,35 @@ Script Content ```powershell <# .SYNOPSIS - Sets the working directory to the Windows directory + Sets the working dir to the Windows directory .DESCRIPTION - This PowerShell script changes the working directory to the Windows directory. + This PowerShell script sets the current working directory to the Windows directory. .EXAMPLE - PS> ./cd-windows - πŸ“‚C:\Windows entered (has 7 files and 42 folders) + PS> ./cd-windows.ps1 + πŸ“‚C:\Windows with 7 files and 42 folders entered. .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { + if ($IsLinux -or $IsMacOS) { throw "This script requires a Windows operating system" } + $path = Resolve-Path "$env:WINDIR" - if (-not(Test-Path "$path" -pathType container)) { - throw "No Windows directory at $path" - } + if (-not(Test-Path "$path" -pathType container)) { throw "No Windows directory at $path" } + Set-Location "$path" $files = Get-ChildItem $path -attributes !Directory $folders = Get-ChildItem $path -attributes Directory - "πŸ“‚$path entered (has $($files.Count) files and $($folders.Count) folders)" + "πŸ“‚$path with $($files.Count) files and $($folders.Count) folders entered." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/change-wallpaper.md b/docs/change-wallpaper.md index 39752150..724118d5 100644 --- a/docs/change-wallpaper.md +++ b/docs/change-wallpaper.md @@ -80,4 +80,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-admin.md b/docs/check-admin.md index 9b0eb32e..13bc8a4f 100644 --- a/docs/check-admin.md +++ b/docs/check-admin.md @@ -67,4 +67,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-apps.md b/docs/check-apps.md index 9da53898..cbfe784b 100644 --- a/docs/check-apps.md +++ b/docs/check-apps.md @@ -72,4 +72,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-bios.md b/docs/check-bios.md index f33ad3ab..f83a5640 100644 --- a/docs/check-bios.md +++ b/docs/check-bios.md @@ -75,4 +75,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-cpu.md b/docs/check-cpu.md index 7e7d7925..4b2b0582 100644 --- a/docs/check-cpu.md +++ b/docs/check-cpu.md @@ -104,4 +104,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-credentials.md b/docs/check-credentials.md index 7305a53a..839ad9c2 100644 --- a/docs/check-credentials.md +++ b/docs/check-credentials.md @@ -83,4 +83,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-day.md b/docs/check-day.md index faf55dc6..5ba0c489 100644 --- a/docs/check-day.md +++ b/docs/check-day.md @@ -57,4 +57,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-dns.md b/docs/check-dns.md index b1474dac..ce95634c 100644 --- a/docs/check-dns.md +++ b/docs/check-dns.md @@ -72,4 +72,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-drive-space.md b/docs/check-drive-space.md index 7afc09d7..b7d51216 100644 --- a/docs/check-drive-space.md +++ b/docs/check-drive-space.md @@ -112,4 +112,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-drives.md b/docs/check-drives.md index 5d215847..5e51501f 100644 --- a/docs/check-drives.md +++ b/docs/check-drives.md @@ -103,4 +103,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-dusk.md b/docs/check-dusk.md index 08914e14..2be4a8da 100644 --- a/docs/check-dusk.md +++ b/docs/check-dusk.md @@ -63,4 +63,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-easter-sunday.md b/docs/check-easter-sunday.md index 20e6dff0..a7b54096 100644 --- a/docs/check-easter-sunday.md +++ b/docs/check-easter-sunday.md @@ -61,4 +61,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-file-system.md b/docs/check-file-system.md index 7944fb89..9850031c 100644 --- a/docs/check-file-system.md +++ b/docs/check-file-system.md @@ -76,4 +76,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-file.md b/docs/check-file.md index c5ea2d47..ec4a4b0b 100644 --- a/docs/check-file.md +++ b/docs/check-file.md @@ -171,4 +171,4 @@ function Check-Header { param( $path ) Check-Header $Path ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-firewall.md b/docs/check-firewall.md index b4f1044f..2aef2c64 100644 --- a/docs/check-firewall.md +++ b/docs/check-firewall.md @@ -65,4 +65,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-gpu.md b/docs/check-gpu.md index 6d04ad51..a5b277c8 100644 --- a/docs/check-gpu.md +++ b/docs/check-gpu.md @@ -67,4 +67,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-hardware.md b/docs/check-hardware.md index 6d997024..eabb6fd0 100644 --- a/docs/check-hardware.md +++ b/docs/check-hardware.md @@ -64,4 +64,4 @@ Write-Host "`n === H A R D W A R E ===" -foregroundColor green exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-health.md b/docs/check-health.md index 810f1b09..23bb08de 100644 --- a/docs/check-health.md +++ b/docs/check-health.md @@ -58,4 +58,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-independence-day.md b/docs/check-independence-day.md index 053db7cd..87f6544e 100644 --- a/docs/check-independence-day.md +++ b/docs/check-independence-day.md @@ -61,4 +61,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-ipv4-address.md b/docs/check-ipv4-address.md index cbcb2240..822526da 100644 --- a/docs/check-ipv4-address.md +++ b/docs/check-ipv4-address.md @@ -85,4 +85,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-ipv6-address.md b/docs/check-ipv6-address.md index c8e36ae4..aae9c388 100644 --- a/docs/check-ipv6-address.md +++ b/docs/check-ipv6-address.md @@ -99,4 +99,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-iss-position.md b/docs/check-iss-position.md index 318a161c..71565a2a 100644 --- a/docs/check-iss-position.md +++ b/docs/check-iss-position.md @@ -55,4 +55,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-mac-address.md b/docs/check-mac-address.md index 273329a0..1373840e 100644 --- a/docs/check-mac-address.md +++ b/docs/check-mac-address.md @@ -88,4 +88,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-midnight.md b/docs/check-midnight.md index 212464d2..e0b43848 100644 --- a/docs/check-midnight.md +++ b/docs/check-midnight.md @@ -60,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-month.md b/docs/check-month.md index fb732efb..200688eb 100644 --- a/docs/check-month.md +++ b/docs/check-month.md @@ -57,4 +57,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-moon-phase.md b/docs/check-moon-phase.md index e0c94e15..bb09ce07 100644 --- a/docs/check-moon-phase.md +++ b/docs/check-moon-phase.md @@ -76,4 +76,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-motherboard.md b/docs/check-motherboard.md index 23c70339..f68c2183 100644 --- a/docs/check-motherboard.md +++ b/docs/check-motherboard.md @@ -59,4 +59,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-network.md b/docs/check-network.md index 956f0154..ce19de66 100644 --- a/docs/check-network.md +++ b/docs/check-network.md @@ -67,4 +67,4 @@ Write-Host "`n === N E T W O R K ===" -foregroundColor green exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-noon.md b/docs/check-noon.md index 2d1954d9..82273d7c 100644 --- a/docs/check-noon.md +++ b/docs/check-noon.md @@ -59,4 +59,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-os.md b/docs/check-os.md index a094ec66..9c904cd9 100644 --- a/docs/check-os.md +++ b/docs/check-os.md @@ -73,4 +73,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-outlook.md b/docs/check-outlook.md index 1abaf162..bd0cbcd6 100644 --- a/docs/check-outlook.md +++ b/docs/check-outlook.md @@ -65,4 +65,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-password.md b/docs/check-password.md index 9b11d124..8669ed9d 100644 --- a/docs/check-password.md +++ b/docs/check-password.md @@ -95,4 +95,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:34)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-pending-reboot.md b/docs/check-pending-reboot.md index 7629abce..d05d3556 100644 --- a/docs/check-pending-reboot.md +++ b/docs/check-pending-reboot.md @@ -90,4 +90,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-pnp-devices.md b/docs/check-pnp-devices.md index a7d00a00..81e2e389 100644 --- a/docs/check-pnp-devices.md +++ b/docs/check-pnp-devices.md @@ -65,4 +65,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-power.md b/docs/check-power.md index 36ffbe9f..ec329bd9 100644 --- a/docs/check-power.md +++ b/docs/check-power.md @@ -91,4 +91,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-powershell.md b/docs/check-powershell.md index 26570633..e2ebc2eb 100644 --- a/docs/check-powershell.md +++ b/docs/check-powershell.md @@ -59,4 +59,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-ps1-file.md b/docs/check-ps1-file.md index 6a2da542..338e368e 100644 --- a/docs/check-ps1-file.md +++ b/docs/check-ps1-file.md @@ -77,4 +77,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:20)* diff --git a/docs/check-ram.md b/docs/check-ram.md index 0d1bcb6d..a3a8a8a7 100644 --- a/docs/check-ram.md +++ b/docs/check-ram.md @@ -98,4 +98,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/check-repo.md b/docs/check-repo.md index 94635468..c2869c02 100644 --- a/docs/check-repo.md +++ b/docs/check-repo.md @@ -6,9 +6,9 @@ This PowerShell script verifies the integrity of a local Git repository and perf Parameters ---------- ```powershell -/Repos/PowerShell/scripts/check-repo.ps1 [[-pathToRepo] ] [] +/Repos/PowerShell/scripts/check-repo.ps1 [[-path] ] [] --pathToRepo +-path Specifies the file path to the local Git repository (current working directory by default) Required? false @@ -51,10 +51,10 @@ Script Content ```powershell <# .SYNOPSIS - Checks a Git repository + Checks a Git repo .DESCRIPTION This PowerShell script verifies the integrity of a local Git repository and performs maintenance tasks. -.PARAMETER pathToRepo +.PARAMETER path Specifies the file path to the local Git repository (current working directory by default) .EXAMPLE PS> ./check-repo.ps1 C:\MyRepo @@ -72,7 +72,7 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -param([string]$pathToRepo = "$PWD") +param([string]$path = "$PWD") try { $stopWatch = [system.diagnostics.stopwatch]::startNew() @@ -82,7 +82,7 @@ try { if ($lastExitCode -ne 0) { throw "Can't execute 'git' - make sure Git is installed and available" } Write-Host "⏳ (2/10) Checking local repository... " -noNewline - $FullPath = Resolve-Path "$pathToRepo" + $FullPath = Resolve-Path "$path" if (!(Test-Path "$FullPath" -pathType Container)) { throw "Can't access folder: $FullPath" } "$FullPath" @@ -122,12 +122,12 @@ try { $repoDirName = (Get-Item "$FullPath").Name [int]$elapsed = $stopWatch.Elapsed.TotalSeconds - "βœ… Checked πŸ“‚$repoDirName repo in $($elapsed)s." + "βœ… Repo '$repoDirName' has been checked in $($elapsed)s." exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/check-repos.md b/docs/check-repos.md index ea6de9fb..82b43493 100644 --- a/docs/check-repos.md +++ b/docs/check-repos.md @@ -28,9 +28,9 @@ Example ```powershell PS> ./check-repos.ps1 C:\Repos ⏳ Checking parent folder πŸ“‚C:\Repos... 16 subfolders -⏳ Checking πŸ“‚rust repository (1/16)... +⏳ Checking repo 'rust' (1/16)... ... -βœ… Checked all 16 Git repos in πŸ“‚C:\Repos in 356s. +βœ… 16 Git repos checked at πŸ“‚C:\Repos in 356s. ``` @@ -55,9 +55,9 @@ Script Content .EXAMPLE PS> ./check-repos.ps1 C:\Repos ⏳ Checking parent folder πŸ“‚C:\Repos... 16 subfolders - ⏳ Checking πŸ“‚rust repository (1/16)... + ⏳ Checking repo 'rust' (1/16)... ... - βœ… Checked all 16 Git repos in πŸ“‚C:\Repos in 356s. + βœ… 16 Git repos checked at πŸ“‚C:\Repos in 356s. .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -78,13 +78,13 @@ try { [int]$step = 1 foreach ($folder in $folders) { - "`n⏳ Checking πŸ“‚$folder repository ($step/$numFolders)..." + "`n⏳ Checking repo '$folder' ($step/$numFolders)..." & "$PSScriptRoot/check-repo.ps1" "$folder" $step++ } [int]$elapsed = $stopWatch.Elapsed.TotalSeconds - "βœ… Checked all $numFolders Git repos in πŸ“‚$parentDir in $($elapsed)s." + "βœ… $numFolders Git repos checked at πŸ“‚$parentDir in $($elapsed)s." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -92,4 +92,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/check-santa.md b/docs/check-santa.md index 95d13f3f..bff3aba4 100644 --- a/docs/check-santa.md +++ b/docs/check-santa.md @@ -56,4 +56,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/check-smart-devices.md b/docs/check-smart-devices.md index 15d9005c..7ad58916 100644 --- a/docs/check-smart-devices.md +++ b/docs/check-smart-devices.md @@ -120,4 +120,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/check-software.md b/docs/check-software.md index ef42b3fb..f6e7faf2 100644 --- a/docs/check-software.md +++ b/docs/check-software.md @@ -64,4 +64,4 @@ Write-Host "`n === S O F T W A R E ===" -foregroundColor green exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/check-subnet-mask.md b/docs/check-subnet-mask.md index bb0d349a..0032924a 100644 --- a/docs/check-subnet-mask.md +++ b/docs/check-subnet-mask.md @@ -85,4 +85,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/check-swap-space.md b/docs/check-swap-space.md index 884cb40f..30459909 100644 --- a/docs/check-swap-space.md +++ b/docs/check-swap-space.md @@ -108,4 +108,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/check-symlinks.md b/docs/check-symlinks.md index 1a40c8f4..52e2f65c 100644 --- a/docs/check-symlinks.md +++ b/docs/check-symlinks.md @@ -6,10 +6,10 @@ This PowerShell script checks all symbolic links in a directory tree. It returns Parameters ---------- ```powershell -/Repos/PowerShell/scripts/check-symlinks.ps1 [[-Folder] ] [] +/Repos/PowerShell/scripts/check-symlinks.ps1 [[-path] ] [] --Folder - Specifies the path to the folder +-path + Specifies the file path to the directory tree Required? false Position? 1 @@ -26,9 +26,9 @@ Parameters Example ------- ```powershell -PS> ./check-symlinks D:\ -⏳ Please wait while checking symlinks at: πŸ“‚D:\ ... -βœ… Found 0 broken symlinks at πŸ“‚D:\ in 60s. +PS> ./check-symlinks C:\Windows +⏳ Checking symlinks at C:\Windows including subfolders... +βœ… No symlinks at C:\Windows (took 102s). ``` @@ -45,29 +45,29 @@ Script Content ```powershell <# .SYNOPSIS - Checks all symlinks in a folder + Checks all symlinks in a dir tree .DESCRIPTION This PowerShell script checks all symbolic links in a directory tree. It returns the number of broken symlinks as exit value. -.PARAMETER folder - Specifies the path to the folder +.PARAMETER path + Specifies the file path to the directory tree .EXAMPLE - PS> ./check-symlinks D:\ - ⏳ Please wait while checking symlinks at: πŸ“‚D:\ ... - βœ… Found 0 broken symlinks at πŸ“‚D:\ in 60s. + PS> ./check-symlinks C:\Windows + ⏳ Checking symlinks at C:\Windows including subfolders... + βœ… No symlinks at C:\Windows (took 102s). .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$Folder = "") +param([string]$path = "") try { - if ($Folder -eq "" ) { $Folder = Read-Host "Enter the path to the folder" } + if ($path -eq "" ) { $path = Read-Host "Enter the file path to the directory tree" } $stopWatch = [system.diagnostics.stopwatch]::startNew() - $fullPath = Resolve-Path "$Folder" - "⏳ Please wait while checking symlinks at πŸ“‚$fullPath ..." + $fullPath = Resolve-Path "$path" + "⏳ Checking symlinks at $fullPath including subfolders..." [int]$numTotal = [int]$numBroken = 0 Get-ChildItem $fullPath -recurse | Where { $_.Attributes -match "ReparsePoint" } | ForEach-Object { @@ -86,17 +86,19 @@ try { [int]$elapsed = $stopWatch.Elapsed.TotalSeconds if ($numTotal -eq 0) { - "βœ… No symlink found at πŸ“‚$fullPath in $($elapsed)s." + "βœ… No symlinks at $fullPath (took $($elapsed)s)." + } elseif ($numBroken -eq 0) { + "βœ… No broken symlinks at $fullPath ($numTotal symlinks in total, took $($elapsed)s)." } elseif ($numBroken -eq 1) { - "βœ… Found $numBroken broken symlink at πŸ“‚$fullPath in $($elapsed)s ($numTotal symlinks in total)." + "⚠️ 1 broken symlink within $fullPath ($numTotal symlinks in total, took $($elapsed)s)." } else { - "βœ… Found $numBroken broken symlinks at πŸ“‚$fullPath in $($elapsed)s ($numTotal symlinks in total)." + "⚠️ $numBroken broken symlinks within $fullPath ($numTotal symlinks in total, took $($elapsed)s)." } exit $numBroken } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/check-time-zone.md b/docs/check-time-zone.md index e58e41b9..f153aad3 100644 --- a/docs/check-time-zone.md +++ b/docs/check-time-zone.md @@ -66,4 +66,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/check-uptime.md b/docs/check-uptime.md index b4ae9919..92e341cf 100644 --- a/docs/check-uptime.md +++ b/docs/check-uptime.md @@ -114,4 +114,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/check-vpn.md b/docs/check-vpn.md index f7ce8a1d..e59f767f 100644 --- a/docs/check-vpn.md +++ b/docs/check-vpn.md @@ -65,4 +65,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/check-weather.md b/docs/check-weather.md index 84504f65..97db6349 100644 --- a/docs/check-weather.md +++ b/docs/check-weather.md @@ -82,4 +82,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/check-week.md b/docs/check-week.md index 17f111b0..c37c73f9 100644 --- a/docs/check-week.md +++ b/docs/check-week.md @@ -54,4 +54,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/check-wind.md b/docs/check-wind.md index febf08ea..139b3e83 100644 --- a/docs/check-wind.md +++ b/docs/check-wind.md @@ -73,4 +73,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/check-windows-system-files.md b/docs/check-windows-system-files.md index 4a07c139..5f9b3050 100644 --- a/docs/check-windows-system-files.md +++ b/docs/check-windows-system-files.md @@ -60,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/check-xml-file.md b/docs/check-xml-file.md index 60a85be5..e5961f1b 100644 --- a/docs/check-xml-file.md +++ b/docs/check-xml-file.md @@ -86,4 +86,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/check-xml-files.md b/docs/check-xml-files.md index f9e0229e..8da42506 100644 --- a/docs/check-xml-files.md +++ b/docs/check-xml-files.md @@ -85,4 +85,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/clean-repo.md b/docs/clean-repo.md index 1dab5908..596a05c6 100644 --- a/docs/clean-repo.md +++ b/docs/clean-repo.md @@ -28,11 +28,11 @@ Example ------- ```powershell 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 +⏳ (1/4) Searching for Git executable... git version 2.50.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. +βœ… Repo 'rust' is clean now. ``` @@ -57,11 +57,11 @@ Script Content Specifies the file path to the local Git repository (current working directory by default) .EXAMPLE 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 + ⏳ (1/4) Searching for Git executable... git version 2.50.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. + βœ… Repo 'rust' is clean now. .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -71,6 +71,8 @@ Script Content param([string]$path = "$PWD") try { + $stopWatch = [system.diagnostics.stopwatch]::startNew() + Write-Host "⏳ (1/4) Searching for Git executable... " -noNewline & git --version if ($lastExitCode -ne 0) { throw "Can't execute 'git' - make sure Git is installed and available" } @@ -91,12 +93,13 @@ try { & git -C "$path" submodule foreach --recursive git clean -xfd -f # to delete all untracked files in the submodules if ($lastExitCode -ne 0) { throw "'git clean' in the submodules failed with exit code $lastExitCode" } - "βœ… Repo πŸ“‚$repoName is clean now." + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "βœ… Repo '$repoName' cleaned in $($elapsed)s." exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/clean-repos.md b/docs/clean-repos.md index 094527fc..bc3074f9 100644 --- a/docs/clean-repos.md +++ b/docs/clean-repos.md @@ -96,9 +96,9 @@ try { "βœ… Cleaned $numFolders Git repositories under πŸ“‚$parentDirName in $($elapsed)s." exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/clear-dns-cache.md b/docs/clear-dns-cache.md index 8eed1f7d..6536c42a 100644 --- a/docs/clear-dns-cache.md +++ b/docs/clear-dns-cache.md @@ -1,7 +1,7 @@ The *clear-dns-cache.ps1* Script =========================== -This PowerShell script clears the DNS client cache of the local computer. +This PowerShell script empties the DNS client cache of the local computer. Parameters ---------- @@ -17,7 +17,7 @@ Example ------- ```powershell PS> ./clear-dns-cache.ps1 -βœ… Cleared DNS cache in 1s. +βœ… DNS cache cleared in 1s. ``` @@ -36,10 +36,10 @@ Script Content .SYNOPSIS Clears the DNS cache .DESCRIPTION - This PowerShell script clears the DNS client cache of the local computer. + This PowerShell script empties the DNS client cache of the local computer. .EXAMPLE PS> ./clear-dns-cache.ps1 - βœ… Cleared DNS cache in 1s. + βœ… DNS cache cleared in 1s. .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -52,12 +52,12 @@ try { Clear-DnsClientCache [int]$elapsed = $stopWatch.Elapsed.TotalSeconds - "βœ… Cleared DNS cache in $($elapsed)s." + "βœ… DNS cache cleared in $($elapsed)s." exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ Error: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/clear-recycle-bin.md b/docs/clear-recycle-bin.md index 89fc3e9e..e0558427 100644 --- a/docs/clear-recycle-bin.md +++ b/docs/clear-recycle-bin.md @@ -58,4 +58,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/clone-repos.md b/docs/clone-repos.md index fa9d0ae3..02c384df 100644 --- a/docs/clone-repos.md +++ b/docs/clone-repos.md @@ -119,4 +119,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/clone-shallow.md b/docs/clone-shallow.md index 00ed4d84..37679cd5 100644 --- a/docs/clone-shallow.md +++ b/docs/clone-shallow.md @@ -75,4 +75,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-calculator.md b/docs/close-calculator.md index 1bdcc7af..788b1c34 100644 --- a/docs/close-calculator.md +++ b/docs/close-calculator.md @@ -48,4 +48,4 @@ Stop-Process -name "CalculatorApp" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-chrome.md b/docs/close-chrome.md index ab2d42ec..f2b27d42 100644 --- a/docs/close-chrome.md +++ b/docs/close-chrome.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-cortana.md b/docs/close-cortana.md index f2daf0ea..8ef8e16c 100644 --- a/docs/close-cortana.md +++ b/docs/close-cortana.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-edge.md b/docs/close-edge.md index dd4aaf1e..1f14b9c7 100644 --- a/docs/close-edge.md +++ b/docs/close-edge.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne 0) { exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-file-explorer.md b/docs/close-file-explorer.md index 5e4244c8..ec768dba 100644 --- a/docs/close-file-explorer.md +++ b/docs/close-file-explorer.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-firefox.md b/docs/close-firefox.md index c2066f36..b2e85e02 100644 --- a/docs/close-firefox.md +++ b/docs/close-firefox.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-git-extensions.md b/docs/close-git-extensions.md index 11c4faab..084c332d 100644 --- a/docs/close-git-extensions.md +++ b/docs/close-git-extensions.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne 0) { exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-magnifier.md b/docs/close-magnifier.md index b9dcd560..3e69dfca 100644 --- a/docs/close-magnifier.md +++ b/docs/close-magnifier.md @@ -48,4 +48,4 @@ tskill magnify exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-microsoft-paint.md b/docs/close-microsoft-paint.md index 8a2a41cb..a0c07132 100644 --- a/docs/close-microsoft-paint.md +++ b/docs/close-microsoft-paint.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne 0) { exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-microsoft-store.md b/docs/close-microsoft-store.md index 81797ff7..ca6892f0 100644 --- a/docs/close-microsoft-store.md +++ b/docs/close-microsoft-store.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne 0) { exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-netflix.md b/docs/close-netflix.md index 2f117a01..c8d02411 100644 --- a/docs/close-netflix.md +++ b/docs/close-netflix.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-notepad.md b/docs/close-notepad.md index dfdea522..51e4d1ec 100644 --- a/docs/close-notepad.md +++ b/docs/close-notepad.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-obs-studio.md b/docs/close-obs-studio.md index 20901dc3..629c69f7 100644 --- a/docs/close-obs-studio.md +++ b/docs/close-obs-studio.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne 0) { exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-one-calendar.md b/docs/close-one-calendar.md index 746a74e5..c5dba625 100644 --- a/docs/close-one-calendar.md +++ b/docs/close-one-calendar.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne 0) { exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-outlook.md b/docs/close-outlook.md index 7ed04a7a..bd3e69f4 100644 --- a/docs/close-outlook.md +++ b/docs/close-outlook.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne 0) { exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-paint-three-d.md b/docs/close-paint-three-d.md index 44392381..00484627 100644 --- a/docs/close-paint-three-d.md +++ b/docs/close-paint-three-d.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne 0) { exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-program.md b/docs/close-program.md index 3b18e522..5ea98333 100644 --- a/docs/close-program.md +++ b/docs/close-program.md @@ -121,4 +121,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-serenade.md b/docs/close-serenade.md index 70533ae9..d12f6225 100644 --- a/docs/close-serenade.md +++ b/docs/close-serenade.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-snipping-tool.md b/docs/close-snipping-tool.md index f663ec1a..2e6fcc45 100644 --- a/docs/close-snipping-tool.md +++ b/docs/close-snipping-tool.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-spotify.md b/docs/close-spotify.md index c9916169..12437792 100644 --- a/docs/close-spotify.md +++ b/docs/close-spotify.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-task-manager.md b/docs/close-task-manager.md index 638b6fc8..858ea98c 100644 --- a/docs/close-task-manager.md +++ b/docs/close-task-manager.md @@ -48,4 +48,4 @@ tskill taskmgr exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-three-d-viewer.md b/docs/close-three-d-viewer.md index e784fafd..ee0777a7 100644 --- a/docs/close-three-d-viewer.md +++ b/docs/close-three-d-viewer.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne 0) { exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-thunderbird.md b/docs/close-thunderbird.md index d13dcd8d..42034674 100644 --- a/docs/close-thunderbird.md +++ b/docs/close-thunderbird.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne 0) { exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-visual-studio.md b/docs/close-visual-studio.md index bb624b26..094e62ad 100644 --- a/docs/close-visual-studio.md +++ b/docs/close-visual-studio.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne 0) { exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-vlc.md b/docs/close-vlc.md index b2313d24..d9c4705d 100644 --- a/docs/close-vlc.md +++ b/docs/close-vlc.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/close-windows-terminal.md b/docs/close-windows-terminal.md index 99bd7db2..34c63311 100644 --- a/docs/close-windows-terminal.md +++ b/docs/close-windows-terminal.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/configure-git.md b/docs/configure-git.md index 11db54f8..106551e3 100644 --- a/docs/configure-git.md +++ b/docs/configure-git.md @@ -144,4 +144,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/connect-vpn.md b/docs/connect-vpn.md index 11872595..b6c4077b 100644 --- a/docs/connect-vpn.md +++ b/docs/connect-vpn.md @@ -62,4 +62,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/convert-csv2txt.md b/docs/convert-csv2txt.md index 0b5fa884..5812694d 100644 --- a/docs/convert-csv2txt.md +++ b/docs/convert-csv2txt.md @@ -73,4 +73,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/convert-dir27z.md b/docs/convert-dir27z.md index 0162b59f..b5a175bd 100644 --- a/docs/convert-dir27z.md +++ b/docs/convert-dir27z.md @@ -93,4 +93,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/convert-dir2zip.md b/docs/convert-dir2zip.md index 9366930f..827bd47a 100644 --- a/docs/convert-dir2zip.md +++ b/docs/convert-dir2zip.md @@ -90,4 +90,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/convert-docx2md.md b/docs/convert-docx2md.md index 30d4c1cd..ec728a49 100644 --- a/docs/convert-docx2md.md +++ b/docs/convert-docx2md.md @@ -82,4 +82,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/convert-frames2mp4.md b/docs/convert-frames2mp4.md index 0669c088..83881d82 100644 --- a/docs/convert-frames2mp4.md +++ b/docs/convert-frames2mp4.md @@ -60,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/convert-history2ps1.md b/docs/convert-history2ps1.md index af7ec075..78679c8a 100644 --- a/docs/convert-history2ps1.md +++ b/docs/convert-history2ps1.md @@ -80,4 +80,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/convert-image2ascii.md b/docs/convert-image2ascii.md index 61303f6d..3bea3749 100644 --- a/docs/convert-image2ascii.md +++ b/docs/convert-image2ascii.md @@ -114,4 +114,4 @@ Script Content } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/convert-image2blurred-frames.md b/docs/convert-image2blurred-frames.md index 0baf9a8f..7f9c09de 100644 --- a/docs/convert-image2blurred-frames.md +++ b/docs/convert-image2blurred-frames.md @@ -70,4 +70,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/convert-image2pixelated-frames.md b/docs/convert-image2pixelated-frames.md index 252117c3..583f3be9 100644 --- a/docs/convert-image2pixelated-frames.md +++ b/docs/convert-image2pixelated-frames.md @@ -70,4 +70,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/convert-images2webp.md b/docs/convert-images2webp.md index d5694422..463409ae 100644 --- a/docs/convert-images2webp.md +++ b/docs/convert-images2webp.md @@ -287,4 +287,4 @@ Write-Host "Output directory: $OutputDir" Write-Host "=====================================" -ForegroundColor Green ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:35)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/convert-md2docx.md b/docs/convert-md2docx.md index b815f5e6..1d96dd7a 100644 --- a/docs/convert-md2docx.md +++ b/docs/convert-md2docx.md @@ -22,4 +22,4 @@ Script Content gci -r -i *.md |foreach{$docx=$_.directoryname+"\"+$_.basename+".docx";pandoc -f markdown -s --citeproc $_.name -o $docx} ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/convert-md2html.md b/docs/convert-md2html.md index 3d3c0155..dcd76fbb 100644 --- a/docs/convert-md2html.md +++ b/docs/convert-md2html.md @@ -81,4 +81,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/convert-md2pdf.md b/docs/convert-md2pdf.md index 937c58dc..4be07284 100644 --- a/docs/convert-md2pdf.md +++ b/docs/convert-md2pdf.md @@ -20,4 +20,4 @@ Script Content gci -r -i *.md |foreach{$pdf=$_.directoryname+"\"+$_.basename+".pdf";pandoc -f markdown -s --citeproc $_.name -o $pdf} ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/convert-mysql2csv.md b/docs/convert-mysql2csv.md index 9e3aa816..c528c16e 100644 --- a/docs/convert-mysql2csv.md +++ b/docs/convert-mysql2csv.md @@ -124,4 +124,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/convert-ps2bat.md b/docs/convert-ps2bat.md index da065dc8..f49d9b81 100644 --- a/docs/convert-ps2bat.md +++ b/docs/convert-ps2bat.md @@ -90,4 +90,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/convert-ps2md.md b/docs/convert-ps2md.md index 5784c586..e39492f0 100644 --- a/docs/convert-ps2md.md +++ b/docs/convert-ps2md.md @@ -186,4 +186,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/convert-sql2csv.md b/docs/convert-sql2csv.md index 61c03105..1e7ed4e6 100644 --- a/docs/convert-sql2csv.md +++ b/docs/convert-sql2csv.md @@ -125,4 +125,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/convert-txt2wav.md b/docs/convert-txt2wav.md index b9f89421..7cf60d13 100644 --- a/docs/convert-txt2wav.md +++ b/docs/convert-txt2wav.md @@ -86,4 +86,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/copy-broken-file.md b/docs/copy-broken-file.md new file mode 100644 index 00000000..662496d7 --- /dev/null +++ b/docs/copy-broken-file.md @@ -0,0 +1,686 @@ +The *copy-broken-file.ps1* Script +=========================== + +This script will copy the specified file even if it contains unreadable blocks caused by device I/O errors and such. The block that it can not read will be replaced with zeros. The size of the block is determined by the buffer. So, to optimize it for speed, use a large buffer. To optimize for accuracy, use a small buffer, smallest being the cluter size of the partition where your sourcefile resides. + +Parameters +---------- +```powershell +/Repos/PowerShell/scripts/copy-broken-file.ps1 [-SourceFilePath] [-DestinationFilePath] [[-BufferSize] ] [[-MaxRetries] ] [-Overwrite] [[-Position] ] [[-PositionEnd] ] [-IgnoreBadBlocksFile] [-DeleteSourceOnSuccess] [[-BufferGranularSize] ] [[-ProgressParentId] ] [] + +-SourceFilePath + Path to the source file. + + Required? true + Position? 1 + Default value + Accept pipeline input? true (ByValue) + Aliases + Accept wildcard characters? false + +-DestinationFilePath + Path to the destination file. + + Required? true + Position? 2 + Default value + Accept pipeline input? true (ByValue) + Aliases + Accept wildcard characters? false + +-BufferSize + + Required? false + Position? 3 + Default value 4096 + Accept pipeline input? false + Aliases + Accept wildcard characters? false + +-MaxRetries + 4096: the default windows cluster size. + + Required? false + Position? 4 + Default value 0 + Accept pipeline input? false + Aliases + Accept wildcard characters? false + +-Overwrite [] + + Required? false + Position? named + Default value False + Accept pipeline input? false + Aliases + Accept wildcard characters? false + +-Position + + Required? false + Position? 5 + Default value 0 + Accept pipeline input? true (ByValue) + Aliases + Accept wildcard characters? false + +-PositionEnd + must be 0, current limitation + + Required? false + Position? 6 + Default value -1 + Accept pipeline input? true (ByValue) + Aliases + Accept wildcard characters? false + +-IgnoreBadBlocksFile [] + must be -1, current limitation + + Required? false + Position? named + Default value False + Accept pipeline input? false + Aliases + Accept wildcard characters? false + +-DeleteSourceOnSuccess [] + not implemented + + Required? false + Position? named + Default value False + Accept pipeline input? false + Aliases + Accept wildcard characters? false + +-BufferGranularSize + + Required? false + Position? 7 + Default value -1 + Accept pipeline input? false + Aliases + Accept wildcard characters? false + +-ProgressParentId + If > 0, use a larger buffer for speed, and only revert to granular size on an error block. Should be and exact divisor of buffer (BufferSize should be a multiple of BufferGranularSize) + + Required? false + Position? 8 + Default value -1 + Accept pipeline input? true (ByValue) + Aliases + Accept wildcard characters? false + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Inputs +------ +... + +Example +------- +```powershell +PS > .\Force-Copy.ps1 -SourceFilePath "file_path_on_bad_disk" -DestinationFilePath "destinaton_path" -MaxRetries 6 + + + +This will copy file_path_on_bad_disk to destinaton_path with maximum of 6 retries on each cluster of 4096 bytes encountered. Usually 6 retries is enough to succeed, unless the sector is really completely unreadable. + +``` + +Example +------- +```powershell +PS > Get-ChildItem '*.jpg' -Recurse -File -Force | foreach {.\Force-Copy.ps1 -SourceFilePath $_.FullName -DestinationFilePath ("C:\Saved"+(Split-Path $_.FullName -NoQualifier)) -Maxretries 2} + + + +Get-ChildItem '*.jpg' -Recurse -File -Force | foreach {.\Force-Copy.ps1 -SourceFilePath $_.FullName -DestinationFilePath ("C:\Saved"+(Split-Path $_.FullName -NoQualifier)) -Maxretries 2 -Overwrite} + +This command will copy all jpg's beginning with "Total" and copy them to "C:\Saved\relative_path" preserving their relative path. +When run the second time, the script will only try to reread the bad blocks in the source file, skipping data which was copied well in the previous run. This can be used to efficiently retry reading bad blocks. + +``` + +Example +------- +```powershell +PS > .\Force-Copy.ps1 -SourceFilePath "file_path_on_bad_disk" -DestinationFilePath "destinaton_path" -MaxRetries 6 -Position 1867264 -PositionEnd (1867264+4096) + + + +Suppose you have a repairable rar file, which you tried to repair, and it reports that the sector 3647 at offsets 1867264..1871360 can not be repaired. You can still try to read that specific sector with the above command. + +``` + +Example +------- +```powershell +PS > .\Force-Copy.ps1 -SourceFilePath "file_path_on_bad_disk" -DestinationFilePath "destinaton_path" -MaxRetries 6 -BufferSize 33554432 -BufferGranularSize 4096 + + + +This will quickly copy the file using a 32 MB buffer, and if it encounters an error, it will retry using a 4K buffer (so you get the best of both worlds, performance of a large buffer, and the minimized data loss of a smaller buffer). + +``` + +Script Content +-------------- +```powershell +## .SYNOPSIS +######################### +## This script copies a file, ignoring device I/O errors that abort the reading of files in most applications. +## +## .DESCRIPTION +######################### +## This script will copy the specified file even if it contains unreadable blocks caused by device I/O errors and such. The block that it can not read will be replaced with zeros. The size of the block is determined by the buffer. So, to optimize it for speed, use a large buffer. To optimize for accuracy, use a small buffer, smallest being the cluter size of the partition where your sourcefile resides. +## +## .OUTPUTS +######################### +## Errorcode 0: Copy operation finished without errors. +## Errorcode 1: Copy operation finished with unreadable blocks. +## Errorcode 2: Destination file exists, but -Overwrite not specified. +## Errorcode 3: Destination file exists but has no bad blocks (i.e. no badblocks.xml file found). +## Errorcode 4: Destination file can not be written to. +## +## .INPUTS +######################### +## ... +## +## .PARAMETER SourceFilePath +## Path to the source file. +## +## .PARAMETER DestinationFilePath +## Path to the destination file. +## +## .PARAMETER Buffer +## It makes absolutely no sense to set this less than the cluser size of the partition. Setting it lower than cluster size might force rereading a bad sector in a cluster multiple times. Better is to adjust the retry option. Also, System.IO.FileStream buffers input and output for better performance. (https://docs.microsoft.com/en-us/dotnet/api/system.io.filestream). +## +## .EXAMPLE +## .\Force-Copy.ps1 -SourceFilePath "file_path_on_bad_disk" -DestinationFilePath "destinaton_path" -MaxRetries 6 +## +## This will copy file_path_on_bad_disk to destinaton_path with maximum of 6 retries on each cluster of 4096 bytes encountered. Usually 6 retries is enough to succeed, unless the sector is really completely unreadable. +## +## .EXAMPLE +## Get-ChildItem '*.jpg' -Recurse -File -Force | foreach {.\Force-Copy.ps1 -SourceFilePath $_.FullName -DestinationFilePath ("C:\Saved"+(Split-Path $_.FullName -NoQualifier)) -Maxretries 2} +## +## Get-ChildItem '*.jpg' -Recurse -File -Force | foreach {.\Force-Copy.ps1 -SourceFilePath $_.FullName -DestinationFilePath ("C:\Saved"+(Split-Path $_.FullName -NoQualifier)) -Maxretries 2 -Overwrite} +## +## This command will copy all jpg's beginning with "Total" and copy them to "C:\Saved\relative_path" preserving their relative path. +## When run the second time, the script will only try to reread the bad blocks in the source file, skipping data which was copied well in the previous run. This can be used to efficiently retry reading bad blocks. +## +## .EXAMPLE +## .\Force-Copy.ps1 -SourceFilePath "file_path_on_bad_disk" -DestinationFilePath "destinaton_path" -MaxRetries 6 -Position 1867264 -PositionEnd (1867264+4096) +## +## Suppose you have a repairable rar file, which you tried to repair, and it reports that the sector 3647 at offsets 1867264..1871360 can not be repaired. You can still try to read that specific sector with the above command. +## +## .EXAMPLE +## .\Force-Copy.ps1 -SourceFilePath "file_path_on_bad_disk" -DestinationFilePath "destinaton_path" -MaxRetries 6 -BufferSize 33554432 -BufferGranularSize 4096 +## +## This will quickly copy the file using a 32 MB buffer, and if it encounters an error, it will retry using a 4K buffer (so you get the best of both worlds, performance of a large buffer, and the minimized data loss of a smaller buffer). +######################### + +[CmdletBinding()] +param( + [Parameter(Mandatory=$true, + ValueFromPipeline=$true, + HelpMessage="Source file path.")] + [string][ValidateScript({Test-Path -LiteralPath $_ -Type Leaf})]$SourceFilePath, + [Parameter(Mandatory=$true, + ValueFromPipeline=$true, + HelpMessage="Destination file path.")] + [string][ValidateScript({Test-Path -LiteralPath $_ -IsValid})]$DestinationFilePath, + [Parameter(Mandatory=$false, + ValueFromPipeline=$false, + HelpMessage="Buffer size in bytes.")] + [int32]$BufferSize=512*2*2*2, # 4096: the default windows cluster size. + [Parameter(Mandatory=$false, + ValueFromPipeline=$false, + HelpMessage="Amount of tries.")] + [int16]$MaxRetries=0, + [Parameter(Mandatory=$false, + ValueFromPipeline=$false, + HelpMessage="Overwrite destination file?")] + [switch]$Overwrite=$false, + [Parameter(Mandatory=$false, + ValueFromPipeline=$true, + HelpMessage="Specify position from which to read block.")] + [int64]$Position=0, # must be 0, current limitation + [Parameter(Mandatory=$false, + ValueFromPipeline=$true, + HelpMessage="Specify end position for reading.")] + [int64]$PositionEnd=-1, # must be -1, current limitation + [Parameter(Mandatory=$false, + ValueFromPipeline=$false, + HelpMessage="Ignore the existing badblocks.xml file?")] + [switch]$IgnoreBadBlocksFile=$false, # not implemented + [Parameter(Mandatory=$false, + ValueFromPipeline=$false, + HelpMessage="Will the source file be deleted in case no bad blocks are encountered?")] + [switch]$DeleteSourceOnSuccess=$false, + [Parameter(Mandatory=$false, + ValueFromPipeline=$false, + HelpMessage="Failback granular buffer size. Set BufferSize to a large value for speed, but revert to using a BufferGranularSize buffer when there is a read error.")] + [int32]$BufferGranularSize=-1, # If > 0, use a larger buffer for speed, and only revert to granular size on an error block. Should be and exact divisor of buffer (BufferSize should be a multiple of BufferGranularSize) + [Parameter(Mandatory=$false, + ValueFromPipeline=$true, + HelpMessage="Write-Progress Bar Parent Id.")] + [int32]$ProgressParentId=-1 +) + +Set-StrictMode -Version 2; + +# Simple assert function from http://poshcode.org/1942 +function Assert { +# Example +# set-content C:\test2\Documents\test2 "hi" +# C:\PS>assert { get-item C:\test2\Documents\test2 } "File wasn't created by Set-Content!" +# +[CmdletBinding()] +param( + [Parameter(Position=0,ParameterSetName="Script",Mandatory=$true)] + [ScriptBlock]$condition +, + [Parameter(Position=0,ParameterSetName="Bool",Mandatory=$true)] + [bool]$success +, + [Parameter(Position=1,Mandatory=$true)] + [string]$message +) + + $message = "ASSERT FAILED: $message" + + if($PSCmdlet.ParameterSetName -eq "Script") { + try { + $ErrorActionPreference = "STOP" + $success = &$condition + } catch { + $success = $false + $message = "$message`nEXCEPTION THROWN: $($_.Exception.GetType().FullName)" + } + } + if(!$success) { + throw $message + } +} + +# Forces read on Stream and returns total number of bytes read into buffer. +function Force-Read() { +param( + [Parameter(Mandatory=$true)] + [System.IO.FileStream]$Stream, + [Parameter(Mandatory=$true)] + [int64]$Position, + [Parameter(Mandatory=$true)] + [ref]$Buffer, + [Parameter(Mandatory=$true)] + [ref]$Successful, + [Parameter(Mandatory=$false)] + [int16]$MaxRetries=0 +) + + $Stream.Position = $Position; + $FailCounter = 0; + $Successful.Value = $false; + + while (-not $Successful.Value) { + + try { + + $ReadLength = $Stream.Read($Buffer.Value, 0, $Buffer.Value.Length); + # If the read operation is successful, the current position of the stream is advanced by the number of bytes read. If an exception occurs, the current position of the stream is unchanged. (http://msdn.microsoft.com/en-us/library/system.io.filestream.read.aspx) + + } catch [System.IO.IOException] { + + $ShouldHaveReadSize = [math]::Min([int64] $Buffer.Value.Length, ($Stream.Length - $Stream.Position)); + + if (++$FailCounter -le $MaxRetries) { # Retry to read block + + Write-Host $FailCounter"th retry to read "$ShouldHaveReadSize" bytes starting at "$($Stream.Position)" bytes." -ForegroundColor "DarkYellow"; + Write-Debug "Debugging read retry..."; + + continue; + + } else { # Failed read of block. + + Write-Host "Can not read"$ShouldHaveReadSize" bytes starting at "$($Stream.Position)" bytes: "$($_.Exception.message) -ForegroundColor "DarkRed"; + Write-Debug "Debugging read failure..."; + + # Should be here ONLY on UNsuccessful read! + # $Successful is $false by default; + $Buffer.Value = New-Object System.Byte[] ($Buffer.Value.Length); + return $ShouldHaveReadSize; + + } + + } catch { + + Write-Warning "Unhandled error at $($Stream.position) bit: $($_.Exception.message)"; + Write-Debug "Unhandled error. You should debug."; + + throw $_; + + } + + if ($FailCounter -gt 0) { # There were prior read failures + Write-Host "Successfully read"$ReadLength" bytes starting at "$($SourceStream.Position - $ReadLength)" bytes." -ForegroundColor "DarkGreen"; + } + + # Should be here ONLY on successful read! + $Successful.Value = $true; + # Buffer is allready set during successful read. + return $ReadLength; + + } + + throw "Should not be here..."; +} + +# Returns a custom object for storing bad block data. +function New-Block() { + param ([int64] $OffSet, [int32] $Size) + + $block = new-object PSObject + + Add-Member -InputObject $block -MemberType NoteProperty -Name "OffSet" -Value $OffSet; + Add-Member -InputObject $block -MemberType NoteProperty -Name "Size" -Value $Size; + + return $block; +} + +function Force-Copy-ProgressReport (){ +param ( + [Parameter(Mandatory=$true)] + [int64]$Position, + [Parameter(Mandatory=$true)] + [int64]$PositionEnd, + [Parameter(Mandatory=$true)] + [string] $LatestThroughput, + [Parameter(Mandatory=$true)] + [string] $DetailedStatus +) + + # Report total percent done + [float] $CurrProgress = $Position/$PositionEnd * 100; + [string] $fName = (Split-Path $SourceFilePath -Leaf) + [string] $fPath = (Split-Path $SourceFilePath -Parent) + Write-Progress -Activity "Force-Copy" -Status "Copying $fName ($LatestThroughput MB/s) from $fPath" -percentComplete ($CurrProgress) -CurrentOperation $DetailedStatus -ParentId $ProgressParentId; + + # Report block being read (only every so often, to avoid flicker and wasted processing) + # Write-Progress -Id 1 -Activity "Force-Copy" -Status $DetailedStatus -percentComplete (-1); +} + +# Snity checks +if ((Test-Path -LiteralPath $DestinationFilePath) -and -not $Overwrite) { + Write-Host "Destination file $DestinationFilePath allready exists and -Overwrite not specified. Exiting." -ForegroundColor "Red"; + exit 2; +} +Assert {$Position -eq 0 -and $PositionEnd -eq -1} "Current limitation: Position and PositionEnd should be 0 and -1 respectively."; + +if ($BufferGranularSize -gt 0) { + Assert {(($BufferSize % $BufferGranularSize) -eq 0) -and ($BufferSize -gt $BufferGranularSize)} "BufferSize must be larger and divisible by BufferGranularSize."; +} + +# Setting global variables +$DestinationFileBadBlocksPath = $DestinationFilePath + '.badblocks.xml'; +$DestinationFileBadBlocks = @(); + +# Fetching SOURCE file +$SourceFile = Get-Item -LiteralPath $SourceFilePath; +Assert {$Position -lt $SourceFile.length} "Specified position out of source file bounds."; + +# Fetching DESTINATION file. +if (-not (Test-Path -LiteralPath ($DestinationParentFilePath = Split-Path -Path $DestinationFilePath -Parent) -PathType Container)) { # Make destination parent folder in case it doesn't exist. + New-Item -ItemType Directory -Path $DestinationParentFilePath | Out-Null; +} +$DestinationFile = New-Object System.IO.FileInfo ($DestinationFilePath); # Does not (!) physicaly make a file. +$NewDestinationFile = -not $DestinationFile.Exists; + +# Special handling for DESTINATION file in case OVERWRITE is used! Only bad block are read from source! +if ($Overwrite -and (Test-Path -LiteralPath $DestinationFilePath)) { + + # Make sure the Source and Destination files have the same length prior to overwrite! + Assert {$SourceFile.Length -eq $DestinationFile.Length} "Source and destination file have not the same size!" + + # Search for badblocks.xml - if it doesn't exist then the file is probably OK, so don't do anything! + if (-not (Test-Path -LiteralPath $DestinationFileBadBlocksPath)) { + + Write-Host "Destination file $DestinationFilePath has no bad blocks. It is unwise to continue... Exiting." -ForegroundColor "Red"; + exit 3; + + } else { # There is a $DestinationFileBadBlocksPath + + $DestinationFileBadBlocks = Import-Clixml $DestinationFileBadBlocksPath; + Write-Host "Badblocks.xml successfully imported. Destination file has $(($DestinationFileBadBlocks | Measure-Object -Sum -Property Size).Sum) bad bytes." -ForegroundColor "Yellow"; + + # Make sure destination file has bad blocks. + if ($DestinationFileBadBlocksPath.Length -eq 0) { + Write-Host "Destination file $DestinationFilePath has no bad blocks according to badblocks.xml. Should not overwrite... Exiting." -ForegroundColor "Red"; + exit 3; + } + + # When using $BufferGranularSize (or other gradual retry logic), it could be writting different size blocks to badblocks file. What would be the implications if it did? + Assert {($DestinationFileBadBlocks | Measure-Object -Average -Property Size).Average -eq $BufferSize } "Block sizes do not match between source and destination file. Can not continue." # This is currently an implementation shortcomming. + + } +} + +# Making buffer +$Buffer = New-Object -TypeName System.Byte[] -ArgumentList $BufferSize; + +# Making container for storing missread offsets. +$UnreadableBlocks = @(); + +# Making filestreams +$SourceStream = $SourceFile.OpenRead(); +$DestinationStream = $DestinationFile.OpenWrite(); +if (-not $?) {exit 4;} + +# Measure time between progress reports to avoid wasting resources (and adding wait times for the UI to redraw) +[TimeSpan] $ReportEvery = New-TimeSpan -Seconds 10; # Wait 10 seconds before first report, then every 3 +[TimeSpan] $ReportWaitAfterward = New-TimeSpan -Seconds 3; # Update every 3 seconds after first report +[TimeSpan] $ThroughputRefreshEvery = $ReportEvery - (New-TimeSpan -Seconds 2); # Wait 8+ seconds to recalculate throuput +[Diagnostics.Stopwatch] $sw = [Diagnostics.Stopwatch]::StartNew(); +[TimeSpan] $LatestReportedAt = $sw.Elapsed; +[TimeSpan] $LatestThroughputReportedAt = $LatestReportedAt; +[int64] $InitialPosition = $Position # Remember initial $Position value (before it is changed during iterations) for final throughput calc +[int64] $ThroughputLastPosition = $Position; # Initial position to calculate throughput +[float] $ThroughputLast = 0; # MB/s throughput as of last refresh +[int64] $GranularOverallBadSizeTotal = 0; + +# Measure time between progress reports to avoid wasting resources (and adding wait times for the UI to redraw) +[TimeSpan] $ReportEvery = New-TimeSpan -Seconds 10; # Wait 10 seconds before first report, then every 3 +[TimeSpan] $ReportWaitAfterward = New-TimeSpan -Seconds 3; # Update every 3 seconds after first report +[TimeSpan] $ThroughputRefreshEvery = $ReportEvery - (New-TimeSpan -Seconds 2); # Wait 8+ seconds to recalculate throuput +[Diagnostics.Stopwatch] $sw = [Diagnostics.Stopwatch]::StartNew(); +[TimeSpan] $LatestReportedAt = $sw.Elapsed; +[TimeSpan] $LatestThroughputReportedAt = $LatestReportedAt; +[int64] $InitialPosition = $Position # Remember initial $Position value (before it is changed during iterations) for final throughput calc +[int64] $ThroughputLastPosition = $Position; # Initial position to calculate throughput +[float] $ThroughputLast = 0; # MB/s throughput as of last refresh +[int64] $GranularOverallBadSizeTotal = 0; + +if ($PositionEnd -le -1) {$PositionEnd = $SourceStream.Length} + +# Copying starts here +Write-Host "Starting copying of $SourceFilePath..." -ForegroundColor "Green"; + +[bool] $ReadSuccessful = $false; + +while ($Position -lt $PositionEnd) { + + # Report progress so far + # Only report every so often, to avoid flicker and wasted processing/wait times + if( ($LatestReportedAt + $ReportEvery) -le $sw.Elapsed) { + + # Update throughput calculation + if( ($LatestThroughputReportedAt + $ThroughputRefreshEvery) -le $sw.Elapsed) { + $ThroughputLast = [math]::Round(($Position - $ThroughputLastPosition) / 1024 / 1024 / ($sw.Elapsed - $LatestThroughputReportedAt).TotalSeconds, 2); + $LatestThroughputReportedAt = $sw.Elapsed; + $ThroughputLastPosition = $Position; + } + + # Update progress bar(s) + Force-Copy-ProgressReport -Position $Position -PositionEnd $PositionEnd -LatestThroughput $ThroughputLast ` + -DetailedStatus "Reading block ($BufferSize bytes) at position $Position" + + # Update interval variables + $LatestReportedAt = $sw.Elapsed; + $ReportEvery = $ReportWaitAfterward; # Switch to 3 seconds after the initial wait + } + + if ($NewDestinationFile -or + ($PositionMarkedAsBad = $DestinationFileBadBlocks | % {if (($_.Offset -le $Position) -and ($Position -lt ($_.Offset + $_.Size))) {$true;}})) { + + if (($Position -eq 0) -or -not $LastReadFromSource) {Write-Host "Started reading from source file at offset $Position." -ForegroundColor "DarkRed";} + $LastReadFromSource = $true; + + [bool] $GranularLogicUsed = $false; + + # Force read a block from source + if (($BufferGranularSize -gt 0) -and ($MaxRetries -gt 0) ) { + # Try once w/o retries + $ReadLength = Force-Read -Stream $SourceStream -Position $Position -Buffer ([ref] $Buffer) -Successful ([ref] $ReadSuccessful) -MaxRetries 0; + + # If failed, then go again retrying with smaller buffer + if (-not $ReadSuccessful) { + # Granular logic could probably use more testing (extreme cases, like error in last block of file). + # Maybe try and use Holodeck (now open source), see http://stackoverflow.com/questions/4430591/simulating-file-errors-e-g-error-access-denied-on-windows + + # Flag we are switched to smaller buffer (so it doesn't write to output in outer if) + $GranularLogicUsed = $true; + + # Better way to log it, actually granular? Or just ignore the outer buffer size for badblocks purposes (it's unlikely that people will be mixing versions of the script with prior badblock with different sizes) + # $UnreadableBlocks += New-Block -OffSet $Position -Size $ReadLength; + + Write-Host "Switching to granular logic at $Position." -ForegroundColor "DarkGreen"; + + # Allocate granular buffer + $GranularBuffer = New-Object -TypeName System.Byte[] -ArgumentList $BufferGranularSize; + + # Could probably try and refactor with outer loop (and/or refactor conditional), but it could be error prone. For now better duplicate some of the outer loop logic with local variables + # Could also try and do it inside Force-Read (and might be more elegant), but that might have other issues + # Maybe better yet, could refactor into a recursive version, so it would gradually lower the granular buffer size, so it doesn't loose all the speed when it hits an error + [int64] $GranularPosition = $Position; + [int64] $GranularLastPosition = [math]::Min([int64] $Position + $BufferSize, $PositionEnd); + [int64] $GranularReadLength = -1; + [int64] $GranularReadLengthTotal = 0; + [bool] $GranularReadSuccessful = $false; + + while ($GranularPosition -lt $GranularLastPosition) { + # Update progress report + if( ($LatestReportedAt + $ReportEvery) -le $sw.Elapsed) { + if( ($LatestThroughputReportedAt + $ThroughputRefreshEvery) -le $sw.Elapsed) { + $ThroughputLast = [math]::Round(($GranularPosition - $ThroughputLastPosition) / 1024 / 1024 / ($sw.Elapsed - $LatestThroughputReportedAt).TotalSeconds, 2); + $LatestThroughputReportedAt = $sw.Elapsed; + $ThroughputLastPosition = $GranularPosition; + } + + Force-Copy-ProgressReport -Position $GranularPosition -PositionEnd $PositionEnd -LatestThroughput $ThroughputLast ` + -DetailedStatus "Granular reading $BufferGranularSize bytes block at position $GranularPosition" + + $LatestReportedAt = $sw.Elapsed; + $ReportEvery = $ReportWaitAfterward; + } + + $GranularReadLength = Force-Read -Stream $SourceStream -Position $GranularPosition -Buffer ([ref] $GranularBuffer) -Successful ([ref] $GranularReadSuccessful) -MaxRetries ($MaxRetries); + + if (-not $GranularReadSuccessful) { + $GranularOverallBadSizeTotal += $GranularReadLength; + } + + # Here we could log a more granular version of badblocks + $UnreadableBlocks += New-Block -OffSet $GranularPosition -Size $GranularReadLength; + + # Write to destination file. + $DestinationStream.Position = $GranularPosition; + $DestinationStream.Write($GranularBuffer, 0, $GranularReadLength); + + $GranularPosition += $GranularReadLength; + $GranularReadLengthTotal += $GranularReadLength; + } + + $ReadLength = $GranularReadLengthTotal; + + # Does it need an escape clause like $LastReadFromSource (see below) + } + + } else { + + # Original logic w/o granular buffer + $ReadLength = Force-Read -Stream $SourceStream -Position $Position -Buffer ([ref] $Buffer) -Successful ([ref] $ReadSuccessful) -MaxRetries $MaxRetries; + + } + + if (-not $GranularLogicUsed) { + if (-not $ReadSuccessful) { + $UnreadableBlocks += New-Block -OffSet $Position -Size $ReadLength; + } + + # Write to destination file. + $DestinationStream.Position = $Position; + $DestinationStream.Write($Buffer, 0, $ReadLength); + } + + + } else { + + if ($Position -eq 0 -or $LastReadFromSource) {Write-Host "Skipping from offset $Position." -ForegroundColor "DarkGreen";} + $LastReadFromSource = $false; + + # Skipping block. + $ReadLength = $BufferSize; + + } + + $Position += $ReadLength; # adjust position + +} + +$SourceStream.Dispose(); +$DestinationStream.Dispose(); + +$sw.Stop(); + +if ($UnreadableBlocks) { + + # Write summaryamount of bad blocks. + if ($BufferGranularSize -gt 0) { + Write-Host "Up to $GranularOverallBadSizeTotal bytes are bad." -ForegroundColor "Magenta"; + } else { + Write-Host "$(($UnreadableBlocks | Measure-Object -Sum -Property Size).Sum) bytes are bad." -ForegroundColor "Magenta"; + } + + # Export badblocks.xml file. + Export-Clixml -LiteralPath ($DestinationFileBadBlocksPath) -InputObject $UnreadableBlocks; + +} elseif (Test-Path -LiteralPath $DestinationFileBadBlocksPath) { # No unreadable blocks and badblocks.xml exists. + + Remove-Item -LiteralPath $DestinationFileBadBlocksPath; +} + +# Set creation and modification times +$DestinationFile.CreationTimeUtc = $SourceFile.CreationTimeUtc; +$DestinationFile.LastWriteTimeUtc = $SourceFile.LastWriteTimeUtc; +$DestinationFile.IsReadOnly = $SourceFile.IsReadOnly; + +[string] $FinalTimeStr = $sw.Elapsed.ToString(); +[float] $ThroughputMBperS = [math]::Round( ($PositionEnd - $InitialPosition) / 1024 / 1024 / $sw.Elapsed.TotalSeconds, 2); +Write-Host "Copied $PositionEnd bytes in $FinalTimeStr ($ThroughputMBperS MB/s)" -ForegroundColor "Green"; +Write-Host "Finished copying $SourceFilePath!`n" -ForegroundColor "Green"; + +# Return specific code. +if ($UnreadableBlocks) { + exit 1; +} else { + exit 0; +} +``` + +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/copy-photos-sorted.md b/docs/copy-photos-sorted.md index 2f43b1d5..3daba2fe 100644 --- a/docs/copy-photos-sorted.md +++ b/docs/copy-photos-sorted.md @@ -153,4 +153,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/copy-videos-sorted.md b/docs/copy-videos-sorted.md index 245d8328..f5ac901a 100644 --- a/docs/copy-videos-sorted.md +++ b/docs/copy-videos-sorted.md @@ -136,4 +136,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/count-characters.md b/docs/count-characters.md index d41bdb08..dbfd07d3 100644 --- a/docs/count-characters.md +++ b/docs/count-characters.md @@ -72,4 +72,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/count-lines.md b/docs/count-lines.md index d08d5d58..1953804c 100644 --- a/docs/count-lines.md +++ b/docs/count-lines.md @@ -84,4 +84,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/decrypt-file.md b/docs/decrypt-file.md index b3138f00..e4bc2da1 100644 --- a/docs/decrypt-file.md +++ b/docs/decrypt-file.md @@ -199,4 +199,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/disable-ipv6.md b/docs/disable-ipv6.md index ad2eda10..3324b980 100644 --- a/docs/disable-ipv6.md +++ b/docs/disable-ipv6.md @@ -56,4 +56,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/disconnect-vpn.md b/docs/disconnect-vpn.md index d4959df0..df73f91d 100644 --- a/docs/disconnect-vpn.md +++ b/docs/disconnect-vpn.md @@ -63,4 +63,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:21)* diff --git a/docs/download-dir.md b/docs/download-dir.md index 3712029a..371c312a 100644 --- a/docs/download-dir.md +++ b/docs/download-dir.md @@ -78,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/download-file.md b/docs/download-file.md index 642e39d5..35cd870f 100644 --- a/docs/download-file.md +++ b/docs/download-file.md @@ -78,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/edit.md b/docs/edit.md index b0872ac2..6371005c 100644 --- a/docs/edit.md +++ b/docs/edit.md @@ -81,6 +81,7 @@ TryEditor "hx" $path TryEditor "emacs" $path TryEditor "Code" $path TryEditor "notepad.exe" $path +TryEditor "edit.exe" $path TryEditor "wordpad.exe" $path Write-Host "" @@ -88,4 +89,4 @@ Write-Host "" exit 1 ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/enable-crash-dumps.md b/docs/enable-crash-dumps.md index 230a06d1..30c94cf2 100644 --- a/docs/enable-crash-dumps.md +++ b/docs/enable-crash-dumps.md @@ -83,6 +83,19 @@ Script Content # # ################################################################## +# Check if running with administrator privileges +if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { + Write-Host "ERROR: This script requires administrator privileges to modify registry keys." -ForegroundColor Red + Write-Host "Please run this script as an administrator:" -ForegroundColor Yellow + Write-Host "1. Right-click on PowerShell" -ForegroundColor Yellow + Write-Host "2. Select 'Run as administrator'" -ForegroundColor Yellow + Write-Host "3. Re-run this script" -ForegroundColor Yellow + Write-Host "" + Write-Host "Press any key to exit..." + $null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") + exit 1 +} + #Setting Values: $MDN = '0' $MDWDS = '1' @@ -134,7 +147,7 @@ Clear-Host Write-Host "Setting up your machine to receive Usermode Dumps via WER." Start-Sleep -seconds 3 - +New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Name "DumpFolder" -Value "%LOCALAPPDATA%\CrashDumps" -PropertyType ExpandString -Force New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Name "DumpCount" -Value "10" -PropertyType DWORD -Force @@ -148,7 +161,7 @@ $NCD = Read-Host "Enter a number option" If ($NCD -eq '3') { - + New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Name "DumpType" -Value "0" -PropertyType DWORD -Force Do { @@ -272,6 +285,7 @@ If ($NCD -eq '3') $SumArray = Invoke-Expression $sum $FinalSum = $0x + $SumArray + New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Name "CustomDumpFlags" -Value "$FinalSum" -PropertyType DWORD -Force write-host " " @@ -296,6 +310,7 @@ ElseIf ($NCD -eq '0') } ElseIf ($NCD -eq '1') { + New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Name "DumpType" -Value "2" -PropertyType DWORD -Force write-host "The computer has been set up to create a Full Sized Dump and will be located in %LOCALAPPDATA%\CrashDumps." write-host "The computer must also restart for settings to take effect. Would you like to now? (Y/n)" @@ -310,6 +325,7 @@ ElseIf ($NCD -eq '1') } ElseIf ($NCD -eq '2') { + New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Name "DumpType" -Value "1" -PropertyType DWORD -Force write-host "The computer has been set up to create a Mini Dump and will be located in %LOCALAPPDATA%\CrashDumps." write-host "The computer must also restart for settings to take effect. Would you like to now? (Y/n)" @@ -330,4 +346,4 @@ Else exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/enable-god-mode.md b/docs/enable-god-mode.md index 1e3f41e8..69a79a82 100644 --- a/docs/enable-god-mode.md +++ b/docs/enable-god-mode.md @@ -61,4 +61,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/enable-ipv6.md b/docs/enable-ipv6.md index e064f62c..2d4f959c 100644 --- a/docs/enable-ipv6.md +++ b/docs/enable-ipv6.md @@ -56,4 +56,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/encrypt-file.md b/docs/encrypt-file.md index e9df9903..79139265 100644 --- a/docs/encrypt-file.md +++ b/docs/encrypt-file.md @@ -184,4 +184,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/enter-chat.md b/docs/enter-chat.md index 11e1f3e9..6857a592 100644 --- a/docs/enter-chat.md +++ b/docs/enter-chat.md @@ -125,4 +125,4 @@ function Get-ChatChannel } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/enter-host.md b/docs/enter-host.md index 2745c9df..a1899542 100644 --- a/docs/enter-host.md +++ b/docs/enter-host.md @@ -27,8 +27,8 @@ Example ------- ```powershell PS> ./enter-host.ps1 tux -βœ… tux is online (3ms latency to 192.168.1.179) -⏳ Connecting as user 'markus' using OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2 +βœ… 'tux' is online with 3ms ping to it's IP 192.168.1.179 +⏳ Connecting as user 'markus' with OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2 markus@tux's password: ... @@ -54,8 +54,8 @@ Script Content Specifies the remote hostname or IP address .EXAMPLE PS> ./enter-host.ps1 tux - βœ… tux is online (3ms latency to 192.168.1.179) - ⏳ Connecting as user 'markus' using OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2 + βœ… 'tux' is online with 3ms ping to it's IP 192.168.1.179 + ⏳ Connecting as user 'markus' with OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2 markus@tux's password: ... .LINK @@ -83,7 +83,7 @@ try { & "$PSScriptRoot/wake-up-host.ps1" } - Write-Host "⏳ Connecting as user '$remoteUser' using " -noNewline + Write-Host "⏳ Connecting as user '$remoteUser' with " -noNewline & ssh -V if ($lastExitCode -ne 0) { throw "'ssh -V' failed with exit code $lastExitCode" } @@ -95,4 +95,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/export-to-manuals.md b/docs/export-to-manuals.md index 7698922d..4235d89b 100644 --- a/docs/export-to-manuals.md +++ b/docs/export-to-manuals.md @@ -92,4 +92,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/fetch-repo.md b/docs/fetch-repo.md index 0fd0cb2d..145fc6a8 100644 --- a/docs/fetch-repo.md +++ b/docs/fetch-repo.md @@ -85,9 +85,9 @@ try { "βœ… Updates fetched into πŸ“‚$repoDirName repo in $($elapsed)s." exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/fetch-repos.md b/docs/fetch-repos.md index 36741e33..4c165162 100644 --- a/docs/fetch-repos.md +++ b/docs/fetch-repos.md @@ -99,4 +99,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/firefox-installer.md b/docs/firefox-installer.md index 68881930..32afadf0 100644 --- a/docs/firefox-installer.md +++ b/docs/firefox-installer.md @@ -64,4 +64,4 @@ try { ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/get-md5.md b/docs/get-md5.md index 6c7a8d4f..6163e3e4 100644 --- a/docs/get-md5.md +++ b/docs/get-md5.md @@ -76,4 +76,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/get-sha1.md b/docs/get-sha1.md index a7a255e5..29bd8ca8 100644 --- a/docs/get-sha1.md +++ b/docs/get-sha1.md @@ -76,4 +76,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/get-sha256.md b/docs/get-sha256.md index a864e03a..3660e5d4 100644 --- a/docs/get-sha256.md +++ b/docs/get-sha256.md @@ -74,4 +74,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/get-sha512.md b/docs/get-sha512.md index ecc3dc92..280df5f2 100644 --- a/docs/get-sha512.md +++ b/docs/get-sha512.md @@ -74,4 +74,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/hello-world.md b/docs/hello-world.md index b11953ce..57b4512d 100644 --- a/docs/hello-world.md +++ b/docs/hello-world.md @@ -50,4 +50,4 @@ Write-Output "Hello World" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/hibernate.md b/docs/hibernate.md index dcac94d7..985f9f26 100644 --- a/docs/hibernate.md +++ b/docs/hibernate.md @@ -59,4 +59,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/import-vm.md b/docs/import-vm.md index 78c02449..1ea7fa3d 100644 --- a/docs/import-vm.md +++ b/docs/import-vm.md @@ -23,4 +23,4 @@ Start-VM $VMName exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/inspect-exe.md b/docs/inspect-exe.md index 673b4531..901dbcba 100644 --- a/docs/inspect-exe.md +++ b/docs/inspect-exe.md @@ -69,4 +69,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-audacity.md b/docs/install-audacity.md index f93aa763..617fce92 100644 --- a/docs/install-audacity.md +++ b/docs/install-audacity.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "Installing Audacity, please wait..." @@ -58,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-basic-apps.md b/docs/install-basic-apps.md index 6115c4ec..789b3365 100644 --- a/docs/install-basic-apps.md +++ b/docs/install-basic-apps.md @@ -18,10 +18,11 @@ Example ------- ```powershell PS> ./install-basic-apps.ps1 -⏳ (1) Loading data/basic-apps.csv... 37 apps listed -⏳ (2) Applications to install/upgrade: 7-Zip Β· Aquile Reader ... +⏳ (1) Loading basic-apps.csv from data/ folder... +⏳ (2) Will install/upgrade 39 basic apps: 7-Zip, Aquile Reader ... +NOTE: Installation starts in 15 seconds or press to abort... ... -βœ… Installed 37 basic apps (0 skipped) in 387 sec. +βœ… 39 basic apps installed (0 skipped, took 387s) ``` @@ -44,31 +45,32 @@ Script Content NOTE: Apps from Microsoft Store are preferred (due to security and automatic updates). .EXAMPLE PS> ./install-basic-apps.ps1 - ⏳ (1) Loading data/basic-apps.csv... 37 apps listed - ⏳ (2) Applications to install/upgrade: 7-Zip Β· Aquile Reader ... + ⏳ (1) Loading basic-apps.csv from data/ folder... + ⏳ (2) Will install/upgrade 39 basic apps: 7-Zip, Aquile Reader ... + NOTE: Installation starts in 15 seconds or press to abort... ... - βœ… Installed 37 basic apps (0 skipped) in 387 sec. + βœ… 39 basic apps installed (0 skipped, took 387s) .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $stopWatch = [system.diagnostics.stopwatch]::startNew() - Write-Host "⏳ (1) Loading data/basic-apps.csv... " -noNewline + Write-Host "⏳ (1) Loading basic-apps.csv from data/ folder..." $table = Import-CSV "$PSScriptRoot/../data/basic-apps.csv" $numEntries = $table.count - "$numEntries apps listed" - Write-Host "⏳ (2) Applications to install/upgrade: " -noNewline + Write-Host "⏳ (2) Will install/upgrade $numEntries basic apps: " -noNewline foreach($row in $table) { [string]$appName = $row.APPLICATION - Write-Host "$appName Β· " -noNewline + Write-Host "$appName, " -noNewline } "" - "" - "The installation will start in 15 seconds or press to abort..." + "NOTE: Installation starts in 15 seconds or press to abort..." Start-Sleep -seconds 15 [int]$step = 3 @@ -79,18 +81,18 @@ try { [string]$appID = $row.APPID Write-Host " " Write-Host "⏳ ($step/$($numEntries + 2)) Installing $category '$appName'..." - & winget install --id $appID --accept-package-agreements --accept-source-agreements + & winget install --id $appID --silent --accept-package-agreements --accept-source-agreements if ($lastExitCode -ne 0) { $numSkipped++ } $step++ } [int]$numInstalled = ($numEntries - $numSkipped) [int]$elapsed = $stopWatch.Elapsed.TotalSeconds - "βœ… Installed $numInstalled basic apps ($numSkipped skipped) in $elapsed sec." + "βœ… $numInstalled basic apps installed ($numSkipped skipped, took $($elapsed)s)" exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-basic-snaps.md b/docs/install-basic-snaps.md index 1f97ff84..d74823bf 100644 --- a/docs/install-basic-snaps.md +++ b/docs/install-basic-snaps.md @@ -46,6 +46,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $StopWatch = [system.diagnostics.stopwatch]::startNew() if (!$IsLinux) { throw "Only Linux currently support snaps" } @@ -76,9 +78,9 @@ try { "βœ… Installed 20 snap apps in $($elapsed)s." exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-calibre-server.md b/docs/install-calibre-server.md index 2e5dbda5..91ee7c1e 100644 --- a/docs/install-calibre-server.md +++ b/docs/install-calibre-server.md @@ -96,7 +96,7 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -#Requires -RunAsAdministrator +#requires -version 5.1 -RunAsAdministrator param([int]$port = 8099, [string]$mediaFolder = "/opt/Calibre Library", [string]$userDB = "/opt/CalibreUsers.sqlite", [string]$logfile = "/opt/CalibreServer.log") @@ -128,9 +128,9 @@ try { " (URL=http://$(hostname):$port media=$mediaFolder userDB=$userDB log=$logfile)." exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-chocolatey.md b/docs/install-chocolatey.md index 576a3040..eac021a8 100644 --- a/docs/install-chocolatey.md +++ b/docs/install-chocolatey.md @@ -44,7 +44,7 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -#Requires -RunAsAdministrator +#requires -version 5.1 -RunAsAdministrator try { [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 @@ -56,4 +56,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-chrome.md b/docs/install-chrome.md index f4f16baf..16180e17 100644 --- a/docs/install-chrome.md +++ b/docs/install-chrome.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "Installing Google Chrome, please wait..." @@ -58,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-crystal-disk-info.md b/docs/install-crystal-disk-info.md index 0ce7a5ae..76fec55a 100644 --- a/docs/install-crystal-disk-info.md +++ b/docs/install-crystal-disk-info.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "⏳ Installing CrystalDiskInfo from Microsoft Store, please wait..." $stopWatch = [system.diagnostics.stopwatch]::startNew() @@ -60,4 +62,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-crystal-disk-mark.md b/docs/install-crystal-disk-mark.md index a874a7cc..5f761c18 100644 --- a/docs/install-crystal-disk-mark.md +++ b/docs/install-crystal-disk-mark.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "Installing CrystalDiskMark, please wait..." @@ -58,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-discord.md b/docs/install-discord.md index 3cc5bb61..ebc9122a 100644 --- a/docs/install-discord.md +++ b/docs/install-discord.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "Installing Discord, please wait..." @@ -58,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-edge.md b/docs/install-edge.md index f8d39cf2..c58eb0ae 100644 --- a/docs/install-edge.md +++ b/docs/install-edge.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "Installing Microsoft Edge, please wait..." @@ -58,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-edit.md b/docs/install-edit.md new file mode 100644 index 00000000..bccb0972 --- /dev/null +++ b/docs/install-edit.md @@ -0,0 +1,74 @@ +The *install-edit.ps1* Script +=========================== + +This PowerShell script installs Microsoft Edit. + +Parameters +---------- +```powershell +/Repos/PowerShell/scripts/install-edit.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Example +------- +```powershell +PS> ./install-edit.ps1 +⏳ Installing Microsoft Edit from Microsoft Store... +βœ… Microsoft Edit installed successfully (took 25s). + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Installs Edit +.DESCRIPTION + This PowerShell script installs Microsoft Edit. +.EXAMPLE + PS> ./install-edit.ps1 + ⏳ Installing Microsoft Edit from Microsoft Store... + βœ… Microsoft Edit installed successfully (took 25s). +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +#requires -version 5.1 + +try { + $stopWatch = [system.diagnostics.stopwatch]::startNew() + + if ($IsLinux) { + "⏳ Installing Microsoft Edit from Snap Store..." + & sudo snap install msedit + if ($lastExitCode -ne 0) { throw "Can't install Microsoft Edit, is it already installed?" } + } else { + "⏳ Installing Microsoft Edit from Microsoft Store..." + & winget install --id Microsoft.Edit --accept-package-agreements --accept-source-agreements + if ($lastExitCode -ne 0) { throw "Can't install Microsoft Edit, is it already installed?" } + } + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "βœ… Microsoft Edit installed successfully (took $($elapsed)s)." + exit 0 # success +} catch { + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." + exit 1 +} +``` + +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-evcc.md b/docs/install-evcc.md index 6d923248..559fa734 100644 --- a/docs/install-evcc.md +++ b/docs/install-evcc.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $stopWatch = [system.diagnostics.stopwatch]::startNew() @@ -72,9 +74,9 @@ try { "βœ… evcc installed successfully in $($elapsed)s." exit 0 # success } catch { - "Sorry: $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-firefox.md b/docs/install-firefox.md index 83f5e245..21278c51 100644 --- a/docs/install-firefox.md +++ b/docs/install-firefox.md @@ -1,7 +1,7 @@ The *install-firefox.ps1* Script =========================== -This PowerShell script installs Mozilla Firefox from the Microsoft Store. +This PowerShell script installs the Mozilla Firefox browser from Microsoft Store. Parameters ---------- @@ -17,6 +17,8 @@ Example ------- ```powershell PS> ./install-firefox.ps1 +⏳ Installing Mozilla Firefox from Microsoft Store... + βœ… Mozilla Firefox installed successfully in 25s. ``` @@ -35,27 +37,33 @@ Script Content .SYNOPSIS Installs Mozilla Firefox .DESCRIPTION - This PowerShell script installs Mozilla Firefox from the Microsoft Store. + This PowerShell script installs the Mozilla Firefox browser from Microsoft Store. .EXAMPLE PS> ./install-firefox.ps1 + ⏳ Installing Mozilla Firefox from Microsoft Store... + βœ… Mozilla Firefox installed successfully in 25s. .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { - "Installing Mozilla Firefox, please wait..." + $stopWatch = [system.diagnostics.stopwatch]::startNew() + "⏳ Installing Mozilla Firefox from Microsoft Store..." - & winget install "Mozilla Firefox Browser" --source msstore --accept-package-agreements --accept-source-agreements - if ($lastExitCode -ne 0) { throw "'winget install' failed" } + & winget install --id 9NZVDKPMR9RD --source msstore --accept-package-agreements --accept-source-agreements + if ($lastExitCode -ne 0) { throw "Can't install Mozilla Firefox, is it already installed?" } - "Mozilla Firefox installed successfully." + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "βœ… Mozilla Firefox installed successfully in $($elapsed)s." exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ Error: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-fonts.md b/docs/install-fonts.md index d3c96677..cbcf7132 100644 --- a/docs/install-fonts.md +++ b/docs/install-fonts.md @@ -17,6 +17,8 @@ Parameters Script Content -------------- ```powershell +#requires -version 5.1 + param( [string]$sourceFolder = "" ) @@ -51,4 +53,4 @@ foreach ($font in $fontFiles) { Write-Output "Fonts have been installed successfully." ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-git-extensions.md b/docs/install-git-extensions.md index 967234a5..21e2fe78 100644 --- a/docs/install-git-extensions.md +++ b/docs/install-git-extensions.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "Installing Git Extensions, please wait..." @@ -58,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-git-for-windows.md b/docs/install-git-for-windows.md index 20def539..be109279 100644 --- a/docs/install-git-for-windows.md +++ b/docs/install-git-for-windows.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "Installing Git for Windows, please wait..." @@ -58,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-github-cli.md b/docs/install-github-cli.md index ff789336..3c098276 100644 --- a/docs/install-github-cli.md +++ b/docs/install-github-cli.md @@ -48,6 +48,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "⏳ Installing GitHub CLI..." $stopWatch = [system.diagnostics.stopwatch]::startNew() @@ -64,9 +66,9 @@ try { "βœ… GitHub CLI installed successfully in $($elapsed)s - to authenticate execute: 'gh auth login'" exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-gitlab.md b/docs/install-gitlab.md index 5b462416..35110974 100644 --- a/docs/install-gitlab.md +++ b/docs/install-gitlab.md @@ -17,6 +17,7 @@ Parameters Script Content -------------- ```powershell +#requires -version 5.1 "1. Install and configure the necessary dependencies" & sudo apt-get update @@ -31,4 +32,4 @@ Script Content ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-h2static.md b/docs/install-h2static.md index 1a34fc03..b52e36db 100644 --- a/docs/install-h2static.md +++ b/docs/install-h2static.md @@ -62,6 +62,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([int]$port = 8070, [string]$pathToMedia = "/media/") try { @@ -92,4 +94,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-irfanview.md b/docs/install-irfanview.md index 7ea4c760..21f5e749 100644 --- a/docs/install-irfanview.md +++ b/docs/install-irfanview.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "Installing IrfanView, please wait..." @@ -58,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-jenkins-agent.md b/docs/install-jenkins-agent.md index 0b4c3699..3a6571f9 100644 --- a/docs/install-jenkins-agent.md +++ b/docs/install-jenkins-agent.md @@ -71,6 +71,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$installDir = "/opt/jenkins-agent", [string]$jenkinsURL = "", [string]$secretKey = "") try { @@ -101,4 +103,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-knot-resolver.md b/docs/install-knot-resolver.md index ff8e3d17..42638117 100644 --- a/docs/install-knot-resolver.md +++ b/docs/install-knot-resolver.md @@ -44,7 +44,7 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -#Requires -RunAsAdministrator +#requires -version 5.1 -RunAsAdministrator try { $StopWatch = [system.diagnostics.stopwatch]::startNew() @@ -65,9 +65,9 @@ try { "βœ… installed Knot Resolver in $Elapsed sec" exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-microsoft-teams.md b/docs/install-microsoft-teams.md index 0fd90477..a1c896e2 100644 --- a/docs/install-microsoft-teams.md +++ b/docs/install-microsoft-teams.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "Installing Microsoft Teams, please wait..." @@ -58,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-mini-dlna.md b/docs/install-mini-dlna.md index 20574528..d1d6ed20 100644 --- a/docs/install-mini-dlna.md +++ b/docs/install-mini-dlna.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $stopWatch = [system.diagnostics.stopwatch]::startNew() @@ -63,4 +65,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-netflix.md b/docs/install-netflix.md index a575b336..dedc74e5 100644 --- a/docs/install-netflix.md +++ b/docs/install-netflix.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "Installing Netflix, please wait..." @@ -58,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-obs-studio.md b/docs/install-obs-studio.md index 8fa99f83..6ebe96bf 100644 --- a/docs/install-obs-studio.md +++ b/docs/install-obs-studio.md @@ -44,7 +44,7 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -#Requires -RunAsAdministrator +#requires -version 5.1 -RunAsAdministrator try { $StopWatch = [system.diagnostics.stopwatch]::startNew() @@ -64,4 +64,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-octoprint.md b/docs/install-octoprint.md index ff8ac210..644c768f 100644 --- a/docs/install-octoprint.md +++ b/docs/install-octoprint.md @@ -17,6 +17,7 @@ Parameters Script Content -------------- ```powershell +#requires -version 5.1 try { "⏳ Installing OctoPrint (snap 'octoprint-pfs', channel 'edge')..." @@ -32,4 +33,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-one-calendar.md b/docs/install-one-calendar.md index d2d8946b..ca880cf0 100644 --- a/docs/install-one-calendar.md +++ b/docs/install-one-calendar.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "Installing One Calendar, please wait..." @@ -58,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-opera-browser.md b/docs/install-opera-browser.md index 7c897f6b..e59535cf 100644 --- a/docs/install-opera-browser.md +++ b/docs/install-opera-browser.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "Installing Opera Browser, please wait..." @@ -58,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-opera-gx.md b/docs/install-opera-gx.md index 3a61e5a7..0915d17e 100644 --- a/docs/install-opera-gx.md +++ b/docs/install-opera-gx.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "Installing Opera GX, please wait..." @@ -58,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-paint-3d.md b/docs/install-paint-3d.md index effd1c9f..e09314de 100644 --- a/docs/install-paint-3d.md +++ b/docs/install-paint-3d.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "Installing Paint 3D, please wait..." @@ -58,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-power-toys.md b/docs/install-power-toys.md index b9568189..7b68fe78 100644 --- a/docs/install-power-toys.md +++ b/docs/install-power-toys.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "Installing Microsoft Powertoys, please wait..." @@ -58,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-powershell.md b/docs/install-powershell.md index 1d9b83e4..7135b110 100644 --- a/docs/install-powershell.md +++ b/docs/install-powershell.md @@ -148,6 +148,8 @@ Script Content Invoke-Expression "& { $(Invoke-RestMethod 'https://aka.ms/install-powershell.ps1') } -daily" #> +#requires -version 5.1 + [CmdletBinding(DefaultParameterSetName = "Daily")] param( [Parameter(ParameterSetName = "Daily")] @@ -660,4 +662,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-rufus.md b/docs/install-rufus.md index e5430010..1fe24c84 100644 --- a/docs/install-rufus.md +++ b/docs/install-rufus.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "Installing Rufus, please wait..." @@ -58,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-salesforce-cli.md b/docs/install-salesforce-cli.md index b196d855..776745a9 100644 --- a/docs/install-salesforce-cli.md +++ b/docs/install-salesforce-cli.md @@ -46,6 +46,8 @@ Script Content Author: Gavin R. McDavitt #> +#requires -version 5.1 + try { # Define the URL of the Salesforce CLI installer $url = "https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-x64.exe" @@ -65,9 +67,9 @@ try { exit 0 # success } catch { - Write-Output "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + Write-Output "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-scoop.md b/docs/install-scoop.md index aab40fb0..3e8ed866 100644 --- a/docs/install-scoop.md +++ b/docs/install-scoop.md @@ -17,7 +17,8 @@ Parameters Script Content -------------- ```powershell +#requires -version 5.1 Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-signal-cli.md b/docs/install-signal-cli.md index 921114ae..5ab91a0c 100644 --- a/docs/install-signal-cli.md +++ b/docs/install-signal-cli.md @@ -58,6 +58,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$Version = "") try { @@ -82,13 +84,13 @@ try { rm "signal-cli-$Version.tar.gz" if ($lastExitCode -ne 0) { throw "'rm' failed" } - [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds - "βœ… installed signal-cli $Version to /opt and /usr/local/bin in $Elapsed sec" + [int]$elapsed = $StopWatch.Elapsed.TotalSeconds + "βœ… Signal-cli $Version installed to /opt and /usr/local/bin in $elapsed sec." exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-spotify.md b/docs/install-spotify.md index d45951cb..15e1e380 100644 --- a/docs/install-spotify.md +++ b/docs/install-spotify.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "Installing Spotify, please wait..." @@ -58,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-ssh-client.md b/docs/install-ssh-client.md index d053a6d8..7907d9fd 100644 --- a/docs/install-ssh-client.md +++ b/docs/install-ssh-client.md @@ -44,7 +44,7 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -#Requires -RunAsAdministrator +#requires -version 5.1 -RunAsAdministrator try { $StopWatch = [system.diagnostics.stopwatch]::startNew() @@ -64,4 +64,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-ssh-server.md b/docs/install-ssh-server.md index 4d0eb074..4320b8fa 100644 --- a/docs/install-ssh-server.md +++ b/docs/install-ssh-server.md @@ -44,7 +44,7 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -#Requires -RunAsAdministrator +#requires -version 5.1 -RunAsAdministrator try { $StopWatch = [system.diagnostics.stopwatch]::startNew() @@ -73,9 +73,9 @@ try { "βœ… installed and started SSH server in $Elapsed sec" exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:36)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-syncthing.md b/docs/install-syncthing.md index f77105b8..e11bcaf5 100644 --- a/docs/install-syncthing.md +++ b/docs/install-syncthing.md @@ -52,6 +52,8 @@ Script Content https://github.com/fleschutz/PowerShell #> +#requires -version 5.1 + try { $stopWatch = [system.diagnostics.stopwatch]::startNew() @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-thunderbird.md b/docs/install-thunderbird.md index 04f03161..7e08f7c5 100644 --- a/docs/install-thunderbird.md +++ b/docs/install-thunderbird.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "Installing Mozilla Thunderbird, please wait..." @@ -58,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-unbound-server.md b/docs/install-unbound-server.md index f3aadb19..b1a17c40 100644 --- a/docs/install-unbound-server.md +++ b/docs/install-unbound-server.md @@ -44,7 +44,7 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -#Requires -RunAsAdministrator +#requires -version 5.1 -RunAsAdministrator try { $StopWatch = [system.diagnostics.stopwatch]::startNew() @@ -94,9 +94,9 @@ try { "βœ… Installed Unbound in $Elapsed sec" exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-updates.md b/docs/install-updates.md index 7b332168..b274fb09 100644 --- a/docs/install-updates.md +++ b/docs/install-updates.md @@ -18,13 +18,13 @@ Example ------- ```powershell PS> ./install-updates.ps1 -⏳ (1/2) Checking update requirements... +⏳ (1/2) Checking requirements... βœ… Drive C: uses 56% of 1TB: 441GB free βœ… Swap space uses 22% of 4GB: 3GB free -⏳ (2/2) Checking Microsoft Store for updates... +⏳ (2/2) Querying Microsoft Store... ... ``` @@ -48,11 +48,11 @@ Script Content HINT: Use the script 'list-updates.ps1' to list the latest software updates in advance. .EXAMPLE PS> ./install-updates.ps1 - ⏳ (1/2) Checking update requirements... + ⏳ (1/2) Checking requirements... βœ… Drive C: uses 56% of 1TB: 441GB free βœ… Swap space uses 22% of 4GB: 3GB free - ⏳ (2/2) Checking Microsoft Store for updates... + ⏳ (2/2) Querying Microsoft Store... ... .LINK https://github.com/fleschutz/PowerShell @@ -60,6 +60,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $stopWatch = [system.diagnostics.stopwatch]::startNew() @@ -94,17 +96,17 @@ try { & "$PSScriptRoot/check-swap-space.ps1" Start-Sleep -seconds 3 "" - "⏳ (2/4) Checking Microsoft Store for updates..." + "⏳ (2/4) Querying Microsoft Store..." if (Get-Command winget -errorAction SilentlyContinue) { & winget upgrade --all --source=msstore --include-unknown } "" - "⏳ (3/4) Checking WinGet for updates..." + "⏳ (3/4) Querying WinGet..." if (Get-Command winget -errorAction SilentlyContinue) { & winget upgrade --all --source=winget --include-unknown } "" - "⏳ (4/4) Checking Chocolatey for updates..." + "⏳ (4/4) Querying Chocolatey..." if (Get-Command choco -errorAction SilentlyContinue) { & choco upgrade all -y } @@ -114,9 +116,9 @@ try { "βœ… Updates installed in $($elapsed)s." exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-visual-studio-code.md b/docs/install-visual-studio-code.md index 0b3e36d7..f8b26ebb 100644 --- a/docs/install-visual-studio-code.md +++ b/docs/install-visual-studio-code.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "Installing Visual Studio Code, please wait..." @@ -53,9 +55,9 @@ try { "Visual Studio Code installed successfully." exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-vivaldi.md b/docs/install-vivaldi.md index 2bae8d17..d4ac921f 100644 --- a/docs/install-vivaldi.md +++ b/docs/install-vivaldi.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "Installing Vivaldi, please wait..." @@ -58,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-vlc.md b/docs/install-vlc.md index 6430d578..542ab1ca 100644 --- a/docs/install-vlc.md +++ b/docs/install-vlc.md @@ -48,6 +48,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "⏳ Installing VLC media player from WinGet..." $stopWatch = [system.diagnostics.stopwatch]::startNew() @@ -64,4 +66,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-windows-terminal.md b/docs/install-windows-terminal.md index 41c51a93..8b2bbb2a 100644 --- a/docs/install-windows-terminal.md +++ b/docs/install-windows-terminal.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "Installing Windows Terminal, please wait..." @@ -58,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-wsl.md b/docs/install-wsl.md index d213d991..2922a690 100644 --- a/docs/install-wsl.md +++ b/docs/install-wsl.md @@ -44,7 +44,7 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -#Requires -RunAsAdministrator +#requires -version 5.1 -RunAsAdministrator try { $StopWatch = [system.diagnostics.stopwatch]::startNew() @@ -74,4 +74,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/install-zoom.md b/docs/install-zoom.md index c124fd66..df8f0561 100644 --- a/docs/install-zoom.md +++ b/docs/install-zoom.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { "Installing Zoom, please wait..." @@ -58,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/introduce-powershell.md b/docs/introduce-powershell.md index 08178934..bd42f44f 100644 --- a/docs/introduce-powershell.md +++ b/docs/introduce-powershell.md @@ -92,4 +92,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/kill-process.md b/docs/kill-process.md index ad5a980c..652f4b12 100644 --- a/docs/kill-process.md +++ b/docs/kill-process.md @@ -1,57 +1,72 @@ The *kill-process.ps1* Script =========================== -kill-process.ps1 [[-ProcessName] ] [] - +This PowerShell script stops all local processes matching the given name Parameters ---------- ```powershell +/Repos/PowerShell/scripts/kill-process.ps1 [[-processName] ] [] +-processName + Specifies the process name (ask user by default) + + Required? false + Position? 1 + Default value + Accept pipeline input? false + Aliases + Accept wildcard characters? false [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. ``` +Example +------- +```powershell +PS> ./kill-process.ps1 + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + Script Content -------------- ```powershell <# .SYNOPSIS - Kills all local processes matching the given name + Kills local processes .DESCRIPTION - ← enter a detailed description of the script here -.PARAMETER - ← enter the description of a parameter here (repeat the .PARAMETER for each parameter) + This PowerShell script stops all local processes matching the given name +.PARAMETER processName + Specifies the process name (ask user by default) .EXAMPLE - ← enter a sample command that uses the script, optionally followed by sample output and a description (repeat the .EXAMPLE for each example) -.NOTES - Author: ← enter full name here - License: ← enter license here + PS> ./kill-process.ps1 .LINK - ← enter URL to additional information here + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 #> -[CmdletBinding()] -param( -# [Parameter(Mandatory,ParameterSetName='ByProcessName')] - [string]$ProcessName = $(Read-Host -Prompt 'Enter the process name')) - -function KillProcesses { - Write-Host -BackgroundColor Yellow -ForegroundColor Red "Process to kill: $ProcessName" - Get-Process | Where-Object -FilterScript {$_.processname -eq $ProcessName} | Select-Object id | Stop-Process -} - +param([string]$processName = "") try { - KillProcesses -ProcessName $processName - "βœ”οΈ Done." + if ($processName -eq "") { $processName = Read-Host "Enter the process name" } + Get-Process | Where-Object -FilterScript {$_.processname -eq $processName} | Select-Object id | Stop-Process + "βœ”οΈ Stopped all processes matching '$processName'." exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/list-aliases.md b/docs/list-aliases.md index 73d4eb1d..0f2f34c8 100644 --- a/docs/list-aliases.md +++ b/docs/list-aliases.md @@ -65,4 +65,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/list-anagrams.md b/docs/list-anagrams.md index d04d4f22..51f8c121 100644 --- a/docs/list-anagrams.md +++ b/docs/list-anagrams.md @@ -122,4 +122,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/list-apps.md b/docs/list-apps.md index 558abcff..e8057a68 100644 --- a/docs/list-apps.md +++ b/docs/list-apps.md @@ -57,4 +57,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/list-ascii-table.md b/docs/list-ascii-table.md index f70cd501..93e6933d 100644 --- a/docs/list-ascii-table.md +++ b/docs/list-ascii-table.md @@ -120,4 +120,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/list-automatic-variables.md b/docs/list-automatic-variables.md index fc655e57..c0f2a7a3 100644 --- a/docs/list-automatic-variables.md +++ b/docs/list-automatic-variables.md @@ -100,4 +100,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/list-battery-status.md b/docs/list-battery-status.md index 26623284..49fe9827 100644 --- a/docs/list-battery-status.md +++ b/docs/list-battery-status.md @@ -64,4 +64,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/list-bios.md b/docs/list-bios.md index 8ca4a363..ce57c0c1 100644 --- a/docs/list-bios.md +++ b/docs/list-bios.md @@ -63,4 +63,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/list-bluetooth-devices.md b/docs/list-bluetooth-devices.md index bd5a4412..269a0040 100644 --- a/docs/list-bluetooth-devices.md +++ b/docs/list-bluetooth-devices.md @@ -65,4 +65,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/list-branches.md b/docs/list-branches.md index c3edb066..9198fe27 100644 --- a/docs/list-branches.md +++ b/docs/list-branches.md @@ -109,4 +109,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/list-calendar.md b/docs/list-calendar.md index 4dcd0073..f1121408 100644 --- a/docs/list-calendar.md +++ b/docs/list-calendar.md @@ -247,4 +247,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/list-cheat-sheet.md b/docs/list-cheat-sheet.md index cb0642d1..992db68d 100644 --- a/docs/list-cheat-sheet.md +++ b/docs/list-cheat-sheet.md @@ -75,4 +75,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/list-city-weather.md b/docs/list-city-weather.md index 25a23759..9b153ca3 100644 --- a/docs/list-city-weather.md +++ b/docs/list-city-weather.md @@ -56,4 +56,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/list-cli-tools.md b/docs/list-cli-tools.md index eaf10055..e72e1fd2 100644 --- a/docs/list-cli-tools.md +++ b/docs/list-cli-tools.md @@ -256,6 +256,7 @@ function List-CLI-Tools { ListTool mktemp "--version" ListTool mount "--version" ListTool MpCmdRun "-h" + ListTool msedit "--version" ListTool nano "--version" ListTool netsh "" ListTool netstat "" @@ -356,6 +357,7 @@ function List-CLI-Tools { ListTool zipnote "" ListTool zipsplit "" ListTool zsh "--version" + ListTool zstd "--version" ListTool zvm "--version" } @@ -368,4 +370,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/list-clipboard.md b/docs/list-clipboard.md index c870d8f2..136967d7 100644 --- a/docs/list-clipboard.md +++ b/docs/list-clipboard.md @@ -56,4 +56,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/list-cmdlets.md b/docs/list-cmdlets.md index 0ae35971..621cca4d 100644 --- a/docs/list-cmdlets.md +++ b/docs/list-cmdlets.md @@ -67,4 +67,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/list-coffee-prices.md b/docs/list-coffee-prices.md index 9b469dfc..6be60fb7 100644 --- a/docs/list-coffee-prices.md +++ b/docs/list-coffee-prices.md @@ -62,20 +62,21 @@ try { Write-Progress -completed "Done." "" - "Monthly $($prices.name) (by alphavantage.co, in $($prices.unit))" - "-----------------------------------------------------------------------" + "Monthly $($prices.name) 1990-2025 ($($prices.unit), source: alphavantage.co)" + "------------------------------------------------------------------------------" + [array]::Reverse($prices.data) foreach($item in $prices.data) { - if ($Item.value -eq ".") { continue } + if ($item.value -eq ".") { continue } Write-Host "$($item.date) " -noNewline - [int]$value = $Item.value - WriteHorizontalBar $value 350.0 + [int]$value = $item.value + WriteHorizontalBar $value 400.0 Write-Host "ct" } exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/list-commit-stats.md b/docs/list-commit-stats.md index 2411c626..98f06f84 100644 --- a/docs/list-commit-stats.md +++ b/docs/list-commit-stats.md @@ -94,4 +94,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:22)* diff --git a/docs/list-commits.md b/docs/list-commits.md index 33a57244..2b15c2c4 100644 --- a/docs/list-commits.md +++ b/docs/list-commits.md @@ -122,4 +122,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-console-colors.md b/docs/list-console-colors.md index 4a4f4c80..16fead0e 100644 --- a/docs/list-console-colors.md +++ b/docs/list-console-colors.md @@ -73,4 +73,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-countries.md b/docs/list-countries.md index b16d78be..89996b68 100644 --- a/docs/list-countries.md +++ b/docs/list-countries.md @@ -52,4 +52,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-cpu.md b/docs/list-cpu.md index fe6ad8be..a187c6ce 100644 --- a/docs/list-cpu.md +++ b/docs/list-cpu.md @@ -63,4 +63,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-crypto-rates.md b/docs/list-crypto-rates.md index 3101749e..1242993a 100644 --- a/docs/list-crypto-rates.md +++ b/docs/list-crypto-rates.md @@ -76,4 +76,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-defender-settings.md b/docs/list-defender-settings.md index 4ca4445a..28f1179d 100644 --- a/docs/list-defender-settings.md +++ b/docs/list-defender-settings.md @@ -69,4 +69,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-dir-tree.md b/docs/list-dir-tree.md index f5c89d2d..184b4d34 100644 --- a/docs/list-dir-tree.md +++ b/docs/list-dir-tree.md @@ -1,7 +1,7 @@ The *list-dir-tree.ps1* Script =========================== -This PowerShell script lists all files and folders in a neat directory tree (including icon and size). +This PowerShell script lists all files and folders in a directory tree (including icon and size). Parameters ---------- @@ -9,7 +9,7 @@ Parameters /Repos/PowerShell/scripts/list-dir-tree.ps1 [[-path] ] [] -path - Specifies the path to the directory tree + Specifies the file path to the directory tree Required? false Position? 1 @@ -29,7 +29,7 @@ Example PS> ./list-dir-tree.ps1 C:\MyFolder β”œπŸ“‚Results β”‚ β”œπŸ“„sales.txt (442K) -(2 folders, 1 file, 442K file size in total) + (2 folders, 1 file, 442K total) ``` @@ -46,16 +46,16 @@ Script Content ```powershell <# .SYNOPSIS - Lists a dir tree + Lists a directory tree .DESCRIPTION - This PowerShell script lists all files and folders in a neat directory tree (including icon and size). + This PowerShell script lists all files and folders in a directory tree (including icon and size). .PARAMETER path - Specifies the path to the directory tree + Specifies the file path to the directory tree .EXAMPLE PS> ./list-dir-tree.ps1 C:\MyFolder β”œπŸ“‚Results β”‚ β”œπŸ“„sales.txt (442K) - (2 folders, 1 file, 442K file size in total) + (2 folders, 1 file, 442K total) .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -95,35 +95,33 @@ function Bytes2String([int64]$bytes) { } function ListDir([string]$path, [int]$depth) { - $depth++ $items = Get-ChildItem -path $path foreach($item in $items) { - $filename = $item.Name - for ($i = 1; $i -lt $depth; $i++) { Write-Host "β”‚ " -noNewline } + Write-Host " " -noNewline + for ([int]$i = 1; $i -lt $depth; $i++) { Write-Host "β”‚ " -noNewline } if ($item.Mode -like "d*") { - Write-Output "β”œπŸ“‚$Filename" - ListDir "$path\$filename" $depth + Write-Host "β”œπŸ“‚$($item.Name)" + ListDir "$path\$($item.Name)" ($depth + 1) } else { - $icon = GetFileIcon $item.Extension - Write-Output "β”œ$($icon)$filename ($(Bytes2String $item.Length))" + Write-Host "β”œ$(GetFileIcon $item.Extension)$($item.Name) ($(Bytes2String $item.Length))" $global:files++ $global:bytes += $item.Length } } $global:folders++ + if ($depth -gt $global:depth) { $global:depth = $depth } } try { - [int64]$global:folders = 0 - [int64]$global:files = 0 - [int64]$global:bytes = 0 - ListDir $path 0 - Write-Output " ($($global:folders) folders, $($global:files) files, $(Bytes2String $global:bytes) total)" + Write-Host "`n πŸ“‚$path" + [int64]$global:files = $global:folders = $global:depth = $global:bytes = 0 + ListDir $path 1 + " ($($global:files) files, $($global:folders) folders, depth $($global:depth), $(Bytes2String $global:bytes) total)" exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-dns-servers.md b/docs/list-dns-servers.md index 56d66531..c4a5f9c9 100644 --- a/docs/list-dns-servers.md +++ b/docs/list-dns-servers.md @@ -60,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-drives.md b/docs/list-drives.md index 2814d35c..a38bdf81 100644 --- a/docs/list-drives.md +++ b/docs/list-drives.md @@ -63,4 +63,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-earthquakes.md b/docs/list-earthquakes.md index dfeec53c..51750242 100644 --- a/docs/list-earthquakes.md +++ b/docs/list-earthquakes.md @@ -94,4 +94,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-emojis.md b/docs/list-emojis.md index 261d94ea..cb6a40c8 100644 --- a/docs/list-emojis.md +++ b/docs/list-emojis.md @@ -72,4 +72,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-empty-dirs.md b/docs/list-empty-dirs.md index 2413357d..22161993 100644 --- a/docs/list-empty-dirs.md +++ b/docs/list-empty-dirs.md @@ -82,4 +82,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-empty-files.md b/docs/list-empty-files.md index 8bd58add..7e130a21 100644 --- a/docs/list-empty-files.md +++ b/docs/list-empty-files.md @@ -82,4 +82,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-encrypted-files.md b/docs/list-encrypted-files.md index 2ed69395..0460a51c 100644 --- a/docs/list-encrypted-files.md +++ b/docs/list-encrypted-files.md @@ -82,4 +82,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-environment-variables.md b/docs/list-environment-variables.md index 3ae5be61..cf260cbd 100644 --- a/docs/list-environment-variables.md +++ b/docs/list-environment-variables.md @@ -65,4 +65,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-error-types.md b/docs/list-error-types.md index 79b22460..93ca083d 100644 --- a/docs/list-error-types.md +++ b/docs/list-error-types.md @@ -26,4 +26,4 @@ Script Content } | Select BaseType,Name,FullName ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-exchange-rates.md b/docs/list-exchange-rates.md index cc33e42f..3a21269e 100644 --- a/docs/list-exchange-rates.md +++ b/docs/list-exchange-rates.md @@ -96,4 +96,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-executables.md b/docs/list-executables.md index 684f067a..f7b6b264 100644 --- a/docs/list-executables.md +++ b/docs/list-executables.md @@ -84,4 +84,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-fibonacci.md b/docs/list-fibonacci.md index 551d05c3..408a0758 100644 --- a/docs/list-fibonacci.md +++ b/docs/list-fibonacci.md @@ -43,4 +43,4 @@ foreach ($i in 0..100) { exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-files.md b/docs/list-files.md index c6620f71..d2cbb864 100644 --- a/docs/list-files.md +++ b/docs/list-files.md @@ -69,4 +69,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-folder.md b/docs/list-folder.md index 59393f82..68173fb6 100644 --- a/docs/list-folder.md +++ b/docs/list-folder.md @@ -9,7 +9,7 @@ Parameters /Repos/PowerShell/scripts/list-folder.ps1 [[-searchPattern] ] [] -searchPattern - Specifies the search pattern ("*" by default which means anything) + Specifies the search pattern (default is "*" which means anything) Required? false Position? 1 @@ -47,7 +47,7 @@ Script Content .DESCRIPTION This PowerShell script lists the content of a directory (alphabetically formatted in columns). .PARAMETER SearchPattern - Specifies the search pattern ("*" by default which means anything) + Specifies the search pattern (default is "*" which means anything) .EXAMPLE PS> ./list-folder.ps1 C:\* .LINK @@ -68,6 +68,7 @@ function GetFileIcon([string]$suffix) { ".jpg" {return "πŸ“Έ"} ".mp3" {return "🎡"} ".mkv" {return "🎬"} + ".ps1" {return "βš™οΈ"} ".zip" {return "🎁"} default {return "πŸ“„"} } @@ -92,4 +93,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-fritzbox-calls.md b/docs/list-fritzbox-calls.md index 42b24b99..0868603d 100644 --- a/docs/list-fritzbox-calls.md +++ b/docs/list-fritzbox-calls.md @@ -155,4 +155,4 @@ echo $Result exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-fritzbox-devices.md b/docs/list-fritzbox-devices.md index 84623c06..ec997993 100644 --- a/docs/list-fritzbox-devices.md +++ b/docs/list-fritzbox-devices.md @@ -107,4 +107,4 @@ $HostTable | format-table -property Active,IPAddress,MACAddress,HostName,Interfa exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-headlines.md b/docs/list-headlines.md index 44b61585..71301bbc 100644 --- a/docs/list-headlines.md +++ b/docs/list-headlines.md @@ -91,4 +91,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-hidden-files.md b/docs/list-hidden-files.md index 46f0caee..bd87949c 100644 --- a/docs/list-hidden-files.md +++ b/docs/list-hidden-files.md @@ -82,4 +82,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-installed-hotfixes.md b/docs/list-installed-hotfixes.md index 81012065..068715ad 100644 --- a/docs/list-installed-hotfixes.md +++ b/docs/list-installed-hotfixes.md @@ -65,4 +65,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-installed-languages.md b/docs/list-installed-languages.md index 86d55e01..e10fc575 100644 --- a/docs/list-installed-languages.md +++ b/docs/list-installed-languages.md @@ -50,4 +50,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-installed-scripts.md b/docs/list-installed-scripts.md index ff29de7b..f9fbdfd2 100644 --- a/docs/list-installed-scripts.md +++ b/docs/list-installed-scripts.md @@ -48,4 +48,4 @@ Get-InstalledScript exit # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-installed-software.md b/docs/list-installed-software.md index 38853b11..c67ad297 100644 --- a/docs/list-installed-software.md +++ b/docs/list-installed-software.md @@ -65,4 +65,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-internet-ip.md b/docs/list-internet-ip.md index 8042fc2e..eb63c0c4 100644 --- a/docs/list-internet-ip.md +++ b/docs/list-internet-ip.md @@ -70,4 +70,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-ipv6.md b/docs/list-ipv6.md index 7abdec92..f815ee84 100644 --- a/docs/list-ipv6.md +++ b/docs/list-ipv6.md @@ -63,4 +63,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-latest-tag.md b/docs/list-latest-tag.md index 264ecdda..969fa83d 100644 --- a/docs/list-latest-tag.md +++ b/docs/list-latest-tag.md @@ -78,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-latest-tags.md b/docs/list-latest-tags.md index 12ce8546..bdfb19c1 100644 --- a/docs/list-latest-tags.md +++ b/docs/list-latest-tags.md @@ -86,4 +86,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-local-ip.md b/docs/list-local-ip.md index 07a88f2c..80e0c9f5 100644 --- a/docs/list-local-ip.md +++ b/docs/list-local-ip.md @@ -62,4 +62,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:37)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-mDNS.md b/docs/list-mDNS.md index 72817c21..2f734d19 100644 --- a/docs/list-mDNS.md +++ b/docs/list-mDNS.md @@ -21,4 +21,4 @@ Get-NetUDPEndpoint -localPort 5353 | Select-Object LocalAddress,LocalPort,Owning exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-memos.md b/docs/list-memos.md index 11199555..6cf71ee0 100644 --- a/docs/list-memos.md +++ b/docs/list-memos.md @@ -68,4 +68,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-mysql-tables.md b/docs/list-mysql-tables.md index 100b0fbd..e385fca1 100644 --- a/docs/list-mysql-tables.md +++ b/docs/list-mysql-tables.md @@ -94,4 +94,4 @@ $result = Invoke-MySqlQuery -ConnectionString "server=$server; database=$databa $result | Export-Csv $csvfilepath -NoTypeInformation ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-network-connections.md b/docs/list-network-connections.md index 999ea96d..d345cd7d 100644 --- a/docs/list-network-connections.md +++ b/docs/list-network-connections.md @@ -53,4 +53,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-network-neighbors.md b/docs/list-network-neighbors.md index ef627c6d..1c9d439f 100644 --- a/docs/list-network-neighbors.md +++ b/docs/list-network-neighbors.md @@ -71,4 +71,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-network-routes.md b/docs/list-network-routes.md index be68960c..aa5ff58f 100644 --- a/docs/list-network-routes.md +++ b/docs/list-network-routes.md @@ -53,4 +53,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-network-shares.md b/docs/list-network-shares.md index 37da8611..39d4907d 100644 --- a/docs/list-network-shares.md +++ b/docs/list-network-shares.md @@ -17,7 +17,7 @@ Example ------- ```powershell PS> ./list-network-shares.ps1 -βœ… Shared folder \\LAPTOP\Public -> D:\Public ("Public folder for file transfer") +βœ… Shared folder \\LAPTOP\Public ("File transfer folder") -> D:\Public ``` @@ -39,7 +39,7 @@ Script Content This PowerShell script lists all network shares (aka "shared folders") of the local computer. .EXAMPLE PS> ./list-network-shares.ps1 - βœ… Shared folder \\LAPTOP\Public -> D:\Public ("Public folder for file transfer") + βœ… Shared folder \\LAPTOP\Public ("File transfer folder") -> D:\Public .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -52,7 +52,7 @@ try { } else { $shares = Get-WmiObject win32_share | where {$_.name -NotLike "*$"} foreach ($share in $shares) { - Write-Output "βœ… Shared folder \\$(hostname)\$($share.Name) -> $($share.Path) (`"$($share.Description)`")" + Write-Output "βœ… Shared folder \\$(hostname)\$($share.Name) (`"$($share.Description)`") -> $($share.Path)" } } exit 0 # success @@ -62,4 +62,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-news.md b/docs/list-news.md index 09669628..8f5ae135 100644 --- a/docs/list-news.md +++ b/docs/list-news.md @@ -114,4 +114,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-nic.md b/docs/list-nic.md index 1bb6ca3c..e42883e0 100644 --- a/docs/list-nic.md +++ b/docs/list-nic.md @@ -53,4 +53,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-nina-warnings.md b/docs/list-nina-warnings.md index a4c2d7c3..2723ad0c 100644 --- a/docs/list-nina-warnings.md +++ b/docs/list-nina-warnings.md @@ -105,4 +105,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-old-branches.md b/docs/list-old-branches.md index 361f7887..e601c6ad 100644 --- a/docs/list-old-branches.md +++ b/docs/list-old-branches.md @@ -86,4 +86,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-os-releases.md b/docs/list-os-releases.md index 1088ebdb..57b3157d 100644 --- a/docs/list-os-releases.md +++ b/docs/list-os-releases.md @@ -66,4 +66,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-os-updates.md b/docs/list-os-updates.md index 51edede1..60fd3072 100644 --- a/docs/list-os-updates.md +++ b/docs/list-os-updates.md @@ -91,4 +91,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-os.md b/docs/list-os.md index b0c13d40..be93b42c 100644 --- a/docs/list-os.md +++ b/docs/list-os.md @@ -61,4 +61,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-outlook-inbox.md b/docs/list-outlook-inbox.md index b71a25fc..f1b27ca8 100644 --- a/docs/list-outlook-inbox.md +++ b/docs/list-outlook-inbox.md @@ -56,4 +56,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-outlook-sent.md b/docs/list-outlook-sent.md index be8b284e..d781341a 100644 --- a/docs/list-outlook-sent.md +++ b/docs/list-outlook-sent.md @@ -56,4 +56,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-passwords.md b/docs/list-passwords.md index acf42f45..b5a83b0c 100644 --- a/docs/list-passwords.md +++ b/docs/list-passwords.md @@ -114,4 +114,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-pins.md b/docs/list-pins.md index f5f453c2..e75318da 100644 --- a/docs/list-pins.md +++ b/docs/list-pins.md @@ -103,4 +103,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-power-schemes.md b/docs/list-power-schemes.md index 4bc909d3..2ee85215 100644 --- a/docs/list-power-schemes.md +++ b/docs/list-power-schemes.md @@ -21,4 +21,4 @@ powercfg /list exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-powershell-modules.md b/docs/list-powershell-modules.md index a16cd23c..7f02719c 100644 --- a/docs/list-powershell-modules.md +++ b/docs/list-powershell-modules.md @@ -65,4 +65,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-powershell-profiles.md b/docs/list-powershell-profiles.md index c0935348..a446b53f 100644 --- a/docs/list-powershell-profiles.md +++ b/docs/list-powershell-profiles.md @@ -58,4 +58,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-powershell-verbs.md b/docs/list-powershell-verbs.md index e5d44599..749e429e 100644 --- a/docs/list-powershell-verbs.md +++ b/docs/list-powershell-verbs.md @@ -65,4 +65,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-print-jobs.md b/docs/list-print-jobs.md index 55c0de3c..0ec6a48a 100644 --- a/docs/list-print-jobs.md +++ b/docs/list-print-jobs.md @@ -87,4 +87,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-printers.md b/docs/list-printers.md index 53ce0711..ddfca7a3 100644 --- a/docs/list-printers.md +++ b/docs/list-printers.md @@ -59,4 +59,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-processes.md b/docs/list-processes.md index 5b5677a9..306314b9 100644 --- a/docs/list-processes.md +++ b/docs/list-processes.md @@ -65,4 +65,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-pull-requests.md b/docs/list-pull-requests.md index 8acf4407..98622d2b 100644 --- a/docs/list-pull-requests.md +++ b/docs/list-pull-requests.md @@ -84,4 +84,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-ram.md b/docs/list-ram.md index e5c7e9c7..641117d8 100644 --- a/docs/list-ram.md +++ b/docs/list-ram.md @@ -63,4 +63,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-read-only-files.md b/docs/list-read-only-files.md index c953bedb..bac3ca25 100644 --- a/docs/list-read-only-files.md +++ b/docs/list-read-only-files.md @@ -82,4 +82,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-recycle-bin.md b/docs/list-recycle-bin.md index 9ab2e906..ee0bd381 100644 --- a/docs/list-recycle-bin.md +++ b/docs/list-recycle-bin.md @@ -53,4 +53,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-repos.md b/docs/list-repos.md index 1475642c..50ad6625 100644 --- a/docs/list-repos.md +++ b/docs/list-repos.md @@ -104,4 +104,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-scripts.md b/docs/list-scripts.md index 46b08c28..6f631ba8 100644 --- a/docs/list-scripts.md +++ b/docs/list-scripts.md @@ -70,4 +70,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-scsi-devices.md b/docs/list-scsi-devices.md index 252f6fbd..ac2975fe 100644 --- a/docs/list-scsi-devices.md +++ b/docs/list-scsi-devices.md @@ -65,4 +65,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-services.md b/docs/list-services.md index fa88ca93..8876f507 100644 --- a/docs/list-services.md +++ b/docs/list-services.md @@ -65,4 +65,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-special-folders.md b/docs/list-special-folders.md index 8d7e4e05..9d56a6c3 100644 --- a/docs/list-special-folders.md +++ b/docs/list-special-folders.md @@ -105,4 +105,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-sql-tables.md b/docs/list-sql-tables.md index 780d1947..5d3bc4fe 100644 --- a/docs/list-sql-tables.md +++ b/docs/list-sql-tables.md @@ -97,4 +97,4 @@ $result = Invoke-SqlServerQuery -Credential $creds -ConnectionTimeout 10000 -Dat $result | Export-Csv $csvfilepath -NoTypeInformation ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-ssh-key.md b/docs/list-ssh-key.md index 029c6968..6935a4f0 100644 --- a/docs/list-ssh-key.md +++ b/docs/list-ssh-key.md @@ -61,4 +61,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-submodules.md b/docs/list-submodules.md index d85fe00e..82bd21e8 100644 --- a/docs/list-submodules.md +++ b/docs/list-submodules.md @@ -82,4 +82,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-suggestions.md b/docs/list-suggestions.md index cb1020b3..c6f22fb1 100644 --- a/docs/list-suggestions.md +++ b/docs/list-suggestions.md @@ -76,4 +76,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-system-devices.md b/docs/list-system-devices.md index 22b9270e..a90aa53a 100644 --- a/docs/list-system-devices.md +++ b/docs/list-system-devices.md @@ -65,4 +65,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-system-files.md b/docs/list-system-files.md index 39dbce75..ea53c0ad 100644 --- a/docs/list-system-files.md +++ b/docs/list-system-files.md @@ -82,4 +82,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-system-info.md b/docs/list-system-info.md index 3a20ca03..0aad84bd 100644 --- a/docs/list-system-info.md +++ b/docs/list-system-info.md @@ -141,4 +141,4 @@ $info exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-tags.md b/docs/list-tags.md index 647668b6..6edadc60 100644 --- a/docs/list-tags.md +++ b/docs/list-tags.md @@ -112,4 +112,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-tasks.md b/docs/list-tasks.md index 75fcefe4..45c017ac 100644 --- a/docs/list-tasks.md +++ b/docs/list-tasks.md @@ -44,4 +44,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-timezone.md b/docs/list-timezone.md index 9962eec1..9cb71862 100644 --- a/docs/list-timezone.md +++ b/docs/list-timezone.md @@ -64,4 +64,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-timezones.md b/docs/list-timezones.md index 01fa38c3..1bd91256 100644 --- a/docs/list-timezones.md +++ b/docs/list-timezones.md @@ -67,4 +67,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:23)* diff --git a/docs/list-tiobe-index.md b/docs/list-tiobe-index.md index bf52adc1..790b394a 100644 --- a/docs/list-tiobe-index.md +++ b/docs/list-tiobe-index.md @@ -78,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/list-unused-files.md b/docs/list-unused-files.md index b7c6d76f..aa98196a 100644 --- a/docs/list-unused-files.md +++ b/docs/list-unused-files.md @@ -97,4 +97,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/list-updates.md b/docs/list-updates.md index 90abe032..7cd02db2 100644 --- a/docs/list-updates.md +++ b/docs/list-updates.md @@ -97,9 +97,9 @@ try { "πŸ’‘ Execute 'install-updates.ps1' to install the listed updates." exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/list-usb-devices.md b/docs/list-usb-devices.md index c63fa61c..3ce17373 100644 --- a/docs/list-usb-devices.md +++ b/docs/list-usb-devices.md @@ -65,4 +65,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/list-user-accounts.md b/docs/list-user-accounts.md index 03b66f2f..37f260c5 100644 --- a/docs/list-user-accounts.md +++ b/docs/list-user-accounts.md @@ -57,4 +57,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/list-user-groups.md b/docs/list-user-groups.md index a34ba439..18230c33 100644 --- a/docs/list-user-groups.md +++ b/docs/list-user-groups.md @@ -65,4 +65,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/list-voices.md b/docs/list-voices.md index be8eda87..65fb5742 100644 --- a/docs/list-voices.md +++ b/docs/list-voices.md @@ -71,4 +71,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/list-weather.md b/docs/list-weather.md index 92d50732..91b32a06 100644 --- a/docs/list-weather.md +++ b/docs/list-weather.md @@ -179,4 +179,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/list-wifi.md b/docs/list-wifi.md index d32c89f3..ea1e3dab 100644 --- a/docs/list-wifi.md +++ b/docs/list-wifi.md @@ -53,4 +53,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/list-window-titles.md b/docs/list-window-titles.md index 86864ffe..f0903837 100644 --- a/docs/list-window-titles.md +++ b/docs/list-window-titles.md @@ -65,4 +65,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/list-workdir.md b/docs/list-workdir.md index 8c370495..5482177d 100644 --- a/docs/list-workdir.md +++ b/docs/list-workdir.md @@ -56,4 +56,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/list-wsl-distros.md b/docs/list-wsl-distros.md index 76116745..d362066a 100644 --- a/docs/list-wsl-distros.md +++ b/docs/list-wsl-distros.md @@ -65,4 +65,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/locate-city.md b/docs/locate-city.md index 0cb31a19..1176f5bc 100644 --- a/docs/locate-city.md +++ b/docs/locate-city.md @@ -88,4 +88,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/locate-ipaddress.md b/docs/locate-ipaddress.md index b58e26df..c524b435 100644 --- a/docs/locate-ipaddress.md +++ b/docs/locate-ipaddress.md @@ -46,4 +46,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/locate-my-phone.md b/docs/locate-my-phone.md index 123d6b42..577413ce 100644 --- a/docs/locate-my-phone.md +++ b/docs/locate-my-phone.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/locate-zip-code.md b/docs/locate-zip-code.md index 442b91ce..753b3731 100644 --- a/docs/locate-zip-code.md +++ b/docs/locate-zip-code.md @@ -103,4 +103,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/lock-desktop.md b/docs/lock-desktop.md index 7c1d7b18..3aeb84c2 100644 --- a/docs/lock-desktop.md +++ b/docs/lock-desktop.md @@ -54,4 +54,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/log-off.md b/docs/log-off.md index 0e5f07e9..420bc58f 100644 --- a/docs/log-off.md +++ b/docs/log-off.md @@ -53,4 +53,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/make-install.md b/docs/make-install.md index 1fd1a397..ae53183d 100644 --- a/docs/make-install.md +++ b/docs/make-install.md @@ -64,4 +64,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/measure-BubbleSort.md b/docs/measure-BubbleSort.md index fcc93890..b844c55c 100644 --- a/docs/measure-BubbleSort.md +++ b/docs/measure-BubbleSort.md @@ -93,4 +93,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/measure-BucketSort.md b/docs/measure-BucketSort.md index 522b4bca..df761b6d 100644 --- a/docs/measure-BucketSort.md +++ b/docs/measure-BucketSort.md @@ -121,4 +121,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/measure-CountingSort.md b/docs/measure-CountingSort.md index 431c8c03..6c935bae 100644 --- a/docs/measure-CountingSort.md +++ b/docs/measure-CountingSort.md @@ -112,4 +112,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/measure-HeapSort.md b/docs/measure-HeapSort.md index 9e25acfb..c26e8312 100644 --- a/docs/measure-HeapSort.md +++ b/docs/measure-HeapSort.md @@ -127,4 +127,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/measure-InsertionSort.md b/docs/measure-InsertionSort.md index 7e84336d..cc0af7cf 100644 --- a/docs/measure-InsertionSort.md +++ b/docs/measure-InsertionSort.md @@ -96,4 +96,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/measure-MergeSort.md b/docs/measure-MergeSort.md index 7a94d0cb..ffc5395c 100644 --- a/docs/measure-MergeSort.md +++ b/docs/measure-MergeSort.md @@ -121,4 +121,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/measure-QuickSort.md b/docs/measure-QuickSort.md index ed67aeab..83b02934 100644 --- a/docs/measure-QuickSort.md +++ b/docs/measure-QuickSort.md @@ -102,4 +102,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/measure-SelectionSort.md b/docs/measure-SelectionSort.md index 4f501993..113953ce 100644 --- a/docs/measure-SelectionSort.md +++ b/docs/measure-SelectionSort.md @@ -95,4 +95,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/measure-sorting-algorithms.md b/docs/measure-sorting-algorithms.md index 10e4cd02..883878f4 100644 --- a/docs/measure-sorting-algorithms.md +++ b/docs/measure-sorting-algorithms.md @@ -74,4 +74,4 @@ param([int]$numIntegers = 3000) exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/merry-christmas.md b/docs/merry-christmas.md index 80b5b7c6..b9c0a516 100644 --- a/docs/merry-christmas.md +++ b/docs/merry-christmas.md @@ -50,4 +50,4 @@ $Reply = "Merry Christmas to you too!", "Happy Christmas to you too!" | Get-Rand exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/minimize-all-windows.md b/docs/minimize-all-windows.md index 86216a3f..68717d5c 100644 --- a/docs/minimize-all-windows.md +++ b/docs/minimize-all-windows.md @@ -54,4 +54,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/move-mouse-pointer.md b/docs/move-mouse-pointer.md index 092243e2..8d610f71 100644 --- a/docs/move-mouse-pointer.md +++ b/docs/move-mouse-pointer.md @@ -86,4 +86,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/move-vm.md b/docs/move-vm.md index ed709f6f..98bde87a 100644 --- a/docs/move-vm.md +++ b/docs/move-vm.md @@ -22,4 +22,4 @@ Move-VM $VMName HOST2 -IncludeStorage -DestinationStoragePath "D:\VirtualMachine exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:38)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/my-profile.md b/docs/my-profile.md index 56a9f5d3..d448a117 100644 --- a/docs/my-profile.md +++ b/docs/my-profile.md @@ -39,4 +39,4 @@ Del alias:pwd -force -errorAction SilentlyContinue Set-Alias -name pwd -value list-workdir.ps1 # pwd = print working directory ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/new-branch.md b/docs/new-branch.md index 52c65d9e..f8d8759e 100644 --- a/docs/new-branch.md +++ b/docs/new-branch.md @@ -6,10 +6,10 @@ This PowerShell script creates a new branch in a local Git repository and switch Parameters ---------- ```powershell -/Repos/PowerShell/scripts/new-branch.ps1 [[-newBranch] ] [[-pathToRepo] ] [] +/Repos/PowerShell/scripts/new-branch.ps1 [[-newBranch] ] [[-path] ] [] -newBranch - Specifies the new Git branch name + Specifies the new branch name Required? false Position? 1 @@ -18,8 +18,8 @@ Parameters Aliases Accept wildcard characters? false --pathToRepo - Specifies the file path to the local Git repository (current working directory per default) +-path + Specifies the file path to the local Git repository (current working directory by default) Required? false Position? 2 @@ -36,14 +36,14 @@ Parameters Example ------- ```powershell -PS> ./new-branch.ps1 test123 +PS> ./new-branch.ps1 feature123 ⏳ (1/6) Searching for Git executable... git version 2.45.0 ⏳ (2/6) Checking local repository... C:\Repos\rust ⏳ (3/6) Fetching remote updates... git@github.org:rust/rust.git ⏳ (4/6) Creating new branch... ⏳ (5/6) Pushing updates... ⏳ (6/6) Updating submodules... -βœ… Created branch 'test123' based on 'main' in πŸ“‚rust repo in 18s. +βœ… Repo 'rust' on new branch 'feature123' (based on 'main', took 18s). ``` @@ -64,25 +64,25 @@ Script Content .DESCRIPTION This PowerShell script creates a new branch in a local Git repository and switches to it. .PARAMETER newBranch - Specifies the new Git branch name -.PARAMETER pathToRepo - Specifies the file path to the local Git repository (current working directory per default) + Specifies the new branch name +.PARAMETER path + Specifies the file path to the local Git repository (current working directory by default) .EXAMPLE - PS> ./new-branch.ps1 test123 + PS> ./new-branch.ps1 feature123 ⏳ (1/6) Searching for Git executable... git version 2.45.0 ⏳ (2/6) Checking local repository... C:\Repos\rust ⏳ (3/6) Fetching remote updates... git@github.org:rust/rust.git ⏳ (4/6) Creating new branch... ⏳ (5/6) Pushing updates... ⏳ (6/6) Updating submodules... - βœ… Created branch 'test123' based on 'main' in πŸ“‚rust repo in 18s. + βœ… Repo 'rust' on new branch 'feature123' (based on 'main', took 18s). .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$newBranch = "", [string]$pathToRepo = "$PWD") +param([string]$newBranch = "", [string]$path = "$PWD") try { if ($newBranch -eq "") { $newBranch = Read-Host "Enter the new Git branch name" } @@ -93,41 +93,41 @@ try { & git --version if ($lastExitCode -ne 0) { throw "Can't execute 'git' - make sure Git is installed and available" } - Write-Host "⏳ (2/6) Checking local repository... $pathToRepo" - if (-not(Test-Path "$pathToRepo" -pathType container)) { throw "Can't access repo folder: $pathToRepo" } - $result = (git -C "$pathToRepo" status) - if ($lastExitCode -ne 0) { throw "'git status' in $pathToRepo failed with exit code $lastExitCode" } - $repoName = (Get-Item "$pathToRepo").Name + Write-Host "⏳ (2/6) Checking local repository... $path" + if (-not(Test-Path "$path" -pathType container)) { throw "Can't access repo folder: $path" } + $result = (git -C "$path" status) + if ($lastExitCode -ne 0) { throw "'git status' in $path failed with exit code $lastExitCode" } + $repoName = (Get-Item "$path").Name Write-Host "⏳ (3/6) Fetching remote updates... " -noNewline - & git -C "$pathToRepo" remote get-url origin + & git -C "$path" remote get-url origin if ($lastExitCode -ne 0) { throw "'git remote get-url origin' failed with exit code $lastExitCode" } - & git -C "$pathToRepo" fetch --all --recurse-submodules --prune --prune-tags --force + & git -C "$path" fetch --all --recurse-submodules --prune --prune-tags --force if ($lastExitCode -ne 0) { throw "'git fetch' failed with exit code $lastExitCode" } - $currentBranch = (git -C "$pathToRepo" rev-parse --abbrev-ref HEAD) + $currentBranch = (git -C "$path" rev-parse --abbrev-ref HEAD) if ($lastExitCode -ne 0) { throw "'git rev-parse' failed with exit code $lastExitCode" } "⏳ (4/6) Creating new branch..." - & git -C "$pathToRepo" checkout -b "$newBranch" + & git -C "$path" checkout -b "$newBranch" if ($lastExitCode -ne 0) { throw "'git checkout -b $newBranch' failed with exit code $lastExitCode" } "⏳ (5/6) Pushing updates..." - & git -C "$pathToRepo" push origin "$newBranch" + & git -C "$path" push origin "$newBranch" if ($lastExitCode -ne 0) { throw "'git push origin $newBranch' failed with exit code $lastExitCode" } "⏳ (6/6) Updating submodules..." - & git -C "$pathToRepo" submodule update --init --recursive + & git -C "$path" submodule update --init --recursive if ($lastExitCode -ne 0) { throw "'git submodule update' failed with exit code $lastExitCode" } [int]$elapsed = $stopWatch.Elapsed.TotalSeconds - "βœ… Created branch '$newBranch' based on '$currentBranch' in πŸ“‚$repoName repo in $($elapsed)s." + "βœ… Repo '$repoName' on new branch '$newBranch' (based on '$currentBranch', took $($elapsed)s)." exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/new-dir.md b/docs/new-dir.md index f37122c2..5b0160bc 100644 --- a/docs/new-dir.md +++ b/docs/new-dir.md @@ -71,9 +71,9 @@ try { "βœ… New πŸ“‚$path created." exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/new-email.md b/docs/new-email.md index a296e8a8..a47181b1 100644 --- a/docs/new-email.md +++ b/docs/new-email.md @@ -63,9 +63,9 @@ try { Start-Process $URL exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/new-junction.md b/docs/new-junction.md index af4c6cdc..d7b6bbca 100644 --- a/docs/new-junction.md +++ b/docs/new-junction.md @@ -74,17 +74,16 @@ param([string]$junction = "", [string]$targetDir = "") try { if ($junction -eq "" ) { $junction = Read-Host "Enter the new junction's path and filename" } - if ($targetDir -eq "" ) { $target = Read-Host "Enter the path to the target directory " } + if ($targetDir -eq "" ) { $targetDir = Read-Host "Enter the path to the target directory " } New-Item -path "$junction" -itemType Junction -value "$targetDir" - if ($lastExitCode -ne 0) { throw "Command 'New-Item' has failed" } "βœ… New junction '$junction' created, linking to: πŸ“‚$targetDir" exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/new-linux-vm.md b/docs/new-linux-vm.md index 2a28dc36..87ea1e94 100644 --- a/docs/new-linux-vm.md +++ b/docs/new-linux-vm.md @@ -38,4 +38,4 @@ $VMName = "linux" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/new-markdown-file.md b/docs/new-markdown-file.md index 6af6fdbd..09704fe4 100644 --- a/docs/new-markdown-file.md +++ b/docs/new-markdown-file.md @@ -70,9 +70,9 @@ try { "βœ… New '$path' created (from data/templates/New.md)." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/new-power-plan.md b/docs/new-power-plan.md index f1091acd..bc677963 100644 --- a/docs/new-power-plan.md +++ b/docs/new-power-plan.md @@ -36,4 +36,4 @@ powercfg -setactive $newGuid Write-Output "New power plan created with GUID: $newGuid and set as active." ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/new-powershell-script.md b/docs/new-powershell-script.md index 6cc2d5d0..eddb1b73 100644 --- a/docs/new-powershell-script.md +++ b/docs/new-powershell-script.md @@ -70,9 +70,9 @@ try { "βœ… New '$path' created (from data/templates/New.ps1)." exit 0 # success } catch { - "⚠️ Error: $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/new-qrcode.md b/docs/new-qrcode.md index 2ae86de8..11449123 100644 --- a/docs/new-qrcode.md +++ b/docs/new-qrcode.md @@ -113,4 +113,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/new-reboot-task.md b/docs/new-reboot-task.md index 86d13afd..e5c5a6d8 100644 --- a/docs/new-reboot-task.md +++ b/docs/new-reboot-task.md @@ -134,4 +134,4 @@ Else If ((Get-ScheduledTask -TaskName $Taskname).State -eq "Disabled") {Enable-ScheduledTask -TaskName $TaskName} ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/new-shortcut.md b/docs/new-shortcut.md index b4a956d1..2b4652e6 100644 --- a/docs/new-shortcut.md +++ b/docs/new-shortcut.md @@ -103,4 +103,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/new-ssh-key.md b/docs/new-ssh-key.md index cc11d40c..2d43a13a 100644 --- a/docs/new-ssh-key.md +++ b/docs/new-ssh-key.md @@ -70,4 +70,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/new-symlink.md b/docs/new-symlink.md index 5b2abc3b..c3fc3e95 100644 --- a/docs/new-symlink.md +++ b/docs/new-symlink.md @@ -82,9 +82,9 @@ try { "βœ… Created new symlink '$symlink' linking to: $target" exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/new-tab.md b/docs/new-tab.md index c4bc1888..76bb4aad 100644 --- a/docs/new-tab.md +++ b/docs/new-tab.md @@ -58,4 +58,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/new-tag.md b/docs/new-tag.md index 2767f04a..f1c35ae6 100644 --- a/docs/new-tag.md +++ b/docs/new-tag.md @@ -95,12 +95,12 @@ try { if ($lastExitCode -ne 0) { throw "Error: 'git push origin $TagName' failed!" } [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds - "βœ… created new tag '$TagName' in $Elapsed sec" + "βœ… Created new tag '$TagName' in $Elapsed sec" exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/new-text-file.md b/docs/new-text-file.md index b7867e6a..2246c0e1 100644 --- a/docs/new-text-file.md +++ b/docs/new-text-file.md @@ -75,4 +75,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/new-user.md b/docs/new-user.md index ef1cd96c..d9e3dab4 100644 --- a/docs/new-user.md +++ b/docs/new-user.md @@ -72,9 +72,9 @@ try { "βœ… Created user account '$username' with encrypted home directory in $($elapsed)s." exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/new-windows-vm.md b/docs/new-windows-vm.md index d266f7b9..fbea05cb 100644 --- a/docs/new-windows-vm.md +++ b/docs/new-windows-vm.md @@ -37,4 +37,4 @@ $VMName = "windows" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/on-desktop-login.md b/docs/on-desktop-login.md index 83e240b6..c9b6015e 100644 --- a/docs/on-desktop-login.md +++ b/docs/on-desktop-login.md @@ -73,4 +73,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-URL.md b/docs/open-URL.md index 77890b5b..d80a27fd 100644 --- a/docs/open-URL.md +++ b/docs/open-URL.md @@ -68,24 +68,27 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$URL = "", [string]$text = "") try { if ($URL -eq "") { $URL = Read-Host "Enter the URL" } - if ($text -ne "") { + if ($IsLinux -or $IsMacOS) { Write-Host $text -noNewline - Write-Host $URL -foregroundColor blue - } - if ($IsLinux) { + Write-Host $URL -foregroundColor blue -noNewline + Write-Host " (open link with: )" } else { Start-Process $URL + Write-Host "βœ… Launched Web browser with $text" -noNewline + Write-Host $URL -foregroundColor blue } exit 0 # success } catch { - "⚠️ Error: $($Error[0]) (script line $($_.InvocationInfo.ScriptLineNumber))" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-apps-folder.md b/docs/open-apps-folder.md index faa047a9..ee175630 100644 --- a/docs/open-apps-folder.md +++ b/docs/open-apps-folder.md @@ -44,9 +44,11 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-file-explorer.ps1" "shell:AppsFolder" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-auto-start-folder.md b/docs/open-auto-start-folder.md index 91fbf123..bfe5babd 100644 --- a/docs/open-auto-start-folder.md +++ b/docs/open-auto-start-folder.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $TargetDir = resolve-path "$HOME/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup" if (-not(test-path "$TargetDir" -pathType container)) { @@ -57,4 +59,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-bing-maps.md b/docs/open-bing-maps.md index 221ae1f0..e2370872 100644 --- a/docs/open-bing-maps.md +++ b/docs/open-bing-maps.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { start-process bingmaps: exit 0 # success @@ -53,4 +55,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-booking-com.md b/docs/open-booking-com.md index 3bbd49a5..e28f57b1 100644 --- a/docs/open-booking-com.md +++ b/docs/open-booking-com.md @@ -44,8 +44,10 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://www.booking.com" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-c-drive.md b/docs/open-c-drive.md index 3250a13a..0fbcdbbe 100644 --- a/docs/open-c-drive.md +++ b/docs/open-c-drive.md @@ -44,8 +44,10 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-file-explorer.ps1" "C:" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-calculator.md b/docs/open-calculator.md index c8284b2a..9ad60059 100644 --- a/docs/open-calculator.md +++ b/docs/open-calculator.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { Start-Process ms-calculator: exit 0 # success @@ -53,4 +55,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-chrome.md b/docs/open-chrome.md index 2b770c6d..92883862 100644 --- a/docs/open-chrome.md +++ b/docs/open-chrome.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$URL = "http://www.fleschutz.de") try { @@ -67,4 +69,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-clock.md b/docs/open-clock.md index 78e7989e..e44a4e0e 100644 --- a/docs/open-clock.md +++ b/docs/open-clock.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { Start-Process ms-clock: exit 0 # success @@ -53,4 +55,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-cortana.md b/docs/open-cortana.md index afc8e2c7..1e3953bc 100644 --- a/docs/open-cortana.md +++ b/docs/open-cortana.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { Start-Process ms-cortana2: exit 0 # success @@ -53,4 +55,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-d-drive.md b/docs/open-d-drive.md index 89354839..cd86db55 100644 --- a/docs/open-d-drive.md +++ b/docs/open-d-drive.md @@ -44,7 +44,9 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-file-explorer.ps1" "D:" ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-dashboards.md b/docs/open-dashboards.md index 85370446..d6527887 100644 --- a/docs/open-dashboards.md +++ b/docs/open-dashboards.md @@ -27,9 +27,8 @@ Example ------- ```powershell PS> ./open-dashboards.ps1 -βœ… Launching Web browser with 24 tabs: Toggl Trackβ€’Google Calendarβ€’Google Mail, ... +⏳ Launching Web browser with 24 tabs: Toggl Track,Google Calendar,Google Mail,... NOTE: Execute './switch-tabs.ps1' to switch from tab to tab automatically. -... ``` @@ -53,25 +52,27 @@ Script Content Specifies the time interval between each tab (110ms per default) .EXAMPLE PS> ./open-dashboards.ps1 - βœ… Launching Web browser with 24 tabs: Toggl Trackβ€’Google Calendarβ€’Google Mail, ... + ⏳ Launching Web browser with 24 tabs: Toggl Track,Google Calendar,Google Mail,... NOTE: Execute './switch-tabs.ps1' to switch from tab to tab automatically. - ... .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([int]$timeInterval = 120) # milliseconds try { Write-Progress "Reading Data/popular-dashboards.csv..." $table = Import-CSV "$PSScriptRoot/../data/popular-dashboards.csv" + $numRows = $table.Count Write-Progress -completed "Done." - Write-Host "βœ… Launching Web browser with $($table.Count) tabs: " -noNewline + Write-Host "⏳ Launching Web browser with $numRows tabs: " -noNewline foreach($row in $table) { - Write-Host "$($row.NAME)β€’" -noNewline + Write-Host "$($row.NAME)," -noNewline & "$PSScriptRoot/open-default-browser.ps1" "$($row.URL)" Start-Sleep -milliseconds $timeInterval } @@ -79,9 +80,9 @@ try { Write-Host "NOTE: Execute './switch-tabs.ps1' to switch from tab to tab automatically." exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-deep-l-translator.md b/docs/open-deep-l-translator.md index 2ee55633..8eb62f58 100644 --- a/docs/open-deep-l-translator.md +++ b/docs/open-deep-l-translator.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-deep-l-translator +PS> ./open-deep-l-translator.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This PowerShell script launches the Web browser with the DeepL Translator website. .EXAMPLE - PS> ./open-deep-l-translator + PS> ./open-deep-l-translator.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://www.deepl.com/translator" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-default-browser.md b/docs/open-default-browser.md index c4afa013..b876993f 100644 --- a/docs/open-default-browser.md +++ b/docs/open-default-browser.md @@ -13,7 +13,7 @@ Parameters Required? false Position? 1 - Default value http://www.fleschutz.de + Default value https://www.fleschutz.de Accept pipeline input? false Aliases Accept wildcard characters? false @@ -26,7 +26,7 @@ Parameters Example ------- ```powershell -PS> ./open-default-browser +PS> ./open-default-browser.ps1 ``` @@ -49,22 +49,24 @@ Script Content .PARAMETER URL Specifies the URL .EXAMPLE - PS> ./open-default-browser + PS> ./open-default-browser.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$URL = "http://www.fleschutz.de") +#requires -version 5.1 + +param([string]$URL = "https://www.fleschutz.de") try { Start-Process $URL exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0])" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-desktop-folder.md b/docs/open-desktop-folder.md index b9aaf9ca..df083e46 100644 --- a/docs/open-desktop-folder.md +++ b/docs/open-desktop-folder.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-desktop-folder +PS> ./open-desktop-folder.ps1 ``` @@ -37,13 +37,15 @@ Script Content .DESCRIPTION This PowerShell script launches the File Explorer with the user's desktop folder. .EXAMPLE - PS> ./open-desktop-folder + PS> ./open-desktop-folder.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $TargetDir = resolve-path "$HOME/Desktop" if (-not(test-path "$TargetDir" -pathType container)) { @@ -57,4 +59,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-documents-folder.md b/docs/open-documents-folder.md index 98445e4a..7ffa0a8d 100644 --- a/docs/open-documents-folder.md +++ b/docs/open-documents-folder.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-documents-folder +PS> ./open-documents-folder.ps1 ``` @@ -37,13 +37,15 @@ Script Content .DESCRIPTION This PowerShell script launches the File Explorer with the user's documents folder. .EXAMPLE - PS> ./open-documents-folder + PS> ./open-documents-folder.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $TargetDir = resolve-path "$HOME/Documents" if (-not(test-path "$TargetDir" -pathType container)) { @@ -57,4 +59,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-downloads-folder.md b/docs/open-downloads-folder.md index 2d223143..23f85679 100644 --- a/docs/open-downloads-folder.md +++ b/docs/open-downloads-folder.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { if ($IsLinux) { $Path = Resolve-Path "$HOME/Downloads" @@ -61,4 +63,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-dropbox-folder.md b/docs/open-dropbox-folder.md index d60f8af3..c9d9692c 100644 --- a/docs/open-dropbox-folder.md +++ b/docs/open-dropbox-folder.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $TargetDirs = resolve-path "$HOME/Dropbox*" foreach($TargetDir in $TargetDirs) { @@ -57,4 +59,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-duck-duck-go.md b/docs/open-duck-duck-go.md index 116ede0a..71867f69 100644 --- a/docs/open-duck-duck-go.md +++ b/docs/open-duck-duck-go.md @@ -44,8 +44,10 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://duckduckgo.com" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-e-drive.md b/docs/open-e-drive.md index f454eefa..e2bf1a77 100644 --- a/docs/open-e-drive.md +++ b/docs/open-e-drive.md @@ -44,7 +44,9 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-file-explorer.ps1" "E:" ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-edge.md b/docs/open-edge.md index c0f41b43..eeda799a 100644 --- a/docs/open-edge.md +++ b/docs/open-edge.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-edge +PS> ./open-edge.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This PowerShell script launches the Microsoft Edge Web browser. .EXAMPLE - PS> ./open-edge + PS> ./open-edge.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + Start-Process microsoft-edge:// exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-egg-timer.md b/docs/open-egg-timer.md index ac3cf51f..8ca6671a 100644 --- a/docs/open-egg-timer.md +++ b/docs/open-egg-timer.md @@ -44,8 +44,10 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://e.ggtimer.com" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-email-client.md b/docs/open-email-client.md index 7d5c651a..ec3779f0 100644 --- a/docs/open-email-client.md +++ b/docs/open-email-client.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { start-process "mailto:markus@fleschutz.de" exit 0 # success @@ -53,4 +55,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-f-drive.md b/docs/open-f-drive.md index bdab61b6..7db0aca9 100644 --- a/docs/open-f-drive.md +++ b/docs/open-f-drive.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-f-drive +PS> ./open-f-drive.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This PowerShell script launches the File Explorer with the F: drive folder. .EXAMPLE - PS> ./open-f-drive + PS> ./open-f-drive.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-file-explorer.ps1" "F:" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-file-explorer.md b/docs/open-file-explorer.md index 3a5fcf0d..4b6bf756 100644 --- a/docs/open-file-explorer.md +++ b/docs/open-file-explorer.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$Path = "") try { @@ -71,4 +73,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-fire-place.md b/docs/open-fire-place.md index 5fe88ad8..c4f99714 100644 --- a/docs/open-fire-place.md +++ b/docs/open-fire-place.md @@ -44,8 +44,10 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://freefireplaces.com" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-firefox.md b/docs/open-firefox.md index bee0653c..6b437b58 100644 --- a/docs/open-firefox.md +++ b/docs/open-firefox.md @@ -13,7 +13,7 @@ Parameters Required? false Position? 1 - Default value http://www.fleschutz.de + Default value https://www.fleschutz.de Accept pipeline input? false Aliases Accept wildcard characters? false @@ -56,7 +56,9 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -param([string]$URL = "http://www.fleschutz.de") +#requires -version 5.1 + +param([string]$URL = "https://www.fleschutz.de") try { $App = Get-AppxPackage -Name Mozilla.FireFox @@ -74,4 +76,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-flight-radar.md b/docs/open-flight-radar.md index 0245965a..67c54b9c 100644 --- a/docs/open-flight-radar.md +++ b/docs/open-flight-radar.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-flight-radar +PS> ./open-flight-radar.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This PowerShell script launches the Web browser with the FlightRadar24 website. .EXAMPLE - PS> ./open-flight-radar + PS> ./open-flight-radar.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://www.flightradar24.com" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-g-drive.md b/docs/open-g-drive.md index 2844d46a..d0ef87b0 100644 --- a/docs/open-g-drive.md +++ b/docs/open-g-drive.md @@ -44,8 +44,10 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-file-explorer.ps1" "G:" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-git-extensions.md b/docs/open-git-extensions.md index 4b5493db..41e40ec6 100644 --- a/docs/open-git-extensions.md +++ b/docs/open-git-extensions.md @@ -1,19 +1,33 @@ The *open-git-extensions.ps1* Script =========================== -open-git-extensions.ps1 - +This PowerShell script launches the Git Extensions application. Parameters ---------- ```powershell - +/Repos/PowerShell/scripts/open-git-extensions.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. ``` +Example +------- +```powershell +PS> ./open-git-extensions + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + Script Content -------------- ```powershell @@ -30,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + function TryToExec { param($Folder, $Binary) if (test-path "$Folder/$Binary" -pathType leaf) { start-process "$Folder/$Binary" -WorkingDirectory "$Folder" @@ -48,4 +64,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-google-books.md b/docs/open-google-books.md index 7d5ee6a9..f24d6c95 100644 --- a/docs/open-google-books.md +++ b/docs/open-google-books.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-google-books +PS> ./open-google-books.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This PowerShell script launches the Web browser with the Google Books website. .EXAMPLE - PS> ./open-google-books + PS> ./open-google-books.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://books.google.com" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-google-calendar.md b/docs/open-google-calendar.md index 099b4057..5b9bd1d4 100644 --- a/docs/open-google-calendar.md +++ b/docs/open-google-calendar.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-google-calendar +PS> ./open-google-calendar.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This PowerShell script launches the Web browser with the Google Calendar website. .EXAMPLE - PS> ./open-google-calendar + PS> ./open-google-calendar.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://calendar.google.com" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-google-contacts.md b/docs/open-google-contacts.md index 5b951081..af2bd9db 100644 --- a/docs/open-google-contacts.md +++ b/docs/open-google-contacts.md @@ -44,8 +44,10 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://contacts.google.com" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-google-docs.md b/docs/open-google-docs.md index 75e564d6..de1a1bf8 100644 --- a/docs/open-google-docs.md +++ b/docs/open-google-docs.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-google-docs +PS> ./open-google-docs.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This PowerShell script launches the Web browser with the Google Docs website. .EXAMPLE - PS> ./open-google-docs + PS> ./open-google-docs.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://docs.google.com" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-google-earth.md b/docs/open-google-earth.md index 15f1c852..75b312d0 100644 --- a/docs/open-google-earth.md +++ b/docs/open-google-earth.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-google-earth +PS> ./open-google-earth.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This PowerShell script launches the Web browser with the Google Earth website. .EXAMPLE - PS> ./open-google-earth + PS> ./open-google-earth.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://earth.google.com/web/" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-google-mail.md b/docs/open-google-mail.md index 526251e1..db00780d 100644 --- a/docs/open-google-mail.md +++ b/docs/open-google-mail.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-google-mail +PS> ./open-google-mail.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This PowerShell script launches the Web browser with the Google Mail website. .EXAMPLE - PS> ./open-google-mail + PS> ./open-google-mail.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://mail.google.com" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-google-maps.md b/docs/open-google-maps.md index e3829a22..44c2d7d4 100644 --- a/docs/open-google-maps.md +++ b/docs/open-google-maps.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-google-maps +PS> ./open-google-maps.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This PowerShell script launches the Web browser with the Google Maps website. .EXAMPLE - PS> ./open-google-maps + PS> ./open-google-maps.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://www.google.com/maps" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-google-news.md b/docs/open-google-news.md index dfc1e6fe..9a3878a2 100644 --- a/docs/open-google-news.md +++ b/docs/open-google-news.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-google-news +PS> ./open-google-news.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This PowerShell script launches the Web browser with the Google News website. .EXAMPLE - PS> ./open-google-news + PS> ./open-google-news.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://news.google.com" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-google-photos.md b/docs/open-google-photos.md index 7cd22137..9ef245a2 100644 --- a/docs/open-google-photos.md +++ b/docs/open-google-photos.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-google-photos +PS> ./open-google-photos.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This PowerShell script launches the Web browser with the Google Photos website. .EXAMPLE - PS> ./open-google-photos + PS> ./open-google-photos.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://photos.google.com" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-google-play.md b/docs/open-google-play.md index c749a0ee..5f352c36 100644 --- a/docs/open-google-play.md +++ b/docs/open-google-play.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-google-play +PS> ./open-google-play.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This PowerShell script launches the Web browser with the Google Play website. .EXAMPLE - PS> ./open-google-play + PS> ./open-google-play.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://play.google.com/store" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-google-search.md b/docs/open-google-search.md index d3ca21de..3f37d1ed 100644 --- a/docs/open-google-search.md +++ b/docs/open-google-search.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-google-search +PS> ./open-google-search.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This PowerShell script launches the Web browser with the Google Search website. .EXAMPLE - PS> ./open-google-search + PS> ./open-google-search.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://google.com" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-google-stadia.md b/docs/open-google-stadia.md index baaf14f4..fdc04bad 100644 --- a/docs/open-google-stadia.md +++ b/docs/open-google-stadia.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-google-stadia +PS> ./open-google-stadia.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This PowerShell script launches the Web browser with the Google Stadia website. .EXAMPLE - PS> ./open-google-stadia + PS> ./open-google-stadia.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://stadia.google.com" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-google-translate.md b/docs/open-google-translate.md index a8e6a5c9..af904b40 100644 --- a/docs/open-google-translate.md +++ b/docs/open-google-translate.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-google-translate +PS> ./open-google-translate.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This PowerShell script launches the Web browser with the Google Translate website. .EXAMPLE - PS> ./open-google-translate + PS> ./open-google-translate.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://translate.google.com" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-home-folder.md b/docs/open-home-folder.md index 1d051f99..b8524a91 100644 --- a/docs/open-home-folder.md +++ b/docs/open-home-folder.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-home-folder +PS> ./open-home-folder.ps1 ``` @@ -37,13 +37,15 @@ Script Content .DESCRIPTION This script launches the File Explorer with the user's home folder. .EXAMPLE - PS> ./open-home-folder + PS> ./open-home-folder.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $TargetDir = resolve-path "$HOME" if (-not(test-path "$TargetDir" -pathType container)) { @@ -57,4 +59,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-internet-archive.md b/docs/open-internet-archive.md index d7571acb..8da651ab 100644 --- a/docs/open-internet-archive.md +++ b/docs/open-internet-archive.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-internet-archive +PS> ./open-internet-archive.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This script launches the Web browser with the Internet Archive website. .EXAMPLE - PS> ./open-internet-archive + PS> ./open-internet-archive.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://archive.org" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-jitsi-meet.md b/docs/open-jitsi-meet.md index 14e73274..60d7476c 100644 --- a/docs/open-jitsi-meet.md +++ b/docs/open-jitsi-meet.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-jitsi-meet +PS> ./open-jitsi-meet.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This script launches the Web browser with the Jitsi Meet website. .EXAMPLE - PS> ./open-jitsi-meet + PS> ./open-jitsi-meet.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://meet.jit.si/" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-m-drive.md b/docs/open-m-drive.md index 59544292..962e1d65 100644 --- a/docs/open-m-drive.md +++ b/docs/open-m-drive.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-m-drive +PS> ./open-m-drive.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This script launches the File Explorer with the M: drive folder. .EXAMPLE - PS> ./open-m-drive + PS> ./open-m-drive.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-file-explorer.ps1" "M:" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-magnifier.md b/docs/open-magnifier.md index 85181a05..839df1bc 100644 --- a/docs/open-magnifier.md +++ b/docs/open-magnifier.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-magnifier +PS> ./open-magnifier.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This script launches the Windows Screen Magnifier application. .EXAMPLE - PS> ./open-magnifier + PS> ./open-magnifier.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { - start-process magnify.exe + Start-Process magnify.exe exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -53,4 +55,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-microsoft-paint.md b/docs/open-microsoft-paint.md index af510ece..5bc7d2b2 100644 --- a/docs/open-microsoft-paint.md +++ b/docs/open-microsoft-paint.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-microsoft-paint +PS> ./open-microsoft-paint.ps1 ``` @@ -37,13 +37,15 @@ Script Content .DESCRIPTION This script launches the Microsoft Paint application. .EXAMPLE - PS> ./open-microsoft-paint + PS> ./open-microsoft-paint.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { start-process mspaint.exe exit 0 # success @@ -53,4 +55,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-microsoft-solitaire.md b/docs/open-microsoft-solitaire.md index 2670d4c2..bd7d23a8 100644 --- a/docs/open-microsoft-solitaire.md +++ b/docs/open-microsoft-solitaire.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-microsoft-solitaire +PS> ./open-microsoft-solitaire.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This script launches the Microsoft Solitaire application. .EXAMPLE - PS> ./open-microsoft-solitaire + PS> ./open-microsoft-solitaire.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + Start-Process xboxliveapp-1297287741: exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-microsoft-store.md b/docs/open-microsoft-store.md index e88c30dd..f0b24a22 100644 --- a/docs/open-microsoft-store.md +++ b/docs/open-microsoft-store.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-microsoft-store +PS> ./open-microsoft-store.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This script launches the Microsoft Store application. .EXAMPLE - PS> ./open-microsoft-store + PS> ./open-microsoft-store.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + Start-Process ms-windows-store: exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-microsoft-teams.md b/docs/open-microsoft-teams.md index 78858352..5cc44486 100644 --- a/docs/open-microsoft-teams.md +++ b/docs/open-microsoft-teams.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-microsoft-teams +PS> ./open-microsoft-teams.ps1 ``` @@ -37,13 +37,15 @@ Script Content .DESCRIPTION This script launches the Microsoft Teams application. .EXAMPLE - PS> ./open-microsoft-teams + PS> ./open-microsoft-teams.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { Start-Process msteams: exit 0 # success @@ -53,4 +55,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-music-folder.md b/docs/open-music-folder.md index 3cb33a09..c7c051fa 100644 --- a/docs/open-music-folder.md +++ b/docs/open-music-folder.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-music-folder +PS> ./open-music-folder.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This script launches the File Explorer with the user's music folder. .EXAMPLE - PS> ./open-music-folder + PS> ./open-music-folder.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { - $TargetDir = resolve-path "$HOME/Music" + $TargetDir = Resolve-Path "$HOME/Music" if (-not(test-path "$TargetDir" -pathType container)) { throw "Music folder at πŸ“‚$TargetDir doesn't exist (yet)" } @@ -57,4 +59,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-netflix.md b/docs/open-netflix.md index 3c83216e..1e324d06 100644 --- a/docs/open-netflix.md +++ b/docs/open-netflix.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-netflix +PS> ./open-netflix.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This script launches the Netflix application. .EXAMPLE - PS> ./open-netflix + PS> ./open-netflix.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + Start-Process netflix: exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-notepad.md b/docs/open-notepad.md index ceeacf4d..d449fb45 100644 --- a/docs/open-notepad.md +++ b/docs/open-notepad.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { Start-Process notepad.exe exit 0 # success @@ -53,4 +55,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-obs-studio.md b/docs/open-obs-studio.md index c747522a..ca07a627 100644 --- a/docs/open-obs-studio.md +++ b/docs/open-obs-studio.md @@ -1,19 +1,33 @@ The *open-obs-studio.ps1* Script =========================== -open-obs-studio.ps1 - +This script launches the OBS Studio application. Parameters ---------- ```powershell - +/Repos/PowerShell/scripts/open-obs-studio.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. ``` +Example +------- +```powershell +PS> ./open-obs-studio.ps1 + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + Script Content -------------- ```powershell @@ -23,13 +37,15 @@ Script Content .DESCRIPTION This script launches the OBS Studio application. .EXAMPLE - PS> ./open-obs-studio + PS> ./open-obs-studio.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + function TryLaunching { param([string]$Path, [string]$Dir) if (test-path "$Path" -pathType leaf) { start-process -FilePath "$Path" -WorkingDirectory "$Dir" @@ -47,4 +63,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-office-365.md b/docs/open-office-365.md index 37934f90..2f65ea3d 100644 --- a/docs/open-office-365.md +++ b/docs/open-office-365.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-office-365 +PS> ./open-office-365.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This script launches the Web browser with the Microsoft Office 365 website. .EXAMPLE - PS> ./open-office-365 + PS> ./open-office-365.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://portal.office.com" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-one-drive-folder.md b/docs/open-one-drive-folder.md index bf80e169..65d8ec56 100644 --- a/docs/open-one-drive-folder.md +++ b/docs/open-one-drive-folder.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-one-drive-folder +PS> ./open-one-drive-folder.ps1 ``` @@ -37,13 +37,15 @@ Script Content .DESCRIPTION This script launches the File Explorer with the user's OneDrive folder. .EXAMPLE - PS> ./open-one-drive-folder + PS> ./open-one-drive-folder.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $TargetDirs = resolve-path "$HOME/OneDrive*" foreach($TargetDir in $TargetDirs) { @@ -57,4 +59,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-outlook.md b/docs/open-outlook.md index b4bdbac6..a3371d17 100644 --- a/docs/open-outlook.md +++ b/docs/open-outlook.md @@ -1,19 +1,33 @@ The *open-outlook.ps1* Script =========================== -open-outlook.ps1 - +This script launches the Microsoft Outlook email application. Parameters ---------- ```powershell - +/Repos/PowerShell/scripts/open-outlook.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. ``` +Example +------- +```powershell +PS> ./open-outlook.ps1 + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + Script Content -------------- ```powershell @@ -23,13 +37,15 @@ Script Content .DESCRIPTION This script launches the Microsoft Outlook email application. .EXAMPLE - PS> ./open-outlook + PS> ./open-outlook.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + function TryToExec { param($Folder, $Binary) if (test-path "$Folder/$Binary" -pathType leaf) { start-process "$Folder/$Binary" -WorkingDirectory "$Folder" @@ -47,4 +63,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-paint-three-d.md b/docs/open-paint-three-d.md index 3feb81d0..b7d5d64b 100644 --- a/docs/open-paint-three-d.md +++ b/docs/open-paint-three-d.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-paint-3d +PS> ./open-paint-3d.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This script launches the Paint 3D application. .EXAMPLE - PS> ./open-paint-3d + PS> ./open-paint-3d.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { - start-process ms-paint: + Start-Process ms-paint: exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -53,4 +55,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:24)* diff --git a/docs/open-pictures-folder.md b/docs/open-pictures-folder.md index 934021a4..d2590701 100644 --- a/docs/open-pictures-folder.md +++ b/docs/open-pictures-folder.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-pictures-folder +PS> ./open-pictures-folder.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This script launches the File Explorer with the user's pictures folder. .EXAMPLE - PS> ./open-pictures-folder + PS> ./open-pictures-folder.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { - $TargetDir = resolve-path "$HOME/Pictures" + $TargetDir = Resolve-Path "$HOME/Pictures" if (-not(test-path "$TargetDir" -pathType container)) { throw "Pictures folder at πŸ“‚$TargetDir doesn't exist (yet)" } @@ -57,4 +59,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-rdp.md b/docs/open-rdp.md index 1b3925a5..83dfacbf 100644 --- a/docs/open-rdp.md +++ b/docs/open-rdp.md @@ -55,14 +55,16 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$hostname = "") if ($hostname -eq "") { - & Start-Process "$env:windir\system32\mstsc.exe" + & Start-Process "$env:WINDIR\system32\mstsc.exe" } else { - & Start-Process "$env:windir\system32\mstsc.exe" -ArgumentList "/v:$hostname" + & Start-Process "$env:WINDIR\system32\mstsc.exe" -ArgumentList "/v:$hostname" } exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-recycle-bin-folder.md b/docs/open-recycle-bin-folder.md index 9c785bde..5a7237bc 100644 --- a/docs/open-recycle-bin-folder.md +++ b/docs/open-recycle-bin-folder.md @@ -44,8 +44,10 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { - start shell:recyclebinfolder + Start shell:recyclebinfolder exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -53,4 +55,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-remote-desktop.md b/docs/open-remote-desktop.md index 4177e4db..7d2eddcf 100644 --- a/docs/open-remote-desktop.md +++ b/docs/open-remote-desktop.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-remote-desktop +PS> ./open-remote-desktop.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This script launches the Remote Desktop application. .EXAMPLE - PS> ./open-remote-desktop + PS> ./open-remote-desktop.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { - start-process ms-rd: + Start-Process ms-rd: exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -53,4 +55,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-repos-folder.md b/docs/open-repos-folder.md index 8b1b9d76..dc6def16 100644 --- a/docs/open-repos-folder.md +++ b/docs/open-repos-folder.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-repos-folder +PS> ./open-repos-folder.ps1 ``` @@ -37,13 +37,15 @@ Script Content .DESCRIPTION This script launches the File Explorer with the user's Git repositories folder. .EXAMPLE - PS> ./open-repos-folder + PS> ./open-repos-folder.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $TargetDir = Resolve-Path "$HOME/Repos" if (-not(Test-Path "$TargetDir" -pathType container)) { @@ -57,4 +59,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-screen-clip.md b/docs/open-screen-clip.md index a217fb9f..18f1d7b7 100644 --- a/docs/open-screen-clip.md +++ b/docs/open-screen-clip.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-screen-clip +PS> ./open-screen-clip.ps1 ``` @@ -37,13 +37,15 @@ Script Content .DESCRIPTION This script launches the Screen Clip application. .EXAMPLE - PS> ./open-screen-clip + PS> ./open-screen-clip.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { Start-Process ms-screenclip: exit 0 # success @@ -53,4 +55,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-screen-sketch.md b/docs/open-screen-sketch.md index 730a88e9..c9e4db73 100644 --- a/docs/open-screen-sketch.md +++ b/docs/open-screen-sketch.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-screen-sketch +PS> ./open-screen-sketch.ps1 ``` @@ -37,13 +37,15 @@ Script Content .DESCRIPTION This script launches the Screen Sketch application. .EXAMPLE - PS> ./open-screen-sketch + PS> ./open-screen-sketch.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { Start-Process ms-screensketch: exit 0 # success @@ -53,4 +55,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-skype.md b/docs/open-skype.md index b1dffb16..c1abc3e0 100644 --- a/docs/open-skype.md +++ b/docs/open-skype.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-skype +PS> ./open-skype.ps1 ``` @@ -37,13 +37,15 @@ Script Content .DESCRIPTION This script launches the Skype application. .EXAMPLE - PS> ./open-skype + PS> ./open-skype.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { Start-Process skype: exit 0 # success @@ -53,4 +55,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-snipping-tool.md b/docs/open-snipping-tool.md index 53dd02af..e5feed5a 100644 --- a/docs/open-snipping-tool.md +++ b/docs/open-snipping-tool.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-snipping-tool +PS> ./open-snipping-tool.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This script launches the Snipping Tool application. .EXAMPLE - PS> ./open-snipping-tool + PS> ./open-snipping-tool.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + Start-Process SnippingTool.exe exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-speed-test.md b/docs/open-speed-test.md index 72cdddf0..330aab15 100644 --- a/docs/open-speed-test.md +++ b/docs/open-speed-test.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-speed-test +PS> ./open-speed-test.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This script launches the Web browser with Cloudflare's speed test website. .EXAMPLE - PS> ./open-speed-test + PS> ./open-speed-test.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://speed.cloudflare.com" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-spotify.md b/docs/open-spotify.md index e9f728c2..6fd468af 100644 --- a/docs/open-spotify.md +++ b/docs/open-spotify.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-spotify +PS> ./open-spotify.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This script launches the Spotify application. .EXAMPLE - PS> ./open-spotify + PS> ./open-spotify.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + Start-Process spotify: exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-stack-overflow.md b/docs/open-stack-overflow.md index 72f9bcf7..11b687f0 100644 --- a/docs/open-stack-overflow.md +++ b/docs/open-stack-overflow.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-stack-overflow +PS> ./open-stack-overflow.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This script launches the Web browser with the Stack Overflow website. .EXAMPLE - PS> ./open-stack-overflow + PS> ./open-stack-overflow.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://stackoverflow.com" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-start-page.md b/docs/open-start-page.md index 2ac7e8a1..169e219c 100644 --- a/docs/open-start-page.md +++ b/docs/open-start-page.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-start-page +PS> ./open-start-page.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This script launches the Web browser with the Startpage website. .EXAMPLE - PS> ./open-start-page + PS> ./open-start-page.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://www.startpage.com" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-street-map.md b/docs/open-street-map.md index cb52daf5..7de830d2 100644 --- a/docs/open-street-map.md +++ b/docs/open-street-map.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-street-map +PS> ./open-street-map.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This script launches the Web browser with the OpenStreetMap website. .EXAMPLE - PS> ./open-street-map + PS> ./open-street-map.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + & "$PSScriptRoot/open-default-browser.ps1" "https://www.openstreetmap.org" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-task-manager.md b/docs/open-task-manager.md index 4af3eda8..0b5548f8 100644 --- a/docs/open-task-manager.md +++ b/docs/open-task-manager.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-task-manager +PS> ./open-task-manager.ps1 ``` @@ -37,13 +37,15 @@ Script Content .DESCRIPTION This script launches the Windows Task Manager application. .EXAMPLE - PS> ./open-task-manager + PS> ./open-task-manager.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { Start-Process taskmgr.exe exit 0 # success @@ -53,4 +55,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-temporary-folder.md b/docs/open-temporary-folder.md index 8f1ed029..27498d35 100644 --- a/docs/open-temporary-folder.md +++ b/docs/open-temporary-folder.md @@ -1,19 +1,33 @@ The *open-temporary-folder.ps1* Script =========================== -open-temporary-folder.ps1 - +This script launches the File Explorer showing the temporary folder. Parameters ---------- ```powershell - +/Repos/PowerShell/scripts/open-temporary-folder.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. ``` +Example +------- +```powershell +PS> ./open-temporary-folder.ps1 + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + Script Content -------------- ```powershell @@ -23,13 +37,15 @@ Script Content .DESCRIPTION This script launches the File Explorer showing the temporary folder. .EXAMPLE - PS> ./open-temporary-folder + PS> ./open-temporary-folder.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + function GetTempDir { if ("$env:TEMP" -ne "") { return "$env:TEMP" } if ("$env:TMP" -ne "") { return "$env:TMP" } @@ -50,4 +66,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-three-d-viewer.md b/docs/open-three-d-viewer.md index f214c0ff..48dc82fc 100644 --- a/docs/open-three-d-viewer.md +++ b/docs/open-three-d-viewer.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-three-d-viewer +PS> ./open-three-d-viewer.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This script launches the 3D-Viewer application. .EXAMPLE - PS> ./open-three-d-viewer + PS> ./open-three-d-viewer.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + Start-Process com.microsoft.3dviewer: exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:39)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-thunderbird.md b/docs/open-thunderbird.md index 3a5f526c..1b04bab6 100644 --- a/docs/open-thunderbird.md +++ b/docs/open-thunderbird.md @@ -1,19 +1,33 @@ The *open-thunderbird.ps1* Script =========================== -open-thunderbird.ps1 - +This script launches the Mozilla Thunderbird email application. Parameters ---------- ```powershell - +/Repos/PowerShell/scripts/open-thunderbird.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. ``` +Example +------- +```powershell +PS> ./open-thunderbird.ps1 + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + Script Content -------------- ```powershell @@ -23,13 +37,15 @@ Script Content .DESCRIPTION This script launches the Mozilla Thunderbird email application. .EXAMPLE - PS> ./open-thunderbird + PS> ./open-thunderbird.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + function TryToExec { param($Folder, $Binary) if (test-path "$Folder/$Binary" -pathType leaf) { start-process "$Folder/$Binary" -WorkingDirectory "$Folder" @@ -45,4 +61,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-videos-folders.md b/docs/open-videos-folders.md index d5b231bd..ca43226f 100644 --- a/docs/open-videos-folders.md +++ b/docs/open-videos-folders.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-videos-folder +PS> ./open-videos-folder.ps1 ``` @@ -37,13 +37,15 @@ Script Content .DESCRIPTION This script launches the File Explorer with the user's videos folder. .EXAMPLE - PS> ./open-videos-folder + PS> ./open-videos-folder.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { $TargetDir = Resolve-Path "$HOME/Videos" if (-not(Test-Path "$TargetDir" -pathType container)) { @@ -57,4 +59,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-visual-studio.md b/docs/open-visual-studio.md index 49085024..24b39d01 100644 --- a/docs/open-visual-studio.md +++ b/docs/open-visual-studio.md @@ -1,19 +1,33 @@ The *open-visual-studio.ps1* Script =========================== -open-visual-studio.ps1 - +This PowerShell script launches the Microsoft Visual Studio application. Parameters ---------- ```powershell - +/Repos/PowerShell/scripts/open-visual-studio.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. ``` +Example +------- +```powershell +PS> ./open-visual-studio.ps1 + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + Script Content -------------- ```powershell @@ -30,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + function tryToLaunch { param($filePath) if (Test-Path "$filePath" -pathType leaf) { Start-Process "$filePath" @@ -47,4 +63,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-voice-recorder.md b/docs/open-voice-recorder.md index a57191b0..f77633f5 100644 --- a/docs/open-voice-recorder.md +++ b/docs/open-voice-recorder.md @@ -44,6 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + try { Start-Process explorer.exe shell:appsFolder\Microsoft.WindowsSoundRecorder_8wekyb3d8bbwe!App exit 0 # success @@ -53,4 +55,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-vpn-settings.md b/docs/open-vpn-settings.md index 19e7d958..9528411a 100644 --- a/docs/open-vpn-settings.md +++ b/docs/open-vpn-settings.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-vpn-settings +PS> ./open-vpn-settings.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This PowerShell script launches the VPN settings of Windows. .EXAMPLE - PS> ./open-vpn-settings + PS> ./open-vpn-settings.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + Start-Process ms-settings:network-vpn exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-windows-defender.md b/docs/open-windows-defender.md index 716d3309..a864b601 100644 --- a/docs/open-windows-defender.md +++ b/docs/open-windows-defender.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-windows-defender +PS> ./open-windows-defender.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This script launches the Windows Defender application. .EXAMPLE - PS> ./open-windows-defender + PS> ./open-windows-defender.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + Start-Process windowsdefender: exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-windows-terminal.md b/docs/open-windows-terminal.md index f9974732..1bab2328 100644 --- a/docs/open-windows-terminal.md +++ b/docs/open-windows-terminal.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-windows-terminal +PS> ./open-windows-terminal.ps1 ``` @@ -37,15 +37,17 @@ Script Content .DESCRIPTION This script launches the Windows Terminal application. .EXAMPLE - PS> ./open-windows-terminal + PS> ./open-windows-terminal.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + Start-Process wt.exe exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-windy.md b/docs/open-windy.md index c5a4975d..95de06c7 100644 --- a/docs/open-windy.md +++ b/docs/open-windy.md @@ -1,26 +1,53 @@ -## open-windy.ps1 - Opens windy.com +The *open-windy.ps1* Script +=========================== -This script launches the Web browser with the windy.com website. +This script launches the Web browser with the Windy Weather Radar website. -## Parameters +Parameters +---------- ```powershell -/home/markus/Repos/PowerShell/Scripts/open-windy.ps1 [] +/Repos/PowerShell/scripts/open-windy.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. ``` -## Example +Example +------- ```powershell -PS> ./open-windy +PS> ./open-windy.ps1 ``` -## Notes -Author: Markus Fleschutz Β· License: CC0 +Notes +----- +Author: Markus Fleschutz | License: CC0 -## Related Links +Related Links +------------- https://github.com/fleschutz/PowerShell -*Generated by convert-ps2md.ps1 using the comment-based help of open-windy.ps1* +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Opens the Windy website +.DESCRIPTION + This script launches the Web browser with the Windy Weather Radar website. +.EXAMPLE + PS> ./open-windy.ps1 +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +#requires -version 5.1 + +& "$PSScriptRoot/open-URL.ps1" "https://www.windy.com/-Weather-radar-radar" "Windy Weather Radar: " +exit 0 # success +``` + +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/open-xing.md b/docs/open-xing.md index d73d79ce..0b0bbfe2 100644 --- a/docs/open-xing.md +++ b/docs/open-xing.md @@ -16,7 +16,7 @@ Parameters Example ------- ```powershell -PS> ./open-xing +PS> ./open-xing.ps1 ``` @@ -37,7 +37,7 @@ Script Content .DESCRIPTION This script launches the XING application. .EXAMPLE - PS> ./open-xing + PS> ./open-xing.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -48,4 +48,4 @@ Start-Process xing: exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/pick-commit.md b/docs/pick-commit.md index 3908fc97..6421546f 100644 --- a/docs/pick-commit.md +++ b/docs/pick-commit.md @@ -155,4 +155,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/ping-host.md b/docs/ping-host.md index 992b1665..12771413 100644 --- a/docs/ping-host.md +++ b/docs/ping-host.md @@ -27,7 +27,7 @@ Example ------- ```powershell PS> ./ping-host.ps1 x.com -βœ… 'x.com' is online (20ms to IP 104.244.42.1) +βœ… 'x.com' is online with 20ms ping to it's IP 104.244.42.1 ``` @@ -51,7 +51,7 @@ Script Content Specifies the hostname or IP address to ping (x.com by default) .EXAMPLE PS> ./ping-host.ps1 x.com - βœ… 'x.com' is online (20ms to IP 104.244.42.1) + βœ… 'x.com' is online with 20ms ping to it's IP 104.244.42.1 .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -66,7 +66,7 @@ try { [Threading.Tasks.Task]::WaitAll($tasks) foreach($ping in $tasks.Result) { if ($ping.Status -eq "Success") { - Write-Output "βœ… '$hostname' is online ($($ping.RoundtripTime / 2)ms to IP $($ping.Address))" + Write-Output "βœ… '$hostname' is online with $($ping.RoundtripTime / 2)ms ping to it's IP $($ping.Address)" exit 0 # success } else { Write-Output "⚠️ No reply from '$hostname' (IP $($ping.Address)) - check the connection or maybe the host is down." @@ -81,4 +81,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/ping-internet.md b/docs/ping-internet.md index c4d45d15..d97e0b86 100644 --- a/docs/ping-internet.md +++ b/docs/ping-internet.md @@ -92,4 +92,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/ping-local-devices.md b/docs/ping-local-devices.md index 7aa0b6da..8a64f0d8 100644 --- a/docs/ping-local-devices.md +++ b/docs/ping-local-devices.md @@ -82,4 +82,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/ping-weather.md b/docs/ping-weather.md index 0201c583..7bbc1a45 100644 --- a/docs/ping-weather.md +++ b/docs/ping-weather.md @@ -101,4 +101,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-bee-sound.md b/docs/play-bee-sound.md index 90cc0e2a..3c3b6b48 100644 --- a/docs/play-bee-sound.md +++ b/docs/play-bee-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-beep-sound.md b/docs/play-beep-sound.md index 863e7b22..ef96ed67 100644 --- a/docs/play-beep-sound.md +++ b/docs/play-beep-sound.md @@ -51,4 +51,4 @@ Start-Sleep -milliseconds 300 exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-big-ben.md b/docs/play-big-ben.md index a1002eaa..d39607cb 100644 --- a/docs/play-big-ben.md +++ b/docs/play-big-ben.md @@ -50,4 +50,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-cat-sound.md b/docs/play-cat-sound.md index f978272c..16b52ba0 100644 --- a/docs/play-cat-sound.md +++ b/docs/play-cat-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-chess.md b/docs/play-chess.md index ce7d489a..5cd659f2 100644 --- a/docs/play-chess.md +++ b/docs/play-chess.md @@ -1260,4 +1260,4 @@ while ($Script:gameStatus -eq [gamestatus]::ongoing) { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-cow-sound.md b/docs/play-cow-sound.md index a173ccc2..2d250b0f 100644 --- a/docs/play-cow-sound.md +++ b/docs/play-cow-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-dog-sound.md b/docs/play-dog-sound.md index 1cc668df..606291f6 100644 --- a/docs/play-dog-sound.md +++ b/docs/play-dog-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-donkey-sound.md b/docs/play-donkey-sound.md index 0ba0338c..ea5c7264 100644 --- a/docs/play-donkey-sound.md +++ b/docs/play-donkey-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-drug-wars.md b/docs/play-drug-wars.md index 09f54abe..0a89d94f 100644 --- a/docs/play-drug-wars.md +++ b/docs/play-drug-wars.md @@ -5400,4 +5400,4 @@ while ($script:Playing) { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-elephant-sound.md b/docs/play-elephant-sound.md index d54993d9..681338a6 100644 --- a/docs/play-elephant-sound.md +++ b/docs/play-elephant-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-elk-sound.md b/docs/play-elk-sound.md index 441dd28c..2930611c 100644 --- a/docs/play-elk-sound.md +++ b/docs/play-elk-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-files.md b/docs/play-files.md index 98acec60..78fd7aa9 100644 --- a/docs/play-files.md +++ b/docs/play-files.md @@ -87,4 +87,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-frog-sound.md b/docs/play-frog-sound.md index 6ce0bc5e..1f159c12 100644 --- a/docs/play-frog-sound.md +++ b/docs/play-frog-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-goat-sound.md b/docs/play-goat-sound.md index 82c745b2..c84fe3a9 100644 --- a/docs/play-goat-sound.md +++ b/docs/play-goat-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-gorilla-sound.md b/docs/play-gorilla-sound.md index cd3d0231..ebb7444a 100644 --- a/docs/play-gorilla-sound.md +++ b/docs/play-gorilla-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-happy-birthday.md b/docs/play-happy-birthday.md index 15fbbd94..37dbed20 100644 --- a/docs/play-happy-birthday.md +++ b/docs/play-happy-birthday.md @@ -79,4 +79,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-horse-sound.md b/docs/play-horse-sound.md index 2aaa74cb..2fb9d564 100644 --- a/docs/play-horse-sound.md +++ b/docs/play-horse-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-imperial-march.md b/docs/play-imperial-march.md index 4c9aa77d..8a4528b1 100644 --- a/docs/play-imperial-march.md +++ b/docs/play-imperial-march.md @@ -72,4 +72,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-jingle-bells.md b/docs/play-jingle-bells.md index 547aa50a..b95e3da0 100644 --- a/docs/play-jingle-bells.md +++ b/docs/play-jingle-bells.md @@ -201,4 +201,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-lion-sound.md b/docs/play-lion-sound.md index ad32ef46..fac71567 100644 --- a/docs/play-lion-sound.md +++ b/docs/play-lion-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-m3u.md b/docs/play-m3u.md index f0c688d9..cd1972a4 100644 --- a/docs/play-m3u.md +++ b/docs/play-m3u.md @@ -85,4 +85,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-mission-impossible.md b/docs/play-mission-impossible.md index 4ebbd0c6..ac705116 100644 --- a/docs/play-mission-impossible.md +++ b/docs/play-mission-impossible.md @@ -100,4 +100,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-mp3.md b/docs/play-mp3.md index e6aa56bf..d3b31181 100644 --- a/docs/play-mp3.md +++ b/docs/play-mp3.md @@ -97,4 +97,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-parrot-sound.md b/docs/play-parrot-sound.md index da748fdf..846adf15 100644 --- a/docs/play-parrot-sound.md +++ b/docs/play-parrot-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-pig-sound.md b/docs/play-pig-sound.md index 21a04c66..5fcd5173 100644 --- a/docs/play-pig-sound.md +++ b/docs/play-pig-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-pong.md b/docs/play-pong.md index 440b0870..719198c6 100644 --- a/docs/play-pong.md +++ b/docs/play-pong.md @@ -176,4 +176,4 @@ while ($true) { exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-rattlesnake-sound.md b/docs/play-rattlesnake-sound.md index 8e5ef524..22c75422 100644 --- a/docs/play-rattlesnake-sound.md +++ b/docs/play-rattlesnake-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-rick.md b/docs/play-rick.md index df1f7c22..2ffbf066 100644 --- a/docs/play-rick.md +++ b/docs/play-rick.md @@ -49,4 +49,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-snake.md b/docs/play-snake.md index 6fc5ce07..cad1f054 100644 --- a/docs/play-snake.md +++ b/docs/play-snake.md @@ -86,4 +86,4 @@ Start-Sleep -milliseconds 300 exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-super-mario.md b/docs/play-super-mario.md index 736e7d82..adf2e06f 100644 --- a/docs/play-super-mario.md +++ b/docs/play-super-mario.md @@ -71,4 +71,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-system-sounds.md b/docs/play-system-sounds.md index c304d0dc..e3cb0fed 100644 --- a/docs/play-system-sounds.md +++ b/docs/play-system-sounds.md @@ -67,4 +67,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-tetris-melody.md b/docs/play-tetris-melody.md index 43754cdb..687ce139 100644 --- a/docs/play-tetris-melody.md +++ b/docs/play-tetris-melody.md @@ -161,4 +161,4 @@ Start-Sleep -milliseconds 500 exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-vulture-sound.md b/docs/play-vulture-sound.md index 24782b53..e3578043 100644 --- a/docs/play-vulture-sound.md +++ b/docs/play-vulture-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/play-wolf-sound.md b/docs/play-wolf-sound.md index d0c304ad..ef866590 100644 --- a/docs/play-wolf-sound.md +++ b/docs/play-wolf-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/poweroff.md b/docs/poweroff.md index 44896aef..36b66f10 100644 --- a/docs/poweroff.md +++ b/docs/poweroff.md @@ -59,4 +59,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/print-image.md b/docs/print-image.md index 4f0451d3..545663c8 100644 --- a/docs/print-image.md +++ b/docs/print-image.md @@ -70,4 +70,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/publish-to-ipfs.md b/docs/publish-to-ipfs.md index a07633a7..8b0880f9 100644 --- a/docs/publish-to-ipfs.md +++ b/docs/publish-to-ipfs.md @@ -122,4 +122,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/pull-repo.md b/docs/pull-repo.md index da067b0d..3b25b934 100644 --- a/docs/pull-repo.md +++ b/docs/pull-repo.md @@ -6,9 +6,9 @@ This PowerShell script pulls remote updates into a local Git repository (includi Parameters ---------- ```powershell -/Repos/PowerShell/scripts/pull-repo.ps1 [[-pathToRepo] ] [] +/Repos/PowerShell/scripts/pull-repo.ps1 [[-path] ] [] --pathToRepo +-path Specifies the file path to the local Git repository (default is working directory) Required? false @@ -31,7 +31,7 @@ PS> ./pull-repo.ps1 ⏳ (2/4) Checking local repository... C:\Repos\rust ⏳ (3/4) Pulling remote updates... ⏳ (4/4) Updating submodules... -βœ… Updates pulled into πŸ“‚rust repo in 14s. +βœ… Repo 'rust' updated in 14s. ``` @@ -51,7 +51,7 @@ Script Content Pulls updates into a Git repo .DESCRIPTION This PowerShell script pulls remote updates into a local Git repository (including submodules). -.PARAMETER pathToRepo +.PARAMETER path Specifies the file path to the local Git repository (default is working directory) .EXAMPLE PS> ./pull-repo.ps1 @@ -59,14 +59,14 @@ Script Content ⏳ (2/4) Checking local repository... C:\Repos\rust ⏳ (3/4) Pulling remote updates... ⏳ (4/4) Updating submodules... - βœ… Updates pulled into πŸ“‚rust repo in 14s. + βœ… Repo 'rust' updated in 14s. .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$pathToRepo = "$PWD") +param([string]$path = "$PWD") try { $stopWatch = [system.diagnostics.stopwatch]::startNew() @@ -75,30 +75,30 @@ try { & git --version if ($lastExitCode -ne 0) { throw "Can't execute 'git' - make sure Git is installed and available" } - Write-Host "⏳ (2/4) Checking local repository... $pathToRepo" - if (-not(Test-Path "$pathToRepo" -pathType container)) { throw "Can't access folder: $pathToRepo" } - $result = (git -C "$pathToRepo" status) + Write-Host "⏳ (2/4) Checking local repository... $path" + if (-not(Test-Path "$path" -pathType container)) { throw "Can't access folder: $path" } + $result = (git -C "$path" status) if ("$result" -match "HEAD detached at ") { throw "Nothing to pull due to detached HEAD state (not on a branch!)" } - $pathToRepoName = (Get-Item "$pathToRepo").Name + $dirName = (Get-Item "$path").Name Write-Host "⏳ (3/4) Pulling remote updates... " -noNewline - & git -C "$pathToRepo" remote get-url origin + & git -C "$path" remote get-url origin if ($lastExitCode -ne 0) { throw "'git remote get-url origin' failed with exit code $lastExitCode" } - & git -C "$pathToRepo" pull --recurse-submodules=yes + & git -C "$path" pull --recurse-submodules=yes if ($lastExitCode -ne 0) { throw "'git pull' failed with exit code $lastExitCode" } Write-Host "⏳ (4/4) Updating submodules... " - & git -C "$pathToRepo" submodule update --init --recursive + & git -C "$path" submodule update --init --recursive if ($lastExitCode -ne 0) { throw "'git submodule update' failed with exit code $lastExitCode" } [int]$elapsed = $stopWatch.Elapsed.TotalSeconds - "βœ… Updates pulled into πŸ“‚$pathToRepoName repo in $($elapsed)s." + "βœ… Repo '$dirName' updated in $($elapsed)s." exit 0 # success } catch { - "⚠️ Error: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/pull-repos.md b/docs/pull-repos.md index 3ad31dea..d5209f32 100644 --- a/docs/pull-repos.md +++ b/docs/pull-repos.md @@ -102,9 +102,9 @@ try { exit 1 } } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/query-smart-data.md b/docs/query-smart-data.md index 7f029ae2..cdfee594 100644 --- a/docs/query-smart-data.md +++ b/docs/query-smart-data.md @@ -107,4 +107,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/reboot-fritzbox.md b/docs/reboot-fritzbox.md index b4924e3b..bcbe4196 100644 --- a/docs/reboot-fritzbox.md +++ b/docs/reboot-fritzbox.md @@ -154,4 +154,4 @@ echo $Result exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/reboot-into-bios.md b/docs/reboot-into-bios.md index c3c4d338..4c6cbbeb 100644 --- a/docs/reboot-into-bios.md +++ b/docs/reboot-into-bios.md @@ -44,4 +44,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/reboot.md b/docs/reboot.md index d1946fc0..cb279e50 100644 --- a/docs/reboot.md +++ b/docs/reboot.md @@ -59,4 +59,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/remember.md b/docs/remember.md index 35595945..4c59f89c 100644 --- a/docs/remember.md +++ b/docs/remember.md @@ -104,4 +104,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/remind-me.md b/docs/remind-me.md index 7ca9d198..16e79975 100644 --- a/docs/remind-me.md +++ b/docs/remind-me.md @@ -90,4 +90,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/remove-dir.md b/docs/remove-dir.md new file mode 100644 index 00000000..d63e94a2 --- /dev/null +++ b/docs/remove-dir.md @@ -0,0 +1,86 @@ +The *remove-dir.ps1* Script +=========================== + +This PowerShell script removes the given directory tree recursively. +NOTE: Use with care! This cannot be undone! + +Parameters +---------- +```powershell +/Repos/PowerShell/scripts/remove-dir.ps1 [[-pathToDir] ] [] + +-pathToDir + Specifies the file path to the directory tree + + Required? false + Position? 1 + Default value + Accept pipeline input? false + Aliases + Accept wildcard characters? false + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Example +------- +```powershell +PS> ./remove-dir.ps1 C:\Temp +⏳ Removing directory 'C:\Temp', please wait..." +βœ… Directory C:\Temp\ removed (took 9s). + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Removes a directory +.DESCRIPTION + This PowerShell script removes the given directory tree recursively. + NOTE: Use with care! This cannot be undone! +.PARAMETER pathToDir + Specifies the file path to the directory tree +.EXAMPLE + PS> ./remove-dir.ps1 C:\Temp + ⏳ Removing directory 'C:\Temp', please wait..." + βœ… Directory C:\Temp\ removed (took 9s). +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +param([string]$pathToDir = "") + +try { + if ($pathToDir -eq "" ) { $pathToDir = Read-Host "Enter the file path to the obsolete directory" } + + $stopWatch = [system.diagnostics.stopwatch]::startNew() + if (!(Test-Path "$pathToDir" -pathType container)) { throw "Cannot access directory '$pathToDir'" } + + "⏳ Removing directory '$pathToDir', please wait..." + Remove-Item -force -recurse -confirm:$false $pathToDir + if ($lastExitCode -ne 0) { throw "'Remove-Item' failed with exit code $lastExitCode" } + + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "βœ… Directory $pathToDir removed (took $($elapsed)s)." + exit 0 # success +} catch { + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." + exit 1 +} +``` + +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/remove-empty-dirs.md b/docs/remove-empty-dirs.md index 4b345b65..332fe5cb 100644 --- a/docs/remove-empty-dirs.md +++ b/docs/remove-empty-dirs.md @@ -92,4 +92,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/remove-old-dirs.md b/docs/remove-old-dirs.md index 9be9f978..e66439ef 100644 --- a/docs/remove-old-dirs.md +++ b/docs/remove-old-dirs.md @@ -102,4 +102,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/remove-print-jobs.md b/docs/remove-print-jobs.md index 7555fc44..f0040cf9 100644 --- a/docs/remove-print-jobs.md +++ b/docs/remove-print-jobs.md @@ -65,4 +65,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/remove-tag.md b/docs/remove-tag.md index 641896ed..2897c878 100644 --- a/docs/remove-tag.md +++ b/docs/remove-tag.md @@ -114,4 +114,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/remove-user.md b/docs/remove-user.md index 2b70018d..b7f373ce 100644 --- a/docs/remove-user.md +++ b/docs/remove-user.md @@ -76,4 +76,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:40)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/remove-vm.md b/docs/remove-vm.md index 292c4196..7eaac138 100644 --- a/docs/remove-vm.md +++ b/docs/remove-vm.md @@ -25,4 +25,4 @@ Remove-Item -Path "C:\VirtualMachines\$VMName" -Recurse exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:25)* diff --git a/docs/replace-in-files.md b/docs/replace-in-files.md index 746ff16c..350a2775 100644 --- a/docs/replace-in-files.md +++ b/docs/replace-in-files.md @@ -107,4 +107,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/restart-network-adapters.md b/docs/restart-network-adapters.md index 439e6b8a..57188551 100644 --- a/docs/restart-network-adapters.md +++ b/docs/restart-network-adapters.md @@ -60,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/roll-a-dice.md b/docs/roll-a-dice.md index 9916871a..85b84d8a 100644 --- a/docs/roll-a-dice.md +++ b/docs/roll-a-dice.md @@ -51,4 +51,4 @@ $Number = "1", "2", "3", "4", "5", "6" | Get-Random exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/save-credentials.md b/docs/save-credentials.md index 21df98c6..77feaa3f 100644 --- a/docs/save-credentials.md +++ b/docs/save-credentials.md @@ -74,4 +74,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/save-screenshot.md b/docs/save-screenshot.md index 333f1c07..6708812d 100644 --- a/docs/save-screenshot.md +++ b/docs/save-screenshot.md @@ -99,4 +99,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/scan-folder.md b/docs/scan-folder.md index cce16348..31c4c9d8 100644 --- a/docs/scan-folder.md +++ b/docs/scan-folder.md @@ -90,4 +90,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/scan-network.md b/docs/scan-network.md index be7bb278..29a97c65 100644 --- a/docs/scan-network.md +++ b/docs/scan-network.md @@ -32,4 +32,4 @@ $arguments = $arguments + " " + $targets Start-Process $location -ArgumentList $arguments -Wait ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/scan-ports.md b/docs/scan-ports.md index 27f9e6b1..9c0b0a78 100644 --- a/docs/scan-ports.md +++ b/docs/scan-ports.md @@ -65,4 +65,4 @@ foreach($add in $range) { exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/search-filename.md b/docs/search-filename.md index a164d29c..b2b86b2a 100644 --- a/docs/search-filename.md +++ b/docs/search-filename.md @@ -98,4 +98,4 @@ Search-Folder -FilePath $path -SearchTerm $term exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/search-files.md b/docs/search-files.md index 9c0b802a..4b213d14 100644 --- a/docs/search-files.md +++ b/docs/search-files.md @@ -101,4 +101,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/search-repo.md b/docs/search-repo.md index e655822c..184e829b 100644 --- a/docs/search-repo.md +++ b/docs/search-repo.md @@ -93,4 +93,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/send-email.md b/docs/send-email.md index 2d1e2d0b..0fd740bd 100644 --- a/docs/send-email.md +++ b/docs/send-email.md @@ -126,4 +126,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/send-tcp.md b/docs/send-tcp.md index 6eeed1b4..2cf0bd8d 100644 --- a/docs/send-tcp.md +++ b/docs/send-tcp.md @@ -107,4 +107,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/send-udp.md b/docs/send-udp.md index e52d8920..ed8506c9 100644 --- a/docs/send-udp.md +++ b/docs/send-udp.md @@ -105,4 +105,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/set-timer.md b/docs/set-timer.md index a08331ba..b20e9302 100644 --- a/docs/set-timer.md +++ b/docs/set-timer.md @@ -75,4 +75,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/set-volume.md b/docs/set-volume.md index 9683fc39..f22007e4 100644 --- a/docs/set-volume.md +++ b/docs/set-volume.md @@ -78,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/set-wallpaper.md b/docs/set-wallpaper.md index 3241043a..6c569b48 100644 --- a/docs/set-wallpaper.md +++ b/docs/set-wallpaper.md @@ -124,4 +124,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/show-lightnings.md b/docs/show-lightnings.md index 01898c7b..2ed6d154 100644 --- a/docs/show-lightnings.md +++ b/docs/show-lightnings.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/show-notification-motivation-quote.md b/docs/show-notification-motivation-quote.md index 7d2f0650..9a35027b 100644 --- a/docs/show-notification-motivation-quote.md +++ b/docs/show-notification-motivation-quote.md @@ -69,4 +69,4 @@ $AppId = '{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\WindowsPowerShell\v1.0\powershe ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/show-notification.md b/docs/show-notification.md index 53f83eb7..18824ec4 100644 --- a/docs/show-notification.md +++ b/docs/show-notification.md @@ -99,4 +99,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/show-traffic.md b/docs/show-traffic.md index 5f151d72..3f663b7e 100644 --- a/docs/show-traffic.md +++ b/docs/show-traffic.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/simulate-presence.md b/docs/simulate-presence.md index 12fb37b2..af97efca 100644 --- a/docs/simulate-presence.md +++ b/docs/simulate-presence.md @@ -75,4 +75,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/smart-data2csv.md b/docs/smart-data2csv.md index 911c10b5..63105472 100644 --- a/docs/smart-data2csv.md +++ b/docs/smart-data2csv.md @@ -142,4 +142,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-arabic.md b/docs/speak-arabic.md index 4d918803..63dd8a8c 100644 --- a/docs/speak-arabic.md +++ b/docs/speak-arabic.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-checklist.md b/docs/speak-checklist.md index 8a234dbc..fd132d64 100644 --- a/docs/speak-checklist.md +++ b/docs/speak-checklist.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$name = "handwashing") function WaitForCheck { @@ -96,4 +98,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-countdown.md b/docs/speak-countdown.md index 13376f9d..e596040d 100644 --- a/docs/speak-countdown.md +++ b/docs/speak-countdown.md @@ -58,6 +58,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([int]$startNumber = 10) try { @@ -73,4 +75,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-croatian.md b/docs/speak-croatian.md index e2d2650a..59cb931b 100644 --- a/docs/speak-croatian.md +++ b/docs/speak-croatian.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-danish.md b/docs/speak-danish.md index e95de969..212504e3 100644 --- a/docs/speak-danish.md +++ b/docs/speak-danish.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-dutch.md b/docs/speak-dutch.md index 85a5cb7c..03a714e64 100644 --- a/docs/speak-dutch.md +++ b/docs/speak-dutch.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-english.md b/docs/speak-english.md index 1c65cc0e..ffe0a501 100644 --- a/docs/speak-english.md +++ b/docs/speak-english.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -75,4 +77,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-epub.md b/docs/speak-epub.md index 1d1817a5..ada26dbf 100644 --- a/docs/speak-epub.md +++ b/docs/speak-epub.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$Filename = "") function Speak { param([string]$Text) @@ -140,4 +142,4 @@ foreach($item in $content.package.manifest.Item) { exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-esperanto.md b/docs/speak-esperanto.md index b93bc705..c2f197dc 100644 --- a/docs/speak-esperanto.md +++ b/docs/speak-esperanto.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-file.md b/docs/speak-file.md index bc69d857..6e45d79a 100644 --- a/docs/speak-file.md +++ b/docs/speak-file.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$File = "") try { @@ -72,4 +74,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-finnish.md b/docs/speak-finnish.md index 8335c006..14c5449b 100644 --- a/docs/speak-finnish.md +++ b/docs/speak-finnish.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-french.md b/docs/speak-french.md index 4923f591..5e8331d7 100644 --- a/docs/speak-french.md +++ b/docs/speak-french.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-german.md b/docs/speak-german.md index 13594675..4f5ce078 100644 --- a/docs/speak-german.md +++ b/docs/speak-german.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-greek.md b/docs/speak-greek.md index 9a5fb879..649c33da 100644 --- a/docs/speak-greek.md +++ b/docs/speak-greek.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-hebrew.md b/docs/speak-hebrew.md index 586da5bb..894cd5ad 100644 --- a/docs/speak-hebrew.md +++ b/docs/speak-hebrew.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-hindi.md b/docs/speak-hindi.md index 181cb8f9..d7ef3c54 100644 --- a/docs/speak-hindi.md +++ b/docs/speak-hindi.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-italian.md b/docs/speak-italian.md index 70dc250a..361e39ae 100644 --- a/docs/speak-italian.md +++ b/docs/speak-italian.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-japanese.md b/docs/speak-japanese.md index 9a7d5f3b..f3ecf147 100644 --- a/docs/speak-japanese.md +++ b/docs/speak-japanese.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-korean.md b/docs/speak-korean.md index efd412e5..0d8433b8 100644 --- a/docs/speak-korean.md +++ b/docs/speak-korean.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-latin.md b/docs/speak-latin.md index cff9582d..387e6ddd 100644 --- a/docs/speak-latin.md +++ b/docs/speak-latin.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-mandarin.md b/docs/speak-mandarin.md index 3ddde622..667ca46d 100644 --- a/docs/speak-mandarin.md +++ b/docs/speak-mandarin.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-norwegian.md b/docs/speak-norwegian.md index 6bce006d..26208f71 100644 --- a/docs/speak-norwegian.md +++ b/docs/speak-norwegian.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-polish.md b/docs/speak-polish.md index 08636b6e..5b5e8b39 100644 --- a/docs/speak-polish.md +++ b/docs/speak-polish.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-portuguese.md b/docs/speak-portuguese.md index 32ef09e1..c1128434 100644 --- a/docs/speak-portuguese.md +++ b/docs/speak-portuguese.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-russian.md b/docs/speak-russian.md index e891b34e..96ebb8d9 100644 --- a/docs/speak-russian.md +++ b/docs/speak-russian.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-spanish.md b/docs/speak-spanish.md index 6fdb45fe..955e5b3c 100644 --- a/docs/speak-spanish.md +++ b/docs/speak-spanish.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-swedish.md b/docs/speak-swedish.md index 207d3d90..b366cac6 100644 --- a/docs/speak-swedish.md +++ b/docs/speak-swedish.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-test.md b/docs/speak-test.md index a7a2d8c5..2b08a700 100644 --- a/docs/speak-test.md +++ b/docs/speak-test.md @@ -1,19 +1,35 @@ The *speak-test.ps1* Script =========================== -speak-test.ps1 - +This PowerShell script performs a text-to-speech (TTS) test. Parameters ---------- ```powershell - +/Repos/PowerShell/scripts/speak-test.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. ``` +Example +------- +```powershell +PS> ./speak-test.ps1 +πŸ“£ Let's begin with the default speed rate of 0 at the default volume of 100%. +... + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + Script Content -------------- ```powershell @@ -32,6 +48,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + function Speak([string]$Text) { Write-Output "πŸ“£ $Text" [void]$Voice.speak("$Text") @@ -83,4 +101,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-text.md b/docs/speak-text.md index 703e94de..775d0f34 100644 --- a/docs/speak-text.md +++ b/docs/speak-text.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -70,4 +72,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-thai.md b/docs/speak-thai.md index baf61c6c..eebcc148 100644 --- a/docs/speak-thai.md +++ b/docs/speak-thai.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-turkish.md b/docs/speak-turkish.md index e33122db..b35751ce 100644 --- a/docs/speak-turkish.md +++ b/docs/speak-turkish.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/speak-ukrainian.md b/docs/speak-ukrainian.md index b8b97957..9d6e8bcf 100644 --- a/docs/speak-ukrainian.md +++ b/docs/speak-ukrainian.md @@ -56,6 +56,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +#requires -version 5.1 + param([string]$text = "") try { @@ -76,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/spell-word.md b/docs/spell-word.md index bd034eca..c4cfa9de 100644 --- a/docs/spell-word.md +++ b/docs/spell-word.md @@ -76,4 +76,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/start-ipfs-server.md b/docs/start-ipfs-server.md index 8dbc1b55..31fe1e28 100644 --- a/docs/start-ipfs-server.md +++ b/docs/start-ipfs-server.md @@ -90,4 +90,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/suspend.md b/docs/suspend.md index cb46b033..b3473562 100644 --- a/docs/suspend.md +++ b/docs/suspend.md @@ -54,4 +54,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/switch-branch.md b/docs/switch-branch.md index 7f686206..7c2e6cdb 100644 --- a/docs/switch-branch.md +++ b/docs/switch-branch.md @@ -6,7 +6,7 @@ This PowerShell script switches to the given branch in a Git repository and also Parameters ---------- ```powershell -/Repos/PowerShell/scripts/switch-branch.ps1 [[-branchName] ] [[-pathToRepo] ] [] +/Repos/PowerShell/scripts/switch-branch.ps1 [[-branchName] ] [[-path] ] [] -branchName Specifies the Git branch name to switch to @@ -18,7 +18,7 @@ Parameters Aliases Accept wildcard characters? false --pathToRepo +-path Specifies the file path to the local Git repository Required? false @@ -40,10 +40,10 @@ PS> ./switch-branch main ⏳ (1/6) Searching for Git executable... git version 2.43.0.windows.1 ⏳ (2/6) Checking local repository... C:\Repos\rust ⏳ (3/6) Fetching remote updates... -⏳ (4/6) Switching to 'main' branch... +⏳ (4/6) Switching to branch 'main'... ⏳ (5/6) Pulling remote updates... ⏳ (6/6) Updating submodules... -βœ… Switched repo πŸ“‚rust to 'main' branch in 22s. +βœ… Repo 'rust' switched to 'main' branch in 22s. ``` @@ -65,24 +65,24 @@ Script Content This PowerShell script switches to the given branch in a Git repository and also updates the submodules. .PARAMETER branchName Specifies the Git branch name to switch to -.PARAMETER pathToRepo +.PARAMETER path Specifies the file path to the local Git repository .EXAMPLE PS> ./switch-branch main ⏳ (1/6) Searching for Git executable... git version 2.43.0.windows.1 ⏳ (2/6) Checking local repository... C:\Repos\rust ⏳ (3/6) Fetching remote updates... - ⏳ (4/6) Switching to 'main' branch... + ⏳ (4/6) Switching to branch 'main'... ⏳ (5/6) Pulling remote updates... ⏳ (6/6) Updating submodules... - βœ… Switched repo πŸ“‚rust to 'main' branch in 22s. + βœ… Repo 'rust' switched to 'main' branch in 22s. .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$branchName = "", [string]$pathToRepo = "$PWD") +param([string]$branchName = "", [string]$path = "$PWD") try { if ($branchName -eq "") { $branchName = Read-Host "Enter the branch name to switch to" } @@ -93,39 +93,39 @@ try { & git --version if ($lastExitCode -ne 0) { throw "Can't execute 'git' - make sure Git is installed and available" } - Write-Host "⏳ (2/6) Checking local repository... $pathToRepo" - if (-not(Test-Path "$pathToRepo" -pathType container)) { throw "Can't access repo folder: $pathToRepo" } - $result = (git -C "$pathToRepo" status) - if ($lastExitCode -ne 0) { throw "'git status' in $pathToRepo failed with exit code $lastExitCode" } + Write-Host "⏳ (2/6) Checking local repository... $path" + if (-not(Test-Path "$path" -pathType container)) { throw "Can't access repo folder: $path" } + $result = (git -C "$path" status) + if ($lastExitCode -ne 0) { throw "'git status' in $path failed with exit code $lastExitCode" } if ("$result" -notmatch "nothing to commit, working tree clean") { throw "Git repository is NOT clean: $result" } - $repoDirName = (Get-Item "$pathToRepo").Name + $repoDirName = (Get-Item "$path").Name Write-Host "⏳ (3/6) Fetching remote updates... " -noNewline - & git -C "$pathToRepo" remote get-url origin + & git -C "$path" remote get-url origin if ($lastExitCode -ne 0) { throw "'git remote get-url origin' failed with exit code $lastExitCode" } - & git -C "$pathToRepo" fetch --all --prune --prune-tags --force + & git -C "$path" fetch --all --prune --prune-tags --force if ($lastExitCode -ne 0) { throw "'git fetch' failed with exit code $lastExitCode" } - "⏳ (4/6) Switching to '$branchName' branch..." - & git -C "$pathToRepo" checkout --recurse-submodules "$branchName" + "⏳ (4/6) Switching to branch '$branchName'..." + & git -C "$path" checkout --recurse-submodules "$branchName" if ($lastExitCode -ne 0) { throw "'git checkout $branchName' failed with exit code $lastExitCode" } "⏳ (5/6) Pulling remote updates..." - & git -C "$pathToRepo" pull --recurse-submodules + & git -C "$path" pull --recurse-submodules if ($lastExitCode -ne 0) { throw "'git pull' failed with exit code $lastExitCode" } "⏳ (6/6) Updating submodules..." - & git -C "$pathToRepo" submodule update --init --recursive + & git -C "$path" submodule update --init --recursive if ($lastExitCode -ne 0) { throw "'git submodule update' failed with exit code $lastExitCode" } [int]$elapsed = $stopWatch.Elapsed.TotalSeconds - "βœ… Switched repo πŸ“‚$repoDirName to '$branchName' branch in $($elapsed)s." + "βœ… Repo '$repoDirName' switched to '$branchName' branch in $($elapsed)s." exit 0 # success } catch { - "⚠️ Error: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)" exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/switch-shelly1.md b/docs/switch-shelly1.md index 09c9385e..b91224ef 100644 --- a/docs/switch-shelly1.md +++ b/docs/switch-shelly1.md @@ -97,4 +97,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/switch-tabs.md b/docs/switch-tabs.md index 9d4f69e3..a256e205 100644 --- a/docs/switch-tabs.md +++ b/docs/switch-tabs.md @@ -77,4 +77,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/sync-dir.md b/docs/sync-dir.md index 1b2bb508..f4383ab0 100644 --- a/docs/sync-dir.md +++ b/docs/sync-dir.md @@ -106,4 +106,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/sync-repo.md b/docs/sync-repo.md index d0acc1d1..a5406ff1 100644 --- a/docs/sync-repo.md +++ b/docs/sync-repo.md @@ -9,7 +9,7 @@ Parameters /Repos/PowerShell/scripts/sync-repo.ps1 [[-path] ] [] -path - Specifies the path to the Git repository (current working directory by default) + Specifies the file path to the Git repository (current working directory by default) Required? false Position? 1 @@ -31,7 +31,7 @@ PS> ./sync-repo.ps1 C:\Repos\curl ⏳ (2/4) Checking local repository... C:\Repos\curl ⏳ (3/4) Pulling remote updates... Already up to date. ⏳ (4/4) Pushing local updates... Everything up-to-date -βœ… Synced the πŸ“‚curl repo in 5s. +βœ… Repo 'curl' synchronized in 5s. ``` @@ -52,14 +52,14 @@ Script Content .DESCRIPTION This PowerShell script synchronizes a local Git repository by pull and push (including submodules). .PARAMETER path - Specifies the path to the Git repository (current working directory by default) + Specifies the file path to the Git repository (current working directory by default) .EXAMPLE PS> ./sync-repo.ps1 C:\Repos\curl ⏳ (1/4) Searching for Git executable... git version 2.42.0.windows.1 ⏳ (2/4) Checking local repository... C:\Repos\curl ⏳ (3/4) Pulling remote updates... Already up to date. ⏳ (4/4) Pushing local updates... Everything up-to-date - βœ… Synced the πŸ“‚curl repo in 5s. + βœ… Repo 'curl' synchronized in 5s. .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -88,12 +88,12 @@ try { $pathName = (Get-Item "$path").Name [int]$elapsed = $stopWatch.Elapsed.TotalSeconds - "βœ… Synced the πŸ“‚$pathName repo in $($elapsed)s." + "βœ… Repo '$pathName' synchronized in $($elapsed)s." exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/tell-joke.md b/docs/tell-joke.md index 503c9b3c..e4ca170a 100644 --- a/docs/tell-joke.md +++ b/docs/tell-joke.md @@ -60,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/tell-new-year.md b/docs/tell-new-year.md index 38d50d90..73936cc9 100644 --- a/docs/tell-new-year.md +++ b/docs/tell-new-year.md @@ -62,4 +62,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/tell-quote.md b/docs/tell-quote.md index fcbd0502..08f4fcfa 100644 --- a/docs/tell-quote.md +++ b/docs/tell-quote.md @@ -60,4 +60,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/toggle-caps-lock.md b/docs/toggle-caps-lock.md index 3a72d626..11692781 100644 --- a/docs/toggle-caps-lock.md +++ b/docs/toggle-caps-lock.md @@ -54,4 +54,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/toggle-num-lock.md b/docs/toggle-num-lock.md index 9f84169a..39a903ba 100644 --- a/docs/toggle-num-lock.md +++ b/docs/toggle-num-lock.md @@ -54,4 +54,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/toggle-scroll-lock.md b/docs/toggle-scroll-lock.md index 86783857..93118052 100644 --- a/docs/toggle-scroll-lock.md +++ b/docs/toggle-scroll-lock.md @@ -54,4 +54,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/touch.md b/docs/touch.md index 9862dcb9..4d9a2023 100644 --- a/docs/touch.md +++ b/docs/touch.md @@ -71,4 +71,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/translate-file.md b/docs/translate-file.md index 8143b228..5c8862f3 100644 --- a/docs/translate-file.md +++ b/docs/translate-file.md @@ -111,4 +111,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/translate-files.md b/docs/translate-files.md index 186de09c..c062bfbe 100644 --- a/docs/translate-files.md +++ b/docs/translate-files.md @@ -106,4 +106,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/translate-text.md b/docs/translate-text.md index e39f87e2..2ebc20cc 100644 --- a/docs/translate-text.md +++ b/docs/translate-text.md @@ -107,4 +107,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/turn-volume-down.md b/docs/turn-volume-down.md index 4560d889..1b63e71f 100644 --- a/docs/turn-volume-down.md +++ b/docs/turn-volume-down.md @@ -70,4 +70,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/turn-volume-fully-up.md b/docs/turn-volume-fully-up.md index 3475aabc..52c1f9e3 100644 --- a/docs/turn-volume-fully-up.md +++ b/docs/turn-volume-fully-up.md @@ -56,4 +56,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/turn-volume-off.md b/docs/turn-volume-off.md index e8680c66..e0d79dd9 100644 --- a/docs/turn-volume-off.md +++ b/docs/turn-volume-off.md @@ -54,4 +54,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/turn-volume-on.md b/docs/turn-volume-on.md index 9a7d523e..946a118d 100644 --- a/docs/turn-volume-on.md +++ b/docs/turn-volume-on.md @@ -54,4 +54,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/turn-volume-up.md b/docs/turn-volume-up.md index d6e66f54..f591deca 100644 --- a/docs/turn-volume-up.md +++ b/docs/turn-volume-up.md @@ -70,4 +70,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/uninstall-all-apps.md b/docs/uninstall-all-apps.md index 5fa1a03d..c5558174 100644 --- a/docs/uninstall-all-apps.md +++ b/docs/uninstall-all-apps.md @@ -57,4 +57,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/uninstall-bloatware.md b/docs/uninstall-bloatware.md index aa9af0bf..ef7eb7b8 100644 --- a/docs/uninstall-bloatware.md +++ b/docs/uninstall-bloatware.md @@ -98,4 +98,4 @@ winget uninstall 'Prime Video for Windows' exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/uninstall-new-outlook.md b/docs/uninstall-new-outlook.md index bf39daa9..1459b121 100644 --- a/docs/uninstall-new-outlook.md +++ b/docs/uninstall-new-outlook.md @@ -57,4 +57,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/uninstall-outlook.md b/docs/uninstall-outlook.md index 236f1c8b..5cb60938 100644 --- a/docs/uninstall-outlook.md +++ b/docs/uninstall-outlook.md @@ -57,4 +57,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/update-powershell-profile.md b/docs/update-powershell-profile.md index 7572b0fb..dee1d351 100644 --- a/docs/update-powershell-profile.md +++ b/docs/update-powershell-profile.md @@ -81,4 +81,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:41)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/upgrade-ubuntu.md b/docs/upgrade-ubuntu.md index 945250ad..536829d6 100644 --- a/docs/upgrade-ubuntu.md +++ b/docs/upgrade-ubuntu.md @@ -87,4 +87,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/upload-file.md b/docs/upload-file.md index 7b8fd8e1..5d9130ef 100644 --- a/docs/upload-file.md +++ b/docs/upload-file.md @@ -149,4 +149,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/upload-to-dropbox.md b/docs/upload-to-dropbox.md index cf283500..4d02facb 100644 --- a/docs/upload-to-dropbox.md +++ b/docs/upload-to-dropbox.md @@ -75,4 +75,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/wake-up-host.md b/docs/wake-up-host.md index 4fd16406..6faf7698 100644 --- a/docs/wake-up-host.md +++ b/docs/wake-up-host.md @@ -124,4 +124,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/wake-up-human.md b/docs/wake-up-human.md index 077c2ceb..c3483e4d 100644 --- a/docs/wake-up-human.md +++ b/docs/wake-up-human.md @@ -52,4 +52,4 @@ do { ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/watch-commits.md b/docs/watch-commits.md index bc6e433a..58bbbc9a 100644 --- a/docs/watch-commits.md +++ b/docs/watch-commits.md @@ -125,4 +125,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/watch-crypto-rates.md b/docs/watch-crypto-rates.md index c26e7877..4f934bfe 100644 --- a/docs/watch-crypto-rates.md +++ b/docs/watch-crypto-rates.md @@ -80,4 +80,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/watch-file.md b/docs/watch-file.md index f61bc2c9..f23d5838 100644 --- a/docs/watch-file.md +++ b/docs/watch-file.md @@ -64,4 +64,4 @@ function Watch-File { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/watch-host.md b/docs/watch-host.md index 76e64332..b8b67f25 100644 --- a/docs/watch-host.md +++ b/docs/watch-host.md @@ -147,4 +147,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/watch-news.md b/docs/watch-news.md index 94984fdf..333863ce 100644 --- a/docs/watch-news.md +++ b/docs/watch-news.md @@ -123,4 +123,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/watch-ping.md b/docs/watch-ping.md index 064f1ef6..d2ae65a6 100644 --- a/docs/watch-ping.md +++ b/docs/watch-ping.md @@ -137,4 +137,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/weather-report.md b/docs/weather-report.md index b93ba3e6..42446e37 100644 --- a/docs/weather-report.md +++ b/docs/weather-report.md @@ -67,4 +67,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/weather.md b/docs/weather.md index 5dc21923..a0f0b9d6 100644 --- a/docs/weather.md +++ b/docs/weather.md @@ -67,4 +67,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/what-is.md b/docs/what-is.md index daec4f24..e4532a67 100644 --- a/docs/what-is.md +++ b/docs/what-is.md @@ -84,4 +84,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/windefender.md b/docs/windefender.md index 0b864178..ffe30d8c 100644 --- a/docs/windefender.md +++ b/docs/windefender.md @@ -82,4 +82,4 @@ break } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/write-animated.md b/docs/write-animated.md index 4bd74cda..7e8497f7 100644 --- a/docs/write-animated.md +++ b/docs/write-animated.md @@ -94,4 +94,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:26)* diff --git a/docs/write-ascii-image.md b/docs/write-ascii-image.md index b8a7337e..2ff559e5 100644 --- a/docs/write-ascii-image.md +++ b/docs/write-ascii-image.md @@ -38,13 +38,13 @@ WriteLine "" WriteLine " _-o#&&*''''?d:>b\_" WriteLine " _o/'`'' '',, dMF9MMMMMHo_" WriteLine " .o&#' `'MbHMMMMMMMMMMMHo." -WriteLine " .o'' ' vodM*$&&HMMMMMMMMMM?." -WriteLine " ,' $M&ood,~'`(&##MMMMMMH\" +WriteLine " .o'' ' vodM*S&&HMMMMMMMMMM?." +WriteLine " ,' SM&ood,~'`(&##MMMMMMH\" WriteLine " / ,MMMMMMM#b?#bobMMMMHMMML" -WriteLine " & ?MMMMMMMMMMMMMMMMM7MMM$R*Hk" -WriteLine " ?$. :MMMMMMMMMMMMMMMMMMM/HMMM|`*L" +WriteLine " & ?MMMMMMMMMMMMMMMMM7MMMSR*Hk" +WriteLine " ?S. :MMMMMMMMMMMMMMMMMMM/HMMM|`*L" WriteLine "| |MMMMMMMMMMMMMMMMMMMMbMH' T," -WriteLine "$H#: `*MMMMMMMMMMMMMMMMMMMMb#}' `?" +WriteLine "SH#: `*MMMMMMMMMMMMMMMMMMMMb#}' `?" WriteLine "]MMH# ''*''''*#MMMMMMMMMMMMM' -" WriteLine "MMMMMb_ |MMMMMMMMMMMP' :" WriteLine "HMMMMMMMHo `MMMMMMMMMT ." @@ -61,4 +61,4 @@ WriteLine " '`--._,dd###pp='''" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-big.md b/docs/write-big.md index a18de1b4..23036973 100644 --- a/docs/write-big.md +++ b/docs/write-big.md @@ -472,4 +472,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-blue.md b/docs/write-blue.md index 3c31df01..cae79ea7 100644 --- a/docs/write-blue.md +++ b/docs/write-blue.md @@ -65,4 +65,4 @@ write-host -foregroundColor blue "$text" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-braille.md b/docs/write-braille.md index 655049cb..8365d5ef 100644 --- a/docs/write-braille.md +++ b/docs/write-braille.md @@ -409,4 +409,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-centered.md b/docs/write-centered.md index 31ece537..c4aa917d 100644 --- a/docs/write-centered.md +++ b/docs/write-centered.md @@ -77,4 +77,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-changelog.md b/docs/write-changelog.md index 27001994..1e091374 100644 --- a/docs/write-changelog.md +++ b/docs/write-changelog.md @@ -155,4 +155,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-chart.md b/docs/write-chart.md index 53ee6d37..aa305d1e 100644 --- a/docs/write-chart.md +++ b/docs/write-chart.md @@ -68,4 +68,4 @@ WriteChartLine "Tom" 30.9 100.0 exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-clock.md b/docs/write-clock.md index c768bc18..4c2c9f55 100644 --- a/docs/write-clock.md +++ b/docs/write-clock.md @@ -73,4 +73,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-code.md b/docs/write-code.md index 6338d87f..f7735134 100644 --- a/docs/write-code.md +++ b/docs/write-code.md @@ -144,4 +144,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-credits.md b/docs/write-credits.md index 7f63be7b..81ca0b57 100644 --- a/docs/write-credits.md +++ b/docs/write-credits.md @@ -76,4 +76,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-date.md b/docs/write-date.md index e912492d..acd03313 100644 --- a/docs/write-date.md +++ b/docs/write-date.md @@ -57,4 +57,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-fractal.md b/docs/write-fractal.md index a773df3e..f6e0878d 100644 --- a/docs/write-fractal.md +++ b/docs/write-fractal.md @@ -79,4 +79,4 @@ while ($true) { exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-green.md b/docs/write-green.md index 97cf6b63..f31058fe 100644 --- a/docs/write-green.md +++ b/docs/write-green.md @@ -64,4 +64,4 @@ write-host -foregroundColor green "$text" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-hands-off.md b/docs/write-hands-off.md index f3d39618..567bb405 100644 --- a/docs/write-hands-off.md +++ b/docs/write-hands-off.md @@ -67,4 +67,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-headline.md b/docs/write-headline.md index 0002efb9..58ba81ec 100644 --- a/docs/write-headline.md +++ b/docs/write-headline.md @@ -78,4 +78,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-help.md b/docs/write-help.md index 32e1fe8f..216008fb 100644 --- a/docs/write-help.md +++ b/docs/write-help.md @@ -38,8 +38,9 @@ function Blue([string]$line) { } try { - White "β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ`n" - White "β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ πŸ‘‹ Welcome to POWERSHELL $($PSVersionTable.PSVersion) $($PSVersionTable.PSEdition) edition`n" + Write-Host "" + White "β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ PowerShell $($PSVersionTable.PSVersion) $($PSVersionTable.PSEdition) Edition`n" + White "β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ ------------------------------------------`n" White "β–ˆβ–ˆβ–ˆβ–ˆ β–„β–„β–„β–„β–„ β–ˆβ–€ β–ˆβ–€β–€β–ˆβ–€β–€ β–„β–„β–ˆβ–ˆ β–„β–„β–„β–„β–„ β–ˆβ–ˆβ–ˆβ–ˆ`n" White "β–ˆβ–ˆβ–ˆβ–ˆ β–ˆ β–ˆ β–ˆβ–€ β–„ β–ˆβ–€ β–€ β–€β–„β–ˆ β–ˆ β–ˆ β–ˆ β–ˆβ–ˆβ–ˆβ–ˆ Documentation: "; Blue "https://docs.microsoft.com/en-us/powershell`n" White "β–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–„β–„β–„β–ˆ β–ˆβ–€β–ˆ β–ˆβ–„β–€β–„β–€ β–€ β–„β–„β–ˆ β–ˆβ–„β–„β–„β–ˆ β–ˆβ–ˆβ–ˆβ–ˆ`n" @@ -47,21 +48,21 @@ try { White "β–ˆβ–ˆβ–ˆβ–ˆβ–„β–„ β–„β–ˆβ–„β–„ β–„β–ˆβ–„β–„ β–ˆβ–€ β–€β–€β–€ β–€β–„β–€β–„β–ˆβ–„β–€β–ˆβ–ˆβ–ˆβ–ˆ`n" White "β–ˆβ–ˆβ–ˆβ–ˆβ–€β–„β–„β–ˆβ–€β–ˆβ–„β–ˆβ–ˆ β–€ β–„β–„β–€ β–ˆβ–„β–ˆβ–€ β–€ β–„β–€β–€β–ˆβ–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ Video tutorials: "; Blue "https://www.youtube.com/results?search_query=PowerShell`n" White "β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–„β–„β–ˆβ–„β–„β–€β–„ β–€β–„β–€ β–„β–„ β–€ β–€β–€β–€ β–€β–„β–„β–ˆβ–€β–ˆβ–ˆβ–ˆβ–ˆ`n" - White "β–ˆβ–ˆβ–ˆβ–ˆβ–„ β–€ β–„ β–„β–„β–ˆ β–ˆβ–€β–ˆβ–ˆβ–„ β–ˆβ–ˆβ–€β–„β–ˆβ–„β–„β–€β–„β–„β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ Type 'Get-Help ' to display information about `n" + White "β–ˆβ–ˆβ–ˆβ–ˆβ–„ β–€ β–„ β–„β–„β–ˆ β–ˆβ–€β–ˆβ–ˆβ–„ β–ˆβ–ˆβ–€β–„β–ˆβ–„β–„β–€β–„β–„β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ FAQ's: "; Blue "https://github.com/fleschutz/PowerShell/blob/main/docs/FAQ.md`n" White "β–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–„β–„ β–„β–ˆβ–„β–„β–„β–ˆβ–ˆ β–€ β–€β–€β–€β–€β–„ β–ˆβ–€β–ˆβ–ˆβ–ˆβ–ˆ`n" - White "β–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–„ β–„β–€β–€β–ˆβ–ˆ β–„β–ˆ β–„β–„β–„β–ˆβ–€ β–„β–„ β–ˆβ–ˆβ–„β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ FAQ's: "; Blue "https://github.com/fleschutz/PowerShell/blob/main/docs/FAQ.md`n" + White "β–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–„ β–„β–€β–€β–ˆβ–ˆ β–„β–ˆ β–„β–„β–„β–ˆβ–€ β–„β–„ β–ˆβ–ˆβ–„β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ Cheat sheet: "; Blue "https://github.com/fleschutz/PowerShell/blob/main/docs/cheat-sheet.md`n" White "β–ˆβ–ˆβ–ˆβ–ˆβ–„β–ˆβ–„β–ˆβ–ˆβ–ˆβ–„β–„β–€β–„β–„β–„β–€ β–„β–„ β–„β–€β–„ β–„β–„β–„ β–€ β–ˆβ–ˆβ–ˆβ–ˆ`n" - White "β–ˆβ–ˆβ–ˆβ–ˆ β–„β–„β–„β–„β–„ β–ˆβ–„β–„β–„β–ˆβ–€β–ˆβ–„ β–ˆβ–ˆ β–ˆβ–„β–ˆ β–„β–„β–ˆβ–€β–ˆβ–ˆβ–ˆβ–ˆ 500+ sample scripts: "; Blue "https://github.com/fleschutz/PowerShell`n" + White "β–ˆβ–ˆβ–ˆβ–ˆ β–„β–„β–„β–„β–„ β–ˆβ–„β–„β–„β–ˆβ–€β–ˆβ–„ β–ˆβ–ˆ β–ˆβ–„β–ˆ β–„β–„β–ˆβ–€β–ˆβ–ˆβ–ˆβ–ˆ Sample scripts: "; Blue "https://github.com/fleschutz/PowerShell`n" White "β–ˆβ–ˆβ–ˆβ–ˆ β–ˆ β–ˆ β–ˆ β–€β–„β–ˆβ–„ β–„β–„ β–€β–ˆ β–„β–„β–„β–„β–€ β–ˆβ–ˆβ–ˆβ–ˆ`n" - White "β–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–„β–„β–„β–ˆ β–ˆ β–ˆβ–ˆ β–„β–ˆβ–„ β–„β–€β–€β–€ β–„β–„ β–„ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ Cheat sheet: "; Blue "https://github.com/fleschutz/PowerShell/blob/main/docs/cheat-sheet.md`n" + White "β–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–„β–„β–„β–ˆ β–ˆ β–ˆβ–ˆ β–„β–ˆβ–„ β–„β–€β–€β–€ β–„β–„ β–„ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ Type 'Get-Help ' to display information about `n" White "β–ˆβ–ˆβ–ˆβ–ˆβ–„β–„β–„β–„β–„β–„β–„β–ˆβ–„β–„β–ˆβ–„β–„β–ˆβ–ˆβ–ˆβ–ˆβ–„β–„β–„β–ˆβ–ˆβ–„β–„β–„β–ˆβ–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ`n" - White "β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ NOTE: use + to open the links in your browser.`n" + White "β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ HINT: press + to follow the links.`n" White "β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ`n" exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptWhiteNumber): $($Error[0])" + "⚠️ ERROR: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)." exit 1 } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-in-emojis.md b/docs/write-in-emojis.md index e8280afb..054dfd73 100644 --- a/docs/write-in-emojis.md +++ b/docs/write-in-emojis.md @@ -75,4 +75,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-joke.md b/docs/write-joke.md index 2d414042..6e590a40 100644 --- a/docs/write-joke.md +++ b/docs/write-joke.md @@ -61,4 +61,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-location.md b/docs/write-location.md index 30993af0..b5240531 100644 --- a/docs/write-location.md +++ b/docs/write-location.md @@ -62,4 +62,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-lowercase.md b/docs/write-lowercase.md index 657d3e9b..9fcfbbae 100644 --- a/docs/write-lowercase.md +++ b/docs/write-lowercase.md @@ -66,4 +66,4 @@ Write-Output $text.ToLower() exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-marquee.md b/docs/write-marquee.md index 65098313..3140bb18 100644 --- a/docs/write-marquee.md +++ b/docs/write-marquee.md @@ -91,4 +91,4 @@ StartMarquee " exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-matrix.md b/docs/write-matrix.md index c704207b..75c70c07 100644 --- a/docs/write-matrix.md +++ b/docs/write-matrix.md @@ -81,4 +81,4 @@ exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-moon.md b/docs/write-moon.md index 780d58a0..19db2441 100644 --- a/docs/write-moon.md +++ b/docs/write-moon.md @@ -53,4 +53,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-morse-code.md b/docs/write-morse-code.md index 0e72530d..a99c0218 100644 --- a/docs/write-morse-code.md +++ b/docs/write-morse-code.md @@ -155,4 +155,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-motd.md b/docs/write-motd.md index ad14d524..64561f8f 100644 --- a/docs/write-motd.md +++ b/docs/write-motd.md @@ -140,4 +140,4 @@ Write-Host " 'VEzjt:;;z>*`` " -ForegroundColor Yellow exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-pi.md b/docs/write-pi.md index e5a07093..4faefea8 100644 --- a/docs/write-pi.md +++ b/docs/write-pi.md @@ -118,4 +118,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-progress-bar.md b/docs/write-progress-bar.md index d7e92dbf..74783932 100644 --- a/docs/write-progress-bar.md +++ b/docs/write-progress-bar.md @@ -18,13 +18,12 @@ Script Content -------------- ```powershell $progressBar = @('β£Ύ','β£½','β£»','β’Ώ','β‘Ώ','⣟','β£―','β£·') -$progressIndex = 0 -do { - Write-Host "`r$($progressBar[$progressIndex]) Working on something..." -NoNewline - $progressIndex = ($progressIndex + 1) % $progressBar.Length +for ([int]$i = 0; $i -lt 150; $i++) { + Write-Host "`r$($progressBar[$i % 7]) Working on something..." -NoNewline Start-Sleep -milliseconds 100 -} while ($true) +} +exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-qr-code.md b/docs/write-qr-code.md index 2c545303..0199743e 100644 --- a/docs/write-qr-code.md +++ b/docs/write-qr-code.md @@ -65,4 +65,4 @@ Write-Host " " -foregroundColor black -backgroundCol exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-quote.md b/docs/write-quote.md index 37c123ae..a6fd1aa6 100644 --- a/docs/write-quote.md +++ b/docs/write-quote.md @@ -67,4 +67,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-red.md b/docs/write-red.md index 5214a423..2541cece 100644 --- a/docs/write-red.md +++ b/docs/write-red.md @@ -64,4 +64,4 @@ write-host -foregroundcolor red "$text" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-rot13.md b/docs/write-rot13.md index 5789e428..7f07f875 100644 --- a/docs/write-rot13.md +++ b/docs/write-rot13.md @@ -83,4 +83,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-shit.md b/docs/write-shit.md index ff420a69..378dc3b9 100644 --- a/docs/write-shit.md +++ b/docs/write-shit.md @@ -50,4 +50,4 @@ Write-Output "πŸ’©" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-sine-curves.md b/docs/write-sine-curves.md index 5ccafef4..413fbbf0 100644 --- a/docs/write-sine-curves.md +++ b/docs/write-sine-curves.md @@ -56,4 +56,4 @@ Script Content } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-story.md b/docs/write-story.md index 6cb4463e..3503eba5 100644 --- a/docs/write-story.md +++ b/docs/write-story.md @@ -75,4 +75,4 @@ foreach($line in $story) { exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-time.md b/docs/write-time.md index 0fc68530..cbd7c7bb 100644 --- a/docs/write-time.md +++ b/docs/write-time.md @@ -57,4 +57,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-typewriter.md b/docs/write-typewriter.md index 1f1f3ea1..7e0673bd 100644 --- a/docs/write-typewriter.md +++ b/docs/write-typewriter.md @@ -84,4 +84,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-uppercase.md b/docs/write-uppercase.md index 9352ed7b..e6e60084 100644 --- a/docs/write-uppercase.md +++ b/docs/write-uppercase.md @@ -66,4 +66,4 @@ Write-Output $text.ToUpper() exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-value.md b/docs/write-value.md index 6e024cfb..302fef14 100644 --- a/docs/write-value.md +++ b/docs/write-value.md @@ -106,51 +106,68 @@ Script Content param([float]$value = 0.5, [string]$unit = "Mach", [float]$redMin, [float]$yellowMin, [float]$yellowMax, [float]$redMax) function WriteValueInRange([float]$value, [string]$unit, [float]$redMin, [float]$yellowMin, [float]$yellowMax, [float]$redMax) { - $line = "------------------------------------------------" - $text = "[$redMin$($value)$unit $redMax]" - [float]$total = 20.0 - $text.Length + $line = "--------------------------------------" + $text = "[$redMin$value$unit$redMax]" + [float]$both = 20.0 - $text.Length if ($value -gt $redMax) { - Write-Host "[$redMin$($line.Substring(0, $total))$redMax]" -noNewline - Write-Host "$($value)$unit " -noNewline -foregroundColor red + Write-Host "[$redMin$($line.Substring(0,$both))$redMax]" -noNewline + Write-Host "$value$unit" -noNewline -foregroundColor red } elseif ($value -lt $redMin) { - Write-Host "$($value)$unit" -noNewline -foregroundColor red - Write-Host "[$redMin$($line.Substring(0, $total))$redMax] " -noNewline + Write-Host "$value$unit" -noNewline -foregroundColor red + Write-Host "[$redMin$($line.Substring(0,$both))$redMax] " -noNewline } else { - [float]$leftSide = (($value - $redMin) * $total) / ($redMax - $redMin) - if ($leftSide -lt 1.0) { $leftSide = 1.0 } - if ($leftSide -gt ($total - 1.0)) { $leftSide = $total - 1.0 } - Write-Host "[$redMin$($line.Substring(0, $leftSide))" -noNewline + [float]$left = (($value - $redMin) * $both) / ($redMax - $redMin) + if ($left -lt 1.0) { $left = 1.0 } + elseif ($left -gt ($both - 1.0)) { $left = $both - 1.0 } + [float]$right = $both - $left + Write-Host "[$redMin$($line.Substring(0,$left))" -noNewline if (($value -le $yellowMin) -or ($value -ge $yellowMax)) { - Write-Host "$($value)$unit" -noNewline -foregroundColor yellow + Write-Host "$value$unit" -noNewline -foregroundColor yellow } else { - Write-Host "$($value)$unit" -noNewline -foregroundColor green + Write-Host "$value$unit" -noNewline -foregroundColor green } - Write-Host "$($line.Substring(0, $total - $leftSide + 0.49))$redMax] " -noNewline + Write-Host "$($line.Substring(0,$right))$redMax]" -noNewline } } -WriteValueInRange -3.5 "Β°C" 0 10 90 100 -Write-Host "CPU too cold" +Write-Host "" +Write-Host " TRACK " -noNewline +WriteValueInRange 50.0 "Β°" 0 0 360 360 +Write-Host "" -WriteValueInRange 5 "Β°C" 0 10 90 100 -Write-Host "CPU quite cold" +Write-Host " ALT " -noNewline +WriteValueInRange 800 "m" 0 0 6000 8000 +Write-Host "" -WriteValueInRange 15 "Β°C" 0 10 90 100 -Write-Host "OK" +Write-Host " SPEED " -noNewline +WriteValueInRange 230 "km/h" 0 0 180 200 +Write-Host "" -WriteValueInRange 50 "Β°C" 0 10 90 100 -Write-Host "OK" +Write-Host " BANK " -noNewline +WriteValueInRange -30.3 "Β°" -30 -10 10 30 +Write-Host "" -WriteValueInRange 70 "Β°C" 0 10 90 100 -Write-Host "OK" +Write-Host " ENG " -noNewline +WriteValueInRange 2000 "RPM" 0 0 5000 6000 +Write-Host "" -WriteValueInRange 95 "Β°C" 0 10 90 100 -Write-Host "CPU quite hot " +Write-Host " TEMP " -noNewline +WriteValueInRange 21.8 "Β°C" 0 10 90 100 +Write-Host "" -WriteValueInRange 110 "Β°C" 0 10 90 100 -Write-Host "CPU too hot " +Write-Host " FUEL " -noNewline +WriteValueInRange 0.1 "l" 0 5 60 65 +Write-Host "" + +Write-Host " FREQ " -noNewline +WriteValueInRange 104.4 "MHz" 80 80 108 108 +Write-Host "" + +Write-Host " BRAKE " -noNewline +WriteValueInRange 0.0 "%" 0 -1 90 100 +Write-Host "" exit 0 # success ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-vertical.md b/docs/write-vertical.md index 0b81a292..fdd55090 100644 --- a/docs/write-vertical.md +++ b/docs/write-vertical.md @@ -72,4 +72,4 @@ try { } ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/docs/write-xmas-tree.md b/docs/write-xmas-tree.md index bdf852e5..1a3f0632 100644 --- a/docs/write-xmas-tree.md +++ b/docs/write-xmas-tree.md @@ -132,4 +132,4 @@ do { ``` -*(page generated by convert-ps2md.ps1 as of 06/22/2025 10:37:42)* +*(page generated by convert-ps2md.ps1 as of 08/06/2025 15:18:27)* diff --git a/scripts/calculate-BMI.ps1 b/scripts/calculate-BMI.ps1 old mode 100644 new mode 100755 diff --git a/scripts/copy-broken-file.ps1 b/scripts/copy-broken-file.ps1 old mode 100644 new mode 100755 diff --git a/scripts/open-windy.ps1 b/scripts/open-windy.ps1 old mode 100644 new mode 100755