From aed2b7d940758223e06af1d1f032b59fa9a19cc8 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Wed, 27 Mar 2024 17:36:59 +0100 Subject: [PATCH] Updated the manuals --- docs/add-firewall-rules.md | 2 +- docs/add-memo.md | 2 +- docs/alert.md | 2 +- docs/build-repo.md | 24 +-- docs/build-repos.md | 2 +- docs/cd-autostart.md | 2 +- docs/cd-crashdumps.md | 2 +- docs/cd-desktop.md | 2 +- docs/cd-docs.md | 2 +- docs/cd-downloads.md | 2 +- docs/cd-dropbox.md | 2 +- docs/cd-etc.md | 2 +- docs/cd-fonts.md | 2 +- docs/cd-home.md | 2 +- docs/cd-logs.md | 2 +- docs/cd-music.md | 2 +- docs/cd-onedrive.md | 2 +- docs/cd-pics.md | 2 +- docs/cd-public.md | 2 +- docs/cd-recycle-bin.md | 2 +- docs/cd-repos.md | 56 +++-- docs/cd-root.md | 2 +- docs/cd-screenshots.md | 2 +- docs/cd-scripts.md | 14 +- docs/cd-ssh.md | 2 +- docs/cd-temp.md | 2 +- docs/cd-templates.md | 2 +- docs/cd-trash.md | 2 +- docs/cd-up.md | 2 +- docs/cd-up2.md | 2 +- docs/cd-up3.md | 2 +- docs/cd-up4.md | 2 +- docs/cd-users.md | 2 +- docs/cd-videos.md | 2 +- docs/cd-windows.md | 2 +- 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 | 10 +- docs/check-drives.md | 39 ++-- 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 | 5 +- 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-network.md | 2 +- docs/check-new-year.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-power.md | 4 +- docs/check-powershell.md | 2 +- docs/check-ps1-file.md | 2 +- docs/check-ram.md | 2 +- docs/check-repo.md | 2 +- docs/check-repos.md | 2 +- docs/check-santa.md | 2 +- docs/check-smart-devices.md | 2 +- docs/check-software.md | 5 +- docs/check-subnet-mask.md | 2 +- docs/check-swap-space.md | 66 +++--- docs/check-symlinks.md | 2 +- docs/check-time-zone.md | 2 +- docs/check-uptime.md | 12 +- 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 | 3 +- docs/check-xml-files.md | 20 +- docs/clean-repo.md | 32 +-- docs/clean-repos.md | 2 +- docs/clear-dns-cache.md | 2 +- docs/clear-recycle-bin.md | 2 +- docs/clone-repos.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-note-pad.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-docx2md.md | 2 +- docs/convert-frames2mp4.md | 2 +- docs/convert-image2ascii.md | 2 +- docs/convert-image2blurred-frames.md | 2 +- docs/convert-image2pixelated-frames.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-photos-sorted.md | 5 +- docs/count-lines-of-code.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 | 58 ++++-- docs/enable-crash-dumps.md | 2 +- docs/enable-god-mode.md | 2 +- docs/enable-ipv6.md | 2 +- docs/encrypt-file.md | 2 +- docs/enter-chat.md | 2 +- docs/export-to-manuals.md | 2 +- docs/fetch-repo.md | 2 +- 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/hibernate.md | 2 +- docs/import-vm.md | 2 +- docs/inspect-exe.md | 2 +- docs/install-audacity.md | 2 +- docs/install-basic-apps.md | 2 +- docs/install-basic-snaps.md | 2 +- docs/install-calibre-server.md | 2 +- docs/install-chocolatey.md | 2 +- docs/install-chrome.md | 2 +- docs/install-crystal-disk-info.md | 2 +- docs/install-crystal-disk-mark.md | 2 +- docs/install-discord.md | 2 +- docs/install-edge.md | 2 +- docs/install-evcc.md | 2 +- docs/install-firefox.md | 2 +- docs/install-git-extensions.md | 2 +- docs/install-git-for-windows.md | 2 +- docs/install-github-cli.md | 2 +- docs/install-irfanview.md | 2 +- docs/install-knot-resolver.md | 2 +- docs/install-microsoft-teams.md | 2 +- docs/install-netflix.md | 2 +- docs/install-nine-zip.md | 2 +- docs/install-obs-studio.md | 2 +- docs/install-octoprint.md | 2 +- docs/install-one-calendar.md | 2 +- docs/install-opera-browser.md | 2 +- docs/install-opera-gx.md | 2 +- docs/install-paint-3d.md | 2 +- docs/install-power-toys.md | 2 +- docs/install-powershell.md | 2 +- docs/install-rufus.md | 2 +- docs/install-signal-cli.md | 2 +- docs/install-skype.md | 2 +- docs/install-spotify.md | 2 +- docs/install-ssh-client.md | 2 +- docs/install-ssh-server.md | 2 +- docs/install-thunderbird.md | 2 +- docs/install-twitter.md | 2 +- docs/install-unbound-server.md | 2 +- docs/install-updates.md | 26 ++- docs/install-visual-studio-code.md | 2 +- docs/install-vivaldi.md | 2 +- docs/install-vlc.md | 2 +- docs/install-windows-terminal.md | 2 +- docs/install-wsl.md | 2 +- docs/install-zoom.md | 2 +- docs/introduce-powershell.md | 2 +- 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 | 40 ++-- docs/list-calendar.md | 2 +- docs/list-cheat-sheet.md | 2 +- docs/list-city-weather.md | 2 +- docs/list-cli-tools.md | 2 +- docs/list-clipboard.md | 2 +- docs/list-cmdlets.md | 2 +- docs/list-coffee-prices.md | 2 +- docs/list-commit-stats.md | 2 +- docs/list-commits-live.md | 118 +++++++++++ docs/list-commits.md | 2 +- docs/list-console-colors.md | 2 +- docs/list-countries.md | 2 +- docs/list-cpu.md | 2 +- docs/list-credits.md | 2 +- docs/list-crypto-rates.md | 2 +- docs/list-defender-settings.md | 2 +- docs/list-dir-tree.md | 2 +- docs/list-dns-servers.md | 32 ++- 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 | 22 +- docs/list-fibonacci.md | 2 +- docs/list-files.md | 2 +- docs/list-folder.md | 2 +- 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-languages.md | 2 +- docs/list-installed-scripts.md | 2 +- docs/list-installed-software.md | 2 +- docs/list-ipv6.md | 2 +- docs/list-latest-tag.md | 2 +- docs/list-latest-tags.md | 2 +- docs/list-memos.md | 2 +- docs/list-motherboard.md | 2 +- docs/list-mysql-tables.md | 2 +- docs/list-network-connections.md | 2 +- docs/list-network-routes.md | 2 +- docs/list-network-shares.md | 18 +- docs/list-news.md | 20 +- docs/list-nic.md | 2 +- docs/list-nina-warnings.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-pi.md | 2 +- docs/list-pins.md | 2 +- docs/list-power-schemes.md | 2 +- docs/list-powershell-modules.md | 68 +++++++ docs/list-powershell-profiles.md | 61 ++++++ docs/list-powershell-verbs.md | 68 +++++++ docs/list-print-jobs.md | 2 +- docs/list-printers.md | 2 +- docs/list-processes.md | 2 +- docs/list-public-ip.md | 10 +- 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 | 52 ++--- docs/list-scripts.md | 2 +- docs/list-services.md | 2 +- docs/list-special-folders.md | 2 +- docs/list-sql-tables.md | 2 +- docs/list-submodules.md | 2 +- docs/list-suggestions.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 | 23 ++- docs/list-user-accounts.md | 2 +- docs/list-user-groups.md | 2 +- docs/list-voices.md | 2 +- docs/list-weather.md | 9 +- 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 | 4 +- docs/new-branch.md | 62 +++--- docs/new-email.md | 2 +- docs/new-linux-vm.md | 2 +- docs/new-qrcode.md | 2 +- docs/new-script.md | 2 +- docs/new-shortcut.md | 2 +- docs/new-symlink.md | 2 +- docs/new-tag.md | 2 +- docs/new-user.md | 2 +- docs/new-windows-vm.md | 2 +- docs/new-zipfile.md | 2 +- docs/on-desktop-login.md | 11 +- docs/open-apps-folder.md | 2 +- docs/open-auto-start-folder.md | 2 +- docs/open-bing-maps.md | 2 +- docs/open-booking-com.md | 2 +- docs/open-c-drive.md | 2 +- docs/open-calculator.md | 2 +- docs/open-chrome.md | 2 +- docs/open-clock.md | 2 +- docs/open-cortana.md | 2 +- docs/open-d-drive.md | 2 +- docs/open-dashboards.md | 31 ++- docs/open-deep-l-translator.md | 2 +- docs/open-default-browser.md | 2 +- docs/open-desktop-folder.md | 2 +- docs/open-documents-folder.md | 2 +- docs/open-downloads-folder.md | 2 +- docs/open-dropbox-folder.md | 2 +- docs/open-duck-duck-go.md | 2 +- docs/open-e-drive.md | 2 +- docs/open-edge.md | 2 +- docs/open-egg-timer.md | 2 +- docs/open-email-client.md | 2 +- docs/open-f-drive.md | 2 +- docs/open-file-explorer.md | 2 +- docs/open-fire-place.md | 2 +- docs/open-firefox.md | 2 +- docs/open-flight-radar.md | 2 +- docs/open-g-drive.md | 2 +- docs/open-git-extensions.md | 2 +- docs/open-google-books.md | 2 +- docs/open-google-calendar.md | 2 +- docs/open-google-contacts.md | 2 +- docs/open-google-docs.md | 2 +- docs/open-google-earth.md | 2 +- docs/open-google-mail.md | 2 +- docs/open-google-maps.md | 2 +- docs/open-google-news.md | 2 +- docs/open-google-photos.md | 2 +- docs/open-google-play.md | 2 +- docs/open-google-search.md | 2 +- docs/open-google-stadia.md | 2 +- docs/open-google-translate.md | 2 +- docs/open-home-folder.md | 2 +- docs/open-internet-archive.md | 2 +- docs/open-jitsi-meet.md | 2 +- docs/open-m-drive.md | 2 +- docs/open-magnifier.md | 2 +- docs/open-microsoft-paint.md | 2 +- docs/open-microsoft-solitaire.md | 2 +- docs/open-microsoft-store.md | 2 +- docs/open-microsoft-teams.md | 2 +- docs/open-music-folder.md | 2 +- docs/open-netflix.md | 2 +- docs/open-note-pad.md | 2 +- docs/open-obs-studio.md | 2 +- docs/open-office-365.md | 2 +- docs/open-one-drive-folder.md | 2 +- docs/open-outlook.md | 2 +- docs/open-paint-three-d.md | 2 +- docs/open-pictures-folder.md | 2 +- docs/open-rdp.md | 2 +- docs/open-recycle-bin-folder.md | 2 +- docs/open-remote-desktop.md | 2 +- docs/open-repos-folder.md | 2 +- docs/open-screen-clip.md | 2 +- docs/open-screen-sketch.md | 2 +- docs/open-skype.md | 2 +- docs/open-snipping-tool.md | 2 +- docs/open-speed-test.md | 2 +- docs/open-spotify.md | 2 +- docs/open-stack-overflow.md | 2 +- docs/open-start-page.md | 2 +- docs/open-street-map.md | 2 +- docs/open-task-manager.md | 2 +- docs/open-temporary-folder.md | 2 +- docs/open-three-d-viewer.md | 2 +- docs/open-thunderbird.md | 2 +- docs/open-videos-folders.md | 2 +- docs/open-visual-studio.md | 2 +- docs/open-vpn-settings.md | 2 +- docs/open-windows-defender.md | 2 +- docs/open-windows-terminal.md | 2 +- docs/open-xing.md | 2 +- docs/pick-commit.md | 2 +- docs/ping-host.md | 135 ++++++++++++ docs/ping-local-hosts.md | 35 ++-- docs/ping-remote-hosts.md | 2 +- docs/ping-weather.md | 2 +- docs/play-bee-sound.md | 2 +- docs/play-beep-sound.md | 2 +- docs/play-cat-sound.md | 2 +- docs/play-cow-sound.md | 2 +- docs/play-dog-sound.md | 2 +- docs/play-donkey-sound.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-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 | 2 +- docs/pull-repos.md | 15 +- docs/query-smart-data.md | 2 +- docs/reboot-fritzbox.md | 2 +- docs/reboot.md | 2 +- docs/remind-me.md | 2 +- docs/remove-dir-tree.md | 72 +++++++ 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-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-ports.md | 2 +- docs/search-filename.md | 2 +- docs/search-files.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.md | 2 +- docs/show-traffic.md | 2 +- docs/simulate-presence.md | 2 +- docs/smart-data2csv.md | 2 +- docs/speak-arabic.md | 2 +- docs/speak-checklist.md | 2 +- docs/speak-countdown.md | 2 +- docs/speak-croatian.md | 2 +- docs/speak-danish.md | 2 +- docs/speak-dutch.md | 2 +- docs/speak-english.md | 2 +- docs/speak-epub.md | 2 +- docs/speak-esperanto.md | 2 +- docs/speak-file.md | 2 +- docs/speak-finnish.md | 2 +- docs/speak-french.md | 2 +- docs/speak-german.md | 2 +- docs/speak-greek.md | 2 +- docs/speak-hebrew.md | 2 +- docs/speak-hindi.md | 2 +- docs/speak-italian.md | 2 +- docs/speak-japanese.md | 2 +- docs/speak-korean.md | 2 +- docs/speak-latin.md | 2 +- docs/speak-mandarin.md | 2 +- docs/speak-norwegian.md | 2 +- docs/speak-polish.md | 2 +- docs/speak-portuguese.md | 2 +- docs/speak-russian.md | 2 +- docs/speak-spanish.md | 2 +- docs/speak-swedish.md | 2 +- docs/speak-test.md | 2 +- docs/speak-text.md | 2 +- docs/speak-thai.md | 2 +- docs/speak-turkish.md | 2 +- docs/speak-ukrainian.md | 2 +- docs/spell-word.md | 2 +- docs/start-ipfs-server.md | 2 +- docs/suspend.md | 2 +- docs/switch-branch.md | 70 +++---- docs/switch-shelly1.md | 2 +- docs/switch-tabs.md | 38 ++-- docs/sync-folder.md | 2 +- docs/sync-repo.md | 2 +- docs/tell-joke.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/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-chrome.md | 2 +- docs/uninstall-crystal-disk-info.md | 2 +- docs/uninstall-crystal-disk-mark.md | 2 +- docs/uninstall-discord.md | 2 +- docs/uninstall-edge.md | 2 +- docs/uninstall-firefox.md | 2 +- docs/uninstall-git-extensions.md | 2 +- docs/uninstall-github-cli.md | 2 +- docs/uninstall-irfanview.md | 2 +- docs/uninstall-microsoft-teams.md | 2 +- docs/uninstall-netflix.md | 2 +- docs/uninstall-nine-zip.md | 2 +- docs/uninstall-one-calendar.md | 2 +- docs/uninstall-opera-browser.md | 2 +- docs/uninstall-opera-gx.md | 2 +- docs/uninstall-paint-3d.md | 2 +- docs/uninstall-rufus.md | 2 +- docs/uninstall-skype.md | 2 +- docs/uninstall-spotify.md | 2 +- docs/uninstall-twitter.md | 2 +- docs/uninstall-visual-studio-code.md | 2 +- docs/uninstall-vlc.md | 2 +- docs/uninstall-windows-terminal.md | 2 +- docs/upgrade-ubuntu.md | 2 +- docs/upload-file.md | 2 +- docs/upload-to-dropbox.md | 2 +- docs/wake-up.md | 2 +- docs/watch-file.md | 2 +- docs/weather-report.md | 2 +- docs/weather.md | 2 +- docs/what-is.md | 30 +-- docs/windefender.md | 2 +- docs/write-animated.md | 2 +- docs/write-ascii-image.md | 2 +- docs/write-big.md | 272 +++++++++++++------------ docs/write-blue.md | 2 +- docs/write-braille.md | 2 +- docs/write-changelog.md | 2 +- docs/write-chart.md | 6 +- docs/write-clock.md | 2 +- docs/write-code.md | 2 +- docs/write-date.md | 2 +- docs/write-fractal.md | 2 +- docs/write-green.md | 2 +- docs/write-in-emojis.md | 2 +- docs/write-joke.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-powershell-profile.md | 39 +++- 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-time.md | 2 +- docs/write-typewriter.md | 2 +- docs/write-uppercase.md | 2 +- docs/write-vertical.md | 2 +- 610 files changed, 1754 insertions(+), 1120 deletions(-) create mode 100644 docs/list-commits-live.md create mode 100644 docs/list-powershell-modules.md create mode 100644 docs/list-powershell-profiles.md create mode 100644 docs/list-powershell-verbs.md create mode 100644 docs/ping-host.md create mode 100644 docs/remove-dir-tree.md diff --git a/docs/add-firewall-rules.md b/docs/add-firewall-rules.md index 53ef9bd5..b95b5347 100644 --- a/docs/add-firewall-rules.md +++ b/docs/add-firewall-rules.md @@ -113,4 +113,4 @@ try { ``` -*(generated by convert-ps2md.ps1 using the comment-based help of add-firewall-rules.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of add-firewall-rules.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/add-memo.md b/docs/add-memo.md index 3651f11a..0dd3af40 100644 --- a/docs/add-memo.md +++ b/docs/add-memo.md @@ -79,4 +79,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of add-memo.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of add-memo.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/alert.md b/docs/alert.md index e4308fd3..5e9d46e3 100644 --- a/docs/alert.md +++ b/docs/alert.md @@ -71,4 +71,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of alert.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of alert.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/build-repo.md b/docs/build-repo.md index 38447b66..3e3692c1 100644 --- a/docs/build-repo.md +++ b/docs/build-repo.md @@ -9,7 +9,7 @@ Parameters PS> ./build-repo.ps1 [[-path] ] [] -path - Specifies the path to the Git repository (current working dir by default) + Specifies the path to the Git repository (default is current working directory) Required? false Position? 1 @@ -26,9 +26,9 @@ Example ------- ```powershell PS> ./build-repo.ps1 C:\Repos\ninja -⏳ Building πŸ“‚ninja using CMakeLists.txt into πŸ“‚ninja/_My_Build... +⏳ Building πŸ“‚ninja using CMakeLists.txt into πŸ“‚ninja/_Build_Results... ... -βœ”οΈ Built πŸ“‚ninja in 47 sec +βœ”οΈ Built πŸ“‚ninja repository in 47 sec. ``` @@ -49,12 +49,12 @@ Script Content .DESCRIPTION This PowerShell script builds a Git repository by supporting build systems such as: autogen, cmake, configure, Gradle, Imakefile, Makefile, and Meson. .PARAMETER path - Specifies the path to the Git repository (current working dir by default) + Specifies the path to the Git repository (default is current working directory) .EXAMPLE PS> ./build-repo.ps1 C:\Repos\ninja - ⏳ Building πŸ“‚ninja using CMakeLists.txt into πŸ“‚ninja/_My_Build... + ⏳ Building πŸ“‚ninja using CMakeLists.txt into πŸ“‚ninja/_Build_Results... ... - βœ”οΈ Built πŸ“‚ninja in 47 sec + βœ”οΈ Built πŸ“‚ninja repository in 47 sec. .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -66,11 +66,11 @@ param([string]$path = "$PWD") function BuildInDir([string]$path) { $dirName = (Get-Item "$path").Name if (Test-Path "$path/CMakeLists.txt" -pathType leaf) { - "⏳ (1/4) Building πŸ“‚$dirName by using CMake into πŸ“‚$dirName/_My_Build..." - if (-not(Test-Path "$path/_My_Build/" -pathType container)) { - & mkdir "$path/_My_Build/" + "⏳ (1/4) Building πŸ“‚$dirName by using CMake into πŸ“‚$dirName/_Build_Results..." + if (-not(Test-Path "$path/_Build_Results/" -pathType container)) { + & mkdir "$path/_Build_Results/" } - Set-Location "$path/_My_Build/" + Set-Location "$path/_Build_Results/" "⏳ (2/4) Executing 'cmake' to generate the Makefile..." & cmake .. @@ -184,7 +184,7 @@ try { $repoDirName = (Get-Item "$path").Name [int]$elapsed = $stopWatch.Elapsed.TotalSeconds - "βœ”οΈ Built repo πŸ“‚$repoDirName in $elapsed sec" + "βœ”οΈ Built πŸ“‚$repoDirName repository in $elapsed sec." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -192,4 +192,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of build-repo.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of build-repo.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/build-repos.md b/docs/build-repos.md index 5a39d213..13dc78dd 100644 --- a/docs/build-repos.md +++ b/docs/build-repos.md @@ -82,4 +82,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of build-repos.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of build-repos.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-autostart.md b/docs/cd-autostart.md index 66f943bd..3e871a0d 100644 --- a/docs/cd-autostart.md +++ b/docs/cd-autostart.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-autostart.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-autostart.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-crashdumps.md b/docs/cd-crashdumps.md index 0f4593f7..22ca46d9 100644 --- a/docs/cd-crashdumps.md +++ b/docs/cd-crashdumps.md @@ -63,4 +63,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-crashdumps.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-crashdumps.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-desktop.md b/docs/cd-desktop.md index fa472f60..10e5626a 100644 --- a/docs/cd-desktop.md +++ b/docs/cd-desktop.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-desktop.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-desktop.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-docs.md b/docs/cd-docs.md index e5cb11d7..53b66562 100644 --- a/docs/cd-docs.md +++ b/docs/cd-docs.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-docs.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-docs.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-downloads.md b/docs/cd-downloads.md index 97024065..f43449e5 100644 --- a/docs/cd-downloads.md +++ b/docs/cd-downloads.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-downloads.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-downloads.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-dropbox.md b/docs/cd-dropbox.md index 89283971..97276d75 100644 --- a/docs/cd-dropbox.md +++ b/docs/cd-dropbox.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-dropbox.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-dropbox.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-etc.md b/docs/cd-etc.md index cb1fbdf6..786b8ec5 100644 --- a/docs/cd-etc.md +++ b/docs/cd-etc.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-etc.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-etc.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-fonts.md b/docs/cd-fonts.md index e1f1b5d8..578860d8 100644 --- a/docs/cd-fonts.md +++ b/docs/cd-fonts.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-fonts.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-fonts.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-home.md b/docs/cd-home.md index f838fbf9..73ba2a84 100644 --- a/docs/cd-home.md +++ b/docs/cd-home.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-home.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-home.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-logs.md b/docs/cd-logs.md index 8a45d492..0c3296d9 100644 --- a/docs/cd-logs.md +++ b/docs/cd-logs.md @@ -48,4 +48,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-logs.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-logs.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-music.md b/docs/cd-music.md index 6e1b4956..1f7b6279 100644 --- a/docs/cd-music.md +++ b/docs/cd-music.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-music.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-music.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-onedrive.md b/docs/cd-onedrive.md index 2aa17381..2d0b1b9f 100644 --- a/docs/cd-onedrive.md +++ b/docs/cd-onedrive.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-onedrive.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-onedrive.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-pics.md b/docs/cd-pics.md index 849fb134..954e12b2 100644 --- a/docs/cd-pics.md +++ b/docs/cd-pics.md @@ -62,4 +62,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-pics.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-pics.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-public.md b/docs/cd-public.md index e10e7c32..91c361be 100644 --- a/docs/cd-public.md +++ b/docs/cd-public.md @@ -62,4 +62,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-public.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-public.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-recycle-bin.md b/docs/cd-recycle-bin.md index 5800aa85..ae91c10b 100644 --- a/docs/cd-recycle-bin.md +++ b/docs/cd-recycle-bin.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-recycle-bin.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-recycle-bin.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-repos.md b/docs/cd-repos.md index 12616f6a..3201d2d7 100644 --- a/docs/cd-repos.md +++ b/docs/cd-repos.md @@ -6,9 +6,9 @@ This PowerShell script changes the working directory to the user's Git repositor Parameters ---------- ```powershell -PS> ./cd-repos.ps1 [[-Subpath] ] [] +PS> ./cd-repos.ps1 [[-subpath] ] [] --Subpath +-subpath Specifies an additional relative subpath (optional) Required? false @@ -26,7 +26,13 @@ Example ------- ```powershell PS> ./cd-repos -πŸ“‚C:\Users\Markus\source\Repos +πŸ“‚C:\Users\Markus\Repos + + + +PS> ./cd-repos rust +πŸ“‚C:\Users\Markus\Repos\rust + on branch: ## main ... origin/main ``` @@ -46,33 +52,47 @@ Script Content Sets the working directory to the user's repos folder .DESCRIPTION This PowerShell script changes the working directory to the user's Git repositories folder. -.PARAMETER Subpath +.PARAMETER subpath Specifies an additional relative subpath (optional) .EXAMPLE PS> ./cd-repos - πŸ“‚C:\Users\Markus\source\Repos + πŸ“‚C:\Users\Markus\Repos + + PS> ./cd-repos rust + πŸ“‚C:\Users\Markus\Repos\rust + on branch: ## main ... origin/main .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$Subpath = "") +param([string]$subpath = "") try { - if (Test-Path "$HOME/Repos" -pathType Container) { # try short name - $Path = "$HOME/Repos/$Subpath" - } elseif (Test-Path "$HOME/Repositories" -pathType Container) { # try long name - $Path = "$HOME/Repositories/$Subpath" - } elseif (Test-Path "$HOME/source/repos" -pathType Container) { # try Visual Studio default - $Path = "$HOME/source/repos/$Subpath" + if (Test-Path "$HOME/Repos/" -pathType Container) { # try short name + $path = "$HOME/Repos/" + } elseif (Test-Path "$HOME/repos/" -pathType Container) { + $path = "$HOME/repos/" + } elseif (Test-Path "$HOME/Repositories/" -pathType Container) { # try long name + $path = "$HOME/Repositories/" + } elseif (Test-Path "$HOME/source/repos/" -pathType Container) { # try Visual Studio default + $path = "$HOME/source/repos/" + } elseif (Test-Path "/Repos/" -pathType Container) { + $path = "/Repos/" } else { - throw "The folder for Git repositories in your home directory doesn't exist (yet)." + throw "The folder for Git repositories doesn't exist (yet)" + } + if ("$subpath" -ne "") { $path += $subpath } + if (-not(Test-Path "$path" -pathType Container)) { throw "The path to πŸ“‚$path doesn't exist (yet)" } + $path = Resolve-Path "$path" + Set-Location "$path" + "πŸ“‚$path" + + if ("$subpath" -ne "") { + Write-Host -noNewline " on branch: " + & git status --short --branch --show-stash } - if (-not(Test-Path "$Path" -pathType Container)) { throw "The path to πŸ“‚$Path doesn't exist (yet)." } - $Path = Resolve-Path "$Path" - Set-Location "$Path" - "πŸ“‚$Path" exit 0 # success } catch { "⚠️ Error: $($Error[0])" @@ -80,4 +100,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-repos.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-repos.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-root.md b/docs/cd-root.md index d05da752..fed7e7d0 100644 --- a/docs/cd-root.md +++ b/docs/cd-root.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-root.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-root.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-screenshots.md b/docs/cd-screenshots.md index 53b998c6..3baaf723 100644 --- a/docs/cd-screenshots.md +++ b/docs/cd-screenshots.md @@ -55,4 +55,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-screenshots.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-screenshots.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-scripts.md b/docs/cd-scripts.md index 99f977e1..2bbc6dbe 100644 --- a/docs/cd-scripts.md +++ b/docs/cd-scripts.md @@ -17,7 +17,7 @@ Example ------- ```powershell PS> ./cd-scripts -πŸ“‚C:\Users\Markus\source\repos\PowerShell\scripts +πŸ“‚C:\Users\Markus\Repos\PowerShell\scripts ``` @@ -39,7 +39,7 @@ Script Content This PowerShell script changes the working directory to the PowerShell scripts folder. .EXAMPLE PS> ./cd-scripts - πŸ“‚C:\Users\Markus\source\repos\PowerShell\scripts + πŸ“‚C:\Users\Markus\Repos\PowerShell\scripts .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -47,10 +47,10 @@ Script Content #> try { - $Path = Resolve-Path "$PSScriptRoot" - if (-not(Test-Path "$Path" -pathType container)) { throw "PowerShell scripts folder at πŸ“‚$Path doesn't exist (yet)" } - Set-Location "$Path" - "πŸ“‚$Path" + $path = Resolve-Path "$PSScriptRoot" + if (-not(Test-Path "$path" -pathType container)) { throw "PowerShell scripts folder at πŸ“‚$path doesn't exist (yet)" } + Set-Location "$path" + "πŸ“‚$path" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-scripts.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-scripts.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-ssh.md b/docs/cd-ssh.md index 6e52e39f..679e16da 100644 --- a/docs/cd-ssh.md +++ b/docs/cd-ssh.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-ssh.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-ssh.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-temp.md b/docs/cd-temp.md index f4d6872f..e5a29685 100644 --- a/docs/cd-temp.md +++ b/docs/cd-temp.md @@ -50,4 +50,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-temp.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-temp.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-templates.md b/docs/cd-templates.md index 2a7489e8..763a5ec8 100644 --- a/docs/cd-templates.md +++ b/docs/cd-templates.md @@ -62,4 +62,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-templates.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-templates.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-trash.md b/docs/cd-trash.md index 6cab95e1..0d4d02e2 100644 --- a/docs/cd-trash.md +++ b/docs/cd-trash.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-trash.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-trash.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-up.md b/docs/cd-up.md index 89e082aa..1e8d81c2 100644 --- a/docs/cd-up.md +++ b/docs/cd-up.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-up.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-up.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-up2.md b/docs/cd-up2.md index e8328a60..ffb34a8b 100644 --- a/docs/cd-up2.md +++ b/docs/cd-up2.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-up2.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-up2.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-up3.md b/docs/cd-up3.md index 2f1770cb..23590763 100644 --- a/docs/cd-up3.md +++ b/docs/cd-up3.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-up3.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-up3.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-up4.md b/docs/cd-up4.md index 7563fb1e..fa16fd41 100644 --- a/docs/cd-up4.md +++ b/docs/cd-up4.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-up4.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-up4.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-users.md b/docs/cd-users.md index 7344fc10..a3d2210a 100644 --- a/docs/cd-users.md +++ b/docs/cd-users.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-users.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-users.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-videos.md b/docs/cd-videos.md index 6231b9fd..85b2d03b 100644 --- a/docs/cd-videos.md +++ b/docs/cd-videos.md @@ -62,4 +62,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-videos.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-videos.ps1 as of 03/27/2024 17:36:23)* diff --git a/docs/cd-windows.md b/docs/cd-windows.md index fd39a81d..8293f897 100644 --- a/docs/cd-windows.md +++ b/docs/cd-windows.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-windows.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-windows.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/change-wallpaper.md b/docs/change-wallpaper.md index a8326c94..14362661 100644 --- a/docs/change-wallpaper.md +++ b/docs/change-wallpaper.md @@ -79,4 +79,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of change-wallpaper.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of change-wallpaper.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-admin.md b/docs/check-admin.md index b1ecea64..34787d9f 100644 --- a/docs/check-admin.md +++ b/docs/check-admin.md @@ -67,4 +67,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-admin.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-admin.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-apps.md b/docs/check-apps.md index c814d8aa..9ff3e90d 100644 --- a/docs/check-apps.md +++ b/docs/check-apps.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-apps.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-apps.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-bios.md b/docs/check-bios.md index 66b05380..7d920b75 100644 --- a/docs/check-bios.md +++ b/docs/check-bios.md @@ -76,4 +76,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-bios.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-bios.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-cpu.md b/docs/check-cpu.md index 6ac407e4..fbb8ebe4 100644 --- a/docs/check-cpu.md +++ b/docs/check-cpu.md @@ -101,4 +101,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-cpu.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-cpu.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-credentials.md b/docs/check-credentials.md index 289c79a2..d3ce3e63 100644 --- a/docs/check-credentials.md +++ b/docs/check-credentials.md @@ -82,4 +82,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-credentials.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-credentials.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-day.md b/docs/check-day.md index e24ef06c..d6bfb909 100644 --- a/docs/check-day.md +++ b/docs/check-day.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-day.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-day.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-dns.md b/docs/check-dns.md index 39215ba1..1a9d92de 100644 --- a/docs/check-dns.md +++ b/docs/check-dns.md @@ -73,4 +73,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-dns.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-dns.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-drive-space.md b/docs/check-drive-space.md index c6b59a95..d02b894c 100644 --- a/docs/check-drive-space.md +++ b/docs/check-drive-space.md @@ -35,7 +35,7 @@ Example ------- ```powershell PS> ./check-drive-space.ps1 C -βœ… Drive C: uses 56%, 442GB free of 999GB +βœ… Drive C: has 442GB free (56% of 1TB used) ``` @@ -61,7 +61,7 @@ Script Content Specifies the minimum level in bytes (10GB by default) .EXAMPLE PS> ./check-drive-space.ps1 C - βœ… Drive C: uses 56%, 442GB free of 999GB + βœ… Drive C: has 442GB free (56% of 1TB used) .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -100,8 +100,8 @@ try { } elseif ($free -lt $minLevel) { Write-Host "⚠️ Drive $driveName with $(Bytes2String $total) is nearly full, $(Bytes2String $free) free" } else { - [int]$percent = ($used * 100) / $total - Write-Host "βœ… Drive $driveName uses $percent%, $(Bytes2String $free) free of $(Bytes2String $total)" + [int64]$percent = ($used * 100) / $total + Write-Host "βœ… Drive $driveName has $(Bytes2String $free) free ($percent% of $(Bytes2String $total) used)" } exit 0 # success } catch { @@ -110,4 +110,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-drive-space.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-drive-space.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-drives.md b/docs/check-drives.md index 5800682b..2351be17 100644 --- a/docs/check-drives.md +++ b/docs/check-drives.md @@ -9,7 +9,7 @@ Parameters PS> ./check-drives.ps1 [[-minLevel] ] [] -minLevel - Specifies the minimum warning level (10 GB by default) + Specifies the minimum warning level (10GB by default) Required? false Position? 1 @@ -26,8 +26,8 @@ Example ------- ```powershell PS> ./check-drives.ps1 -βœ… Drive C: uses 49%, 512GB free of 1TB -βœ… Drive D: uses 84%, 641GB free of 4TB +βœ… Drive C: has 512GB free (49% of 1TB used) +βœ… Drive D: has 641GB free (84% of 4TB used) ``` @@ -48,11 +48,11 @@ Script Content .DESCRIPTION This PowerShell script queries the free space of all drives and prints it. .PARAMETER minLevel - Specifies the minimum warning level (10 GB by default) + Specifies the minimum warning level (10GB by default) .EXAMPLE PS> ./check-drives.ps1 - βœ… Drive C: uses 49%, 512GB free of 1TB - βœ… Drive D: uses 84%, 641GB free of 4TB + βœ… Drive C: has 512GB free (49% of 1TB used) + βœ… Drive D: has 641GB free (84% of 4TB used) .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -61,24 +61,19 @@ Script Content param([int64]$minLevel = 10) # 10 GB minimum -function Bytes2String { param([int64]$bytes) - if ($bytes -lt 1000) { return "$bytes bytes" } - $bytes /= 1000 - if ($bytes -lt 1000) { return "$($bytes)KB" } - $bytes /= 1000 - if ($bytes -lt 1000) { return "$($bytes)MB" } - $bytes /= 1000 - if ($bytes -lt 1000) { return "$($bytes)GB" } - $bytes /= 1000 - if ($bytes -lt 1000) { return "$($bytes)TB" } - $bytes /= 1000 - return "$($bytes)PB" +function Bytes2String { param([int64]$number) + if ($number -lt 1KB) { return "$number bytes" } + if ($number -lt 1MB) { return '{0:N0}KB' -f ($number / 1KB) } + if ($number -lt 1GB) { return '{0:N0}MB' -f ($number / 1MB) } + if ($number -lt 1TB) { return '{0:N0}GB' -f ($number / 1GB) } + if ($number -lt 1PB) { return '{0:N0}TB' -f ($number / 1TB) } + return '{0:N0}GB' -f ($number / 1PB) } try { Write-Progress "Querying drives..." $drives = Get-PSDrive -PSProvider FileSystem - $minLevel *= 1000 * 1000 * 1000 + $minLevel *= 1GB Write-Progress -completed " " foreach($drive in $drives) { $details = (Get-PSDrive $drive.Name) @@ -94,8 +89,8 @@ try { } elseif ($free -lt $minLevel) { Write-Host "⚠️ Drive $name with $(Bytes2String $total) is nearly full, $(Bytes2String $free) free" } else { - [int]$percent = ($used * 100) / $total - Write-Host "βœ… Drive $name uses $percent%, $(Bytes2String $free) free of $(Bytes2String $total)" + [int64]$percent = ($used * 100) / $total + Write-Host "βœ… Drive $name has $(Bytes2String $free) free ($percent% of $(Bytes2String $total) used)" } } exit 0 # success @@ -105,4 +100,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-drives.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-drives.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-dusk.md b/docs/check-dusk.md index 2ce2b24d..f9c3449e 100644 --- a/docs/check-dusk.md +++ b/docs/check-dusk.md @@ -63,4 +63,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-dusk.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-dusk.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-easter-sunday.md b/docs/check-easter-sunday.md index 2b7cd0ff..bb5e4683 100644 --- a/docs/check-easter-sunday.md +++ b/docs/check-easter-sunday.md @@ -61,4 +61,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-easter-sunday.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-easter-sunday.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-file-system.md b/docs/check-file-system.md index 58f51ff8..a7d41623 100644 --- a/docs/check-file-system.md +++ b/docs/check-file-system.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-file-system.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-file-system.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-file.md b/docs/check-file.md index c7045fc5..99ccab63 100644 --- a/docs/check-file.md +++ b/docs/check-file.md @@ -170,4 +170,4 @@ function Check-Header { param( $path ) Check-Header $Path ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-file.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-file.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-firewall.md b/docs/check-firewall.md index 47dd4cc3..5b300d12 100644 --- a/docs/check-firewall.md +++ b/docs/check-firewall.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-firewall.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-firewall.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-gpu.md b/docs/check-gpu.md index e691f32f..69d84897 100644 --- a/docs/check-gpu.md +++ b/docs/check-gpu.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-gpu.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-gpu.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-hardware.md b/docs/check-hardware.md index beb716b1..d4a98b8a 100644 --- a/docs/check-hardware.md +++ b/docs/check-hardware.md @@ -57,10 +57,11 @@ Script Content & "$PSScriptRoot/check-cpu.ps1" & "$PSScriptRoot/check-ram.ps1" & "$PSScriptRoot/check-gpu.ps1" +& "$PSScriptRoot/check-bios.ps1" & "$PSScriptRoot/check-smart-devices.ps1" -& "$PSScriptRoot/check-drives.ps1" & "$PSScriptRoot/check-power.ps1" +& "$PSScriptRoot/check-drives.ps1" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-hardware.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-hardware.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-health.md b/docs/check-health.md index 150fed50..90ca2dc4 100644 --- a/docs/check-health.md +++ b/docs/check-health.md @@ -58,4 +58,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-health.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-health.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-independence-day.md b/docs/check-independence-day.md index 31503082..2f802f66 100644 --- a/docs/check-independence-day.md +++ b/docs/check-independence-day.md @@ -61,4 +61,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-independence-day.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-independence-day.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-ipv4-address.md b/docs/check-ipv4-address.md index dc6f1028..d6d38e9d 100644 --- a/docs/check-ipv4-address.md +++ b/docs/check-ipv4-address.md @@ -84,4 +84,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-ipv4-address.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-ipv4-address.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-ipv6-address.md b/docs/check-ipv6-address.md index 99c81e07..1aa8047f 100644 --- a/docs/check-ipv6-address.md +++ b/docs/check-ipv6-address.md @@ -98,4 +98,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-ipv6-address.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-ipv6-address.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-iss-position.md b/docs/check-iss-position.md index f437eaca..5dcf07bc 100644 --- a/docs/check-iss-position.md +++ b/docs/check-iss-position.md @@ -55,4 +55,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-iss-position.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-iss-position.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-mac-address.md b/docs/check-mac-address.md index 7ef41a22..3832b95a 100644 --- a/docs/check-mac-address.md +++ b/docs/check-mac-address.md @@ -87,4 +87,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-mac-address.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-mac-address.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-midnight.md b/docs/check-midnight.md index 63dfefdf..e34607de 100644 --- a/docs/check-midnight.md +++ b/docs/check-midnight.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-midnight.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-midnight.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-month.md b/docs/check-month.md index 5eec5aeb..03cc621e 100644 --- a/docs/check-month.md +++ b/docs/check-month.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-month.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-month.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-moon-phase.md b/docs/check-moon-phase.md index 1d228a89..039471c9 100644 --- a/docs/check-moon-phase.md +++ b/docs/check-moon-phase.md @@ -76,4 +76,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-moon-phase.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-moon-phase.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-network.md b/docs/check-network.md index 8b5cd480..843eeea6 100644 --- a/docs/check-network.md +++ b/docs/check-network.md @@ -65,4 +65,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-network.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-network.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-new-year.md b/docs/check-new-year.md index c1eee0c2..c4ba5d4a 100644 --- a/docs/check-new-year.md +++ b/docs/check-new-year.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-new-year.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-new-year.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-noon.md b/docs/check-noon.md index 38dbc1f8..858b893d 100644 --- a/docs/check-noon.md +++ b/docs/check-noon.md @@ -59,4 +59,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-noon.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-noon.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-os.md b/docs/check-os.md index 5e31f924..ddfc4bdb 100644 --- a/docs/check-os.md +++ b/docs/check-os.md @@ -73,4 +73,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-os.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-os.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-outlook.md b/docs/check-outlook.md index 13f9e995..6acb990c 100644 --- a/docs/check-outlook.md +++ b/docs/check-outlook.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-outlook.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-outlook.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-password.md b/docs/check-password.md index 05834fb2..3aed80bc 100644 --- a/docs/check-password.md +++ b/docs/check-password.md @@ -94,4 +94,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-password.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-password.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-pending-reboot.md b/docs/check-pending-reboot.md index 3ebb810d..10bd6153 100644 --- a/docs/check-pending-reboot.md +++ b/docs/check-pending-reboot.md @@ -92,4 +92,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-pending-reboot.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-pending-reboot.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-power.md b/docs/check-power.md index 3a871010..94f3005f 100644 --- a/docs/check-power.md +++ b/docs/check-power.md @@ -58,7 +58,7 @@ try { if ($details.BatteryChargeStatus -eq "NoSystemBattery") { $reply = "βœ… AC powered" } elseif ($percent -ge 95) { - $reply = "βœ… Battery fully charged ($percent%)" + $reply = "βœ… Battery $percent% full" } else { $reply = "βœ… Battery charging ($percent%)" } @@ -92,4 +92,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-power.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-power.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-powershell.md b/docs/check-powershell.md index 455d31d4..bba3cc09 100644 --- a/docs/check-powershell.md +++ b/docs/check-powershell.md @@ -59,4 +59,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-powershell.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-powershell.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-ps1-file.md b/docs/check-ps1-file.md index b7514e68..bf2a6a7f 100644 --- a/docs/check-ps1-file.md +++ b/docs/check-ps1-file.md @@ -76,4 +76,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-ps1-file.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-ps1-file.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-ram.md b/docs/check-ram.md index 7581b5f6..4b442658 100644 --- a/docs/check-ram.md +++ b/docs/check-ram.md @@ -98,4 +98,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-ram.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-ram.ps1 as of 03/27/2024 17:36:24)* diff --git a/docs/check-repo.md b/docs/check-repo.md index 6c7800d2..2f90de46 100644 --- a/docs/check-repo.md +++ b/docs/check-repo.md @@ -128,4 +128,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-repo.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-repo.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/check-repos.md b/docs/check-repos.md index 37f72100..8bb44615 100644 --- a/docs/check-repos.md +++ b/docs/check-repos.md @@ -82,4 +82,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-repos.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-repos.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/check-santa.md b/docs/check-santa.md index a5d04598..aa6e615c 100644 --- a/docs/check-santa.md +++ b/docs/check-santa.md @@ -56,4 +56,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-santa.ps1 as of 01/25/2024 13:58:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-santa.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/check-smart-devices.md b/docs/check-smart-devices.md index 535c277b..e235787d 100644 --- a/docs/check-smart-devices.md +++ b/docs/check-smart-devices.md @@ -95,4 +95,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-smart-devices.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-smart-devices.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/check-software.md b/docs/check-software.md index 09ec7f9f..9a9beab6 100644 --- a/docs/check-software.md +++ b/docs/check-software.md @@ -21,7 +21,6 @@ PS> ./check-software.ps1 S O F T W A R E -βœ… BIOS model 'P62 v02.67' version HPQOEM - 0 by HP βœ… Windows 10 Pro 64-Bit (v10.0.19045, since 5/2/2021) ... @@ -47,7 +46,6 @@ Script Content PS> ./check-software.ps1 S O F T W A R E - βœ… BIOS model 'P62 v02.67' version HPQOEM - 0 by HP βœ… Windows 10 Pro 64-Bit (v10.0.19045, since 5/2/2021) ... .LINK @@ -58,7 +56,6 @@ Script Content " " & "$PSScriptRoot/write-green.ps1" " S O F T W A R E" -& "$PSScriptRoot/check-bios.ps1" & "$PSScriptRoot/check-os.ps1" & "$PSScriptRoot/check-uptime.ps1" & "$PSScriptRoot/check-apps.ps1" @@ -69,4 +66,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-software.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-software.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/check-subnet-mask.md b/docs/check-subnet-mask.md index 3dbcc18e..78f977f9 100644 --- a/docs/check-subnet-mask.md +++ b/docs/check-subnet-mask.md @@ -84,4 +84,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-subnet-mask.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-subnet-mask.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/check-swap-space.md b/docs/check-swap-space.md index 65131b48..9175f267 100644 --- a/docs/check-swap-space.md +++ b/docs/check-swap-space.md @@ -26,7 +26,7 @@ Example ------- ```powershell PS> ./check-swap-space.ps1 -βœ… Swap space uses 42%, 748MB free of 1GB +βœ… Swap space has 748MB free (42% of 1GB used) ``` @@ -50,7 +50,7 @@ Script Content Specifies the minimum level in GB (10 GB by default) .EXAMPLE PS> ./check-swap-space.ps1 - βœ… Swap space uses 42%, 748MB free of 1GB + βœ… Swap space has 748MB free (42% of 1GB used) .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -59,44 +59,46 @@ Script Content param([int]$minLevel = 10) -function MB2String { param([int64]$Bytes) - if ($Bytes -lt 1000) { return "$($Bytes)MB" } - $Bytes /= 1000 - if ($Bytes -lt 1000) { return "$($Bytes)GB" } - $Bytes /= 1000 - if ($Bytes -lt 1000) { return "$($Bytes)TB" } - $Bytes /= 1000 - if ($Bytes -lt 1000) { return "$($Bytes)PB" } - $Bytes /= 1000 - if ($Bytes -lt 1000) { return "$($Bytes)EB" } +function MB2String { param([int64]$bytes) + if ($bytes -lt 1000) { return "$($bytes)MB" } + $bytes /= 1000 + if ($bytes -lt 1000) { return "$($bytes)GB" } + $bytes /= 1000 + if ($bytes -lt 1000) { return "$($bytes)TB" } + $bytes /= 1000 + if ($bytes -lt 1000) { return "$($bytes)PB" } + $bytes /= 1000 + if ($bytes -lt 1000) { return "$($bytes)EB" } } try { - [int64]$Total = [int64]$Used = [int64]$Free = 0 + if ($IsLinux) { $Result = $(free --mega | grep Swap:) - [int64]$Total = $Result.subString(5,14) - [int64]$Used = $Result.substring(20,13) - [int64]$Free = $Result.substring(32,11) + [int64]$total = $Result.subString(5,14) + [int64]$used = $Result.substring(20,13) + [int64]$free = $Result.substring(32,11) } else { - $Items = Get-WmiObject -class "Win32_PageFileUsage" -namespace "root\CIMV2" -computername localhost - foreach ($Item in $Items) { - $Total += $Item.AllocatedBaseSize - $Used += $Item.CurrentUsage - $Free += ($Total - $Used) - } + $items = Get-WmiObject -class "Win32_PageFileUsage" -namespace "root\CIMV2" -computername localhost + [int64]$total = [int64]$used = 0 + foreach ($item in $items) { + $total += $item.AllocatedBaseSize + $used += $item.CurrentUsage + + } + [int64]$free = ($total - $used) } - if ($Total -eq 0) { + if ($total -eq 0) { Write-Output "⚠️ No swap space configured" - } elseif ($Free -eq 0) { - Write-Output "⚠️ Swap space of $(MB2String $Total) is full" - } elseif ($Free -lt $minLevel) { - Write-Output "⚠️ Swap space of $(MB2String $Total) is nearly full, only $(MB2String $Free) free" - } elseif ($Used -lt 5) { - Write-Output "βœ… Swap space unused, $(MB2String $Free) free" + } elseif ($free -eq 0) { + Write-Output "⚠️ Swap space of $(MB2String $total) is full" + } elseif ($free -lt $minLevel) { + Write-Output "⚠️ Swap space has only $(MB2String $free) of $(MB2String $total) free" + } elseif ($used -lt 5) { + Write-Output "βœ… Swap space has the full $(MB2String $free) free" } else { - [int]$Percent = ($Used * 100) / $Total - Write-Output "βœ… Swap space uses $Percent%, $(MB2String $Free) free of $(MB2String $Total)" + [int64]$percent = ($used * 100) / $total + Write-Output "βœ… Swap space has $(MB2String $free) free ($percent% of $(MB2String $total) used)" } exit 0 # success } catch { @@ -105,4 +107,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-swap-space.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-swap-space.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/check-symlinks.md b/docs/check-symlinks.md index 5cc40cf6..b5e24095 100644 --- a/docs/check-symlinks.md +++ b/docs/check-symlinks.md @@ -100,4 +100,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-symlinks.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-symlinks.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/check-time-zone.md b/docs/check-time-zone.md index 8cba59a0..e64a403d 100644 --- a/docs/check-time-zone.md +++ b/docs/check-time-zone.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-time-zone.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-time-zone.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/check-uptime.md b/docs/check-uptime.md index 244c54a2..3c9b453b 100644 --- a/docs/check-uptime.md +++ b/docs/check-uptime.md @@ -24,14 +24,14 @@ Script Content This PowerShell script queries the computer's uptime (time between now and last boot up time) and prints it. .EXAMPLE PS> ./check-uptime.ps1 - βœ… Up for 2 days, 20 hours, 10 minutes + βœ… OfficePC is up for 13 days since 1/25/2024 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -function TimeSpan2String([TimeSpan]$uptime) +function TimeSpanAsString([TimeSpan]$uptime) { [int]$days = $uptime.Days [int]$hours = $days * 24 + $uptime.Hours @@ -45,15 +45,15 @@ function TimeSpan2String([TimeSpan]$uptime) } try { + [system.threading.thread]::currentthread.currentculture = [system.globalization.cultureinfo]"en-US" if ($IsLinux) { + $lastBootTime = (Get-Uptime -since) $uptime = (Get-Uptime) - Write-Host "βœ… Up for $(TimeSpan2String $uptime)" } else { - [system.threading.thread]::currentthread.currentculture = [system.globalization.cultureinfo]"en-US" $lastBootTime = (Get-CimInstance Win32_OperatingSystem).LastBootUpTime $uptime = New-TimeSpan -Start $lastBootTime -End (Get-Date) - Write-Host "βœ… Up for $(TimeSpan2String $uptime) since $($lastBootTime.ToShortDateString())" } + Write-Host "βœ… $(hostname) is up for $(TimeSpanAsString $uptime) since $($lastBootTime.ToShortDateString())" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -61,4 +61,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-uptime.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-uptime.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/check-vpn.md b/docs/check-vpn.md index 24468267..aa29d665 100644 --- a/docs/check-vpn.md +++ b/docs/check-vpn.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-vpn.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-vpn.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/check-weather.md b/docs/check-weather.md index 6f63d264..f0dd2c0c 100644 --- a/docs/check-weather.md +++ b/docs/check-weather.md @@ -81,4 +81,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-weather.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-weather.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/check-week.md b/docs/check-week.md index e1e397fc..0ebf56e6 100644 --- a/docs/check-week.md +++ b/docs/check-week.md @@ -54,4 +54,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-week.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-week.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/check-wind.md b/docs/check-wind.md index 6681e04f..727e2e71 100644 --- a/docs/check-wind.md +++ b/docs/check-wind.md @@ -72,4 +72,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-wind.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-wind.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/check-windows-system-files.md b/docs/check-windows-system-files.md index ad33e18e..2487505c 100644 --- a/docs/check-windows-system-files.md +++ b/docs/check-windows-system-files.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-windows-system-files.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-windows-system-files.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/check-xml-file.md b/docs/check-xml-file.md index c1713ff8..d91fb793 100644 --- a/docs/check-xml-file.md +++ b/docs/check-xml-file.md @@ -70,6 +70,7 @@ try { $ReaderSettings.ValidationType = [System.Xml.ValidationType]::Schema $ReaderSettings.ValidationFlags = [System.Xml.Schema.XmlSchemaValidationFlags]::ProcessInlineSchema -bor [System.Xml.Schema.XmlSchemaValidationFlags]::ProcessSchemaLocation $ReaderSettings.add_ValidationEventHandler({ $script:ErrorCount++ }) + $ReaderSettings.DtdProcessing = [System.Xml.DtdProcessing]::Parse $Reader = [System.Xml.XmlReader]::Create($XmlFile.FullName, $ReaderSettings) while ($Reader.Read()) { } $Reader.Close() @@ -84,4 +85,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-xml-file.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-xml-file.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/check-xml-files.md b/docs/check-xml-files.md index 396ee197..6a66a334 100644 --- a/docs/check-xml-files.md +++ b/docs/check-xml-files.md @@ -1,7 +1,7 @@ Script: *check-xml-files.ps1* ======================== -This PowerShell script verifies each XML file (with suffix .xml) in the given directory tree for validity. +This PowerShell script verifies any XML file (with suffix .xml) in the given directory tree for validity. Parameters ---------- @@ -27,7 +27,7 @@ Example ```powershell PS> ./check-xml-files.ps1 C:\Windows ... -βœ”οΈ Checked 3387 XML files within πŸ“‚C:\Windows in 174 sec +βœ”οΈ Checked 3387 XML files (2462 invalid, 925 valid) within πŸ“‚C:\Windows in 116 sec ``` @@ -46,13 +46,13 @@ Script Content .SYNOPSIS Checks all XML files in a directory tree .DESCRIPTION - This PowerShell script verifies each XML file (with suffix .xml) in the given directory tree for validity. + This PowerShell script verifies any XML file (with suffix .xml) in the given directory tree for validity. .PARAMETER path Specifies the path to the directory tree (current working dir by default) .EXAMPLE PS> ./check-xml-files.ps1 C:\Windows ... - βœ”οΈ Checked 3387 XML files within πŸ“‚C:\Windows in 174 sec + βœ”οΈ Checked 3387 XML files (2462 invalid, 925 valid) within πŸ“‚C:\Windows in 116 sec .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -63,19 +63,19 @@ param([string]$path = "$PWD") try { $stopWatch = [system.diagnostics.stopwatch]::startNew() - $path = Resolve-Path "$path" - [int]$numXmlFiles = 0 + Write-Progress "Scanning any XML file within $path..." + [int]$valid = [int]$invalid = 0 - Write-Progress "Scanning all XML files within $path..." Get-ChildItem -path "$path" -attributes !Directory -recurse -force | Where-Object { $_.Name -like "*.xml" } | Foreach-Object { & $PSScriptRoot/check-xml-file.ps1 "$($_.FullName)" - $numXmlFiles++ + if ($lastExitCode -eq 0) { $valid++ } else { $invalid++ } } Write-Progress -completed "Done." + [int]$total = $valid + $invalid [int]$elapsed = $stopWatch.Elapsed.TotalSeconds - "βœ”οΈ Checked $numXmlFiles XML files within πŸ“‚$path in $elapsed sec" + "βœ”οΈ Checked $total XML files ($invalid invalid, $valid valid) within πŸ“‚$path in $elapsed sec" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -83,4 +83,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-xml-files.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-xml-files.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/clean-repo.md b/docs/clean-repo.md index 6e42cfd3..d6c6be77 100644 --- a/docs/clean-repo.md +++ b/docs/clean-repo.md @@ -7,9 +7,9 @@ NOTE: To be used with care! This cannot be undone! Parameters ---------- ```powershell -PS> ./clean-repo.ps1 [[-RepoDir] ] [] +PS> ./clean-repo.ps1 [[-pathToRepo] ] [] --RepoDir +-pathToRepo Specifies the file path to the local Git repository Required? false @@ -31,7 +31,7 @@ PS> ./clean-repo.ps1 C:\rust ⏳ (2/4) Checking local repository... πŸ“‚C:\rust ⏳ (3/4) Removing untracked files in repository... ⏳ (4/4) Removing untracked files in submodules... -βœ”οΈ Cleaned repo πŸ“‚rust in 1 sec +βœ”οΈ Cleaned up πŸ“‚rust repository in 1 sec. ``` @@ -52,7 +52,7 @@ Script Content .DESCRIPTION This PowerShell script deletes all untracked files and folders in a local Git repository (including submodules). NOTE: To be used with care! This cannot be undone! -.PARAMETER RepoDir +.PARAMETER pathToRepo Specifies the file path to the local Git repository .EXAMPLE PS> ./clean-repo.ps1 C:\rust @@ -60,40 +60,40 @@ Script Content ⏳ (2/4) Checking local repository... πŸ“‚C:\rust ⏳ (3/4) Removing untracked files in repository... ⏳ (4/4) Removing untracked files in submodules... - βœ”οΈ Cleaned repo πŸ“‚rust in 1 sec + βœ”οΈ Cleaned up πŸ“‚rust repository in 1 sec. .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$RepoDir = "$PWD") +param([string]$pathToRepo = "$PWD") try { - $StopWatch = [system.diagnostics.stopwatch]::startNew() + $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" } - "⏳ (2/4) Checking local repository... πŸ“‚$RepoDir" - if (-not(Test-Path "$RepoDir" -pathType container)) { throw "Can't access folder '$RepoDir' - maybe a typo or missing folder permissions?" } - $RepoDirName = (Get-Item "$RepoDir").Name + "⏳ (2/4) Checking local repository... πŸ“‚$pathToRepo" + if (-not(Test-Path "$pathToRepo" -pathType container)) { throw "Can't access repo folder '$pathToRepo' - maybe a typo or missing folder permissions?" } + $repoName = (Get-Item "$pathToRepo").Name "⏳ (3/4) Removing untracked files in repository..." - & git -C "$RepoDir" clean -xfd -f # to delete all untracked files in the main repo + & git -C "$pathToRepo" clean -xfd -f # to delete all untracked files in the main repo if ($lastExitCode -ne "0") { Write-Warning "'git clean' failed with exit code $lastExitCode, retrying once..." - & git -C "$RepoDir" clean -xfd -f + & git -C "$pathToRepo" clean -xfd -f if ($lastExitCode -ne "0") { throw "'git clean' failed with exit code $lastExitCode" } } "⏳ (4/4) Removing untracked files in submodules..." - & git -C "$RepoDir" submodule foreach --recursive git clean -xfd -f # to delete all untracked files in the submodules + & git -C "$pathToRepo" 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" } - [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds - "βœ”οΈ Cleaned repo πŸ“‚$RepoDirName in $Elapsed sec" + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "βœ”οΈ Cleaned up πŸ“‚$repoName repository in $elapsed sec." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -101,4 +101,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of clean-repo.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of clean-repo.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/clean-repos.md b/docs/clean-repos.md index 84407468..45e14284 100644 --- a/docs/clean-repos.md +++ b/docs/clean-repos.md @@ -100,4 +100,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of clean-repos.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of clean-repos.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/clear-dns-cache.md b/docs/clear-dns-cache.md index 2a441bbc..4f64d551 100644 --- a/docs/clear-dns-cache.md +++ b/docs/clear-dns-cache.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of clear-dns-cache.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of clear-dns-cache.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/clear-recycle-bin.md b/docs/clear-recycle-bin.md index 2a7c23fe..c482b49b 100644 --- a/docs/clear-recycle-bin.md +++ b/docs/clear-recycle-bin.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of clear-recycle-bin.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of clear-recycle-bin.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/clone-repos.md b/docs/clone-repos.md index 98dfd578..6e50a632 100644 --- a/docs/clone-repos.md +++ b/docs/clone-repos.md @@ -112,4 +112,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of clone-repos.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of clone-repos.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-calculator.md b/docs/close-calculator.md index b0c35c1d..166993e0 100644 --- a/docs/close-calculator.md +++ b/docs/close-calculator.md @@ -48,4 +48,4 @@ Stop-Process -name "CalculatorApp" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-calculator.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-calculator.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-chrome.md b/docs/close-chrome.md index 6b65a6e1..42f5f8b6 100644 --- a/docs/close-chrome.md +++ b/docs/close-chrome.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-chrome.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-chrome.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-cortana.md b/docs/close-cortana.md index 5be85ee5..96b56949 100644 --- a/docs/close-cortana.md +++ b/docs/close-cortana.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-cortana.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-cortana.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-edge.md b/docs/close-edge.md index b0781bc4..d4497123 100644 --- a/docs/close-edge.md +++ b/docs/close-edge.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-edge.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-edge.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-file-explorer.md b/docs/close-file-explorer.md index 313a47fe..f7b3e0f3 100644 --- a/docs/close-file-explorer.md +++ b/docs/close-file-explorer.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-file-explorer.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-file-explorer.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-firefox.md b/docs/close-firefox.md index cc481b3a..149bd731 100644 --- a/docs/close-firefox.md +++ b/docs/close-firefox.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-firefox.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-firefox.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-git-extensions.md b/docs/close-git-extensions.md index 0253dc95..e5dba4b1 100644 --- a/docs/close-git-extensions.md +++ b/docs/close-git-extensions.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-git-extensions.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-git-extensions.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-magnifier.md b/docs/close-magnifier.md index e7600533..cef6ae26 100644 --- a/docs/close-magnifier.md +++ b/docs/close-magnifier.md @@ -48,4 +48,4 @@ tskill magnify exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-magnifier.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-magnifier.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-microsoft-paint.md b/docs/close-microsoft-paint.md index 936f9b45..7e9f32a5 100644 --- a/docs/close-microsoft-paint.md +++ b/docs/close-microsoft-paint.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-microsoft-paint.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-microsoft-paint.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-microsoft-store.md b/docs/close-microsoft-store.md index 9e9ee2b2..b4510f84 100644 --- a/docs/close-microsoft-store.md +++ b/docs/close-microsoft-store.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-microsoft-store.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-microsoft-store.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-netflix.md b/docs/close-netflix.md index d0dd2f1e..7fef5161 100644 --- a/docs/close-netflix.md +++ b/docs/close-netflix.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-netflix.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-netflix.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-note-pad.md b/docs/close-note-pad.md index 7bb56166..6b4b2373 100644 --- a/docs/close-note-pad.md +++ b/docs/close-note-pad.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-note-pad.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-note-pad.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-obs-studio.md b/docs/close-obs-studio.md index 7af5d8e8..61efb208 100644 --- a/docs/close-obs-studio.md +++ b/docs/close-obs-studio.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-obs-studio.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-obs-studio.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-one-calendar.md b/docs/close-one-calendar.md index dabd9d25..906ed67a 100644 --- a/docs/close-one-calendar.md +++ b/docs/close-one-calendar.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-one-calendar.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-one-calendar.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-outlook.md b/docs/close-outlook.md index c068eb71..014bbf3b 100644 --- a/docs/close-outlook.md +++ b/docs/close-outlook.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-outlook.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-outlook.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-paint-three-d.md b/docs/close-paint-three-d.md index 8488ab86..c5870cb3 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 ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-paint-three-d.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-paint-three-d.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-program.md b/docs/close-program.md index 08550be2..117c8079 100644 --- a/docs/close-program.md +++ b/docs/close-program.md @@ -118,4 +118,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-program.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-program.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-serenade.md b/docs/close-serenade.md index 3187f422..ff53f5ef 100644 --- a/docs/close-serenade.md +++ b/docs/close-serenade.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-serenade.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-serenade.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-snipping-tool.md b/docs/close-snipping-tool.md index 800cce8e..5edb3353 100644 --- a/docs/close-snipping-tool.md +++ b/docs/close-snipping-tool.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-snipping-tool.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-snipping-tool.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-spotify.md b/docs/close-spotify.md index c066d18f..0a215976 100644 --- a/docs/close-spotify.md +++ b/docs/close-spotify.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-spotify.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-spotify.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-task-manager.md b/docs/close-task-manager.md index e7bf7c13..aecf73ed 100644 --- a/docs/close-task-manager.md +++ b/docs/close-task-manager.md @@ -48,4 +48,4 @@ tskill taskmgr exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-task-manager.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-task-manager.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-three-d-viewer.md b/docs/close-three-d-viewer.md index 4fe8558a..12609dd5 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 ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-three-d-viewer.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-three-d-viewer.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-thunderbird.md b/docs/close-thunderbird.md index 7c0cfd0f..5114d52b 100644 --- a/docs/close-thunderbird.md +++ b/docs/close-thunderbird.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-thunderbird.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-thunderbird.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-visual-studio.md b/docs/close-visual-studio.md index 61df8ba5..15bb792f 100644 --- a/docs/close-visual-studio.md +++ b/docs/close-visual-studio.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-visual-studio.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-visual-studio.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-vlc.md b/docs/close-vlc.md index 2cd41748..cfad5a82 100644 --- a/docs/close-vlc.md +++ b/docs/close-vlc.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-vlc.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-vlc.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/close-windows-terminal.md b/docs/close-windows-terminal.md index b983a03e..8247c044 100644 --- a/docs/close-windows-terminal.md +++ b/docs/close-windows-terminal.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-windows-terminal.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-windows-terminal.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/configure-git.md b/docs/configure-git.md index 090411b7..366e36d7 100644 --- a/docs/configure-git.md +++ b/docs/configure-git.md @@ -144,4 +144,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of configure-git.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of configure-git.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/connect-vpn.md b/docs/connect-vpn.md index 438aecbc..1a2780ce 100644 --- a/docs/connect-vpn.md +++ b/docs/connect-vpn.md @@ -62,4 +62,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of connect-vpn.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of connect-vpn.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/convert-csv2txt.md b/docs/convert-csv2txt.md index f4598ac3..d6b79a1c 100644 --- a/docs/convert-csv2txt.md +++ b/docs/convert-csv2txt.md @@ -72,4 +72,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-csv2txt.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-csv2txt.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/convert-docx2md.md b/docs/convert-docx2md.md index c8265ab8..ce477543 100644 --- a/docs/convert-docx2md.md +++ b/docs/convert-docx2md.md @@ -81,4 +81,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-docx2md.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-docx2md.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/convert-frames2mp4.md b/docs/convert-frames2mp4.md index a602cd55..ae0e3852 100644 --- a/docs/convert-frames2mp4.md +++ b/docs/convert-frames2mp4.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-frames2mp4.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-frames2mp4.ps1 as of 03/27/2024 17:36:25)* diff --git a/docs/convert-image2ascii.md b/docs/convert-image2ascii.md index 7abeccb4..9d563e79 100644 --- a/docs/convert-image2ascii.md +++ b/docs/convert-image2ascii.md @@ -114,4 +114,4 @@ Script Content } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-image2ascii.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-image2ascii.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/convert-image2blurred-frames.md b/docs/convert-image2blurred-frames.md index 36bde48c..ef12c996 100644 --- a/docs/convert-image2blurred-frames.md +++ b/docs/convert-image2blurred-frames.md @@ -70,4 +70,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-image2blurred-frames.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-image2blurred-frames.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/convert-image2pixelated-frames.md b/docs/convert-image2pixelated-frames.md index 812ee87f..e97c2f51 100644 --- a/docs/convert-image2pixelated-frames.md +++ b/docs/convert-image2pixelated-frames.md @@ -70,4 +70,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-image2pixelated-frames.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-image2pixelated-frames.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/convert-md2docx.md b/docs/convert-md2docx.md index db889105..edc54adf 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} ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-md2docx.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-md2docx.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/convert-md2html.md b/docs/convert-md2html.md index 33576041..df345348 100644 --- a/docs/convert-md2html.md +++ b/docs/convert-md2html.md @@ -80,4 +80,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-md2html.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-md2html.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/convert-md2pdf.md b/docs/convert-md2pdf.md index e01504fe..f2e29c2a 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} ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-md2pdf.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-md2pdf.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/convert-mysql2csv.md b/docs/convert-mysql2csv.md index c73e2b05..7ce119d6 100644 --- a/docs/convert-mysql2csv.md +++ b/docs/convert-mysql2csv.md @@ -119,4 +119,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-mysql2csv.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-mysql2csv.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/convert-ps2bat.md b/docs/convert-ps2bat.md index 0fedfa2d..c7cf22c5 100644 --- a/docs/convert-ps2bat.md +++ b/docs/convert-ps2bat.md @@ -89,4 +89,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-ps2bat.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-ps2bat.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/convert-ps2md.md b/docs/convert-ps2md.md index aa445499..a7634235 100644 --- a/docs/convert-ps2md.md +++ b/docs/convert-ps2md.md @@ -185,4 +185,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-ps2md.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-ps2md.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/convert-sql2csv.md b/docs/convert-sql2csv.md index b3083cad..db8a4bc0 100644 --- a/docs/convert-sql2csv.md +++ b/docs/convert-sql2csv.md @@ -120,4 +120,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-sql2csv.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-sql2csv.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/convert-txt2wav.md b/docs/convert-txt2wav.md index 70dc29bb..22ed10ab 100644 --- a/docs/convert-txt2wav.md +++ b/docs/convert-txt2wav.md @@ -84,4 +84,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-txt2wav.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-txt2wav.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/copy-photos-sorted.md b/docs/copy-photos-sorted.md index 8eae7e3e..9ce3985d 100644 --- a/docs/copy-photos-sorted.md +++ b/docs/copy-photos-sorted.md @@ -95,6 +95,9 @@ try { } elseif ("$filename" -like "SAVE_*_*.jpg") { $Array = $filename.split("_") CopyFile "$file" "$targetDir" $Array[1] "$filename" + } elseif ("$filename" -like "PXL_*_*.jpg") { + $Array = $filename.split("_") + CopyFile "$file" "$targetDir" $Array[1] "$filename" } else { Write-Host "⏳ Skipping $filename with unknown filename format..." } @@ -108,4 +111,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of copy-photos-sorted.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of copy-photos-sorted.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/count-lines-of-code.md b/docs/count-lines-of-code.md index af62a2e3..7aab3603 100644 --- a/docs/count-lines-of-code.md +++ b/docs/count-lines-of-code.md @@ -83,4 +83,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of count-lines-of-code.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of count-lines-of-code.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/decrypt-file.md b/docs/decrypt-file.md index 394694e4..0e90033d 100644 --- a/docs/decrypt-file.md +++ b/docs/decrypt-file.md @@ -197,4 +197,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of decrypt-file.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of decrypt-file.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/disable-ipv6.md b/docs/disable-ipv6.md index 660b4398..b8fcfa28 100644 --- a/docs/disable-ipv6.md +++ b/docs/disable-ipv6.md @@ -56,4 +56,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of disable-ipv6.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of disable-ipv6.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/disconnect-vpn.md b/docs/disconnect-vpn.md index edf18921..b11e886c 100644 --- a/docs/disconnect-vpn.md +++ b/docs/disconnect-vpn.md @@ -63,4 +63,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of disconnect-vpn.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of disconnect-vpn.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/download-dir.md b/docs/download-dir.md index eaf970a0..43921a95 100644 --- a/docs/download-dir.md +++ b/docs/download-dir.md @@ -77,4 +77,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of download-dir.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of download-dir.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/download-file.md b/docs/download-file.md index a02da40e..223ff918 100644 --- a/docs/download-file.md +++ b/docs/download-file.md @@ -77,4 +77,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of download-file.ps1 as of 01/25/2024 13:58:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of download-file.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/edit.md b/docs/edit.md index 9d228510..5cd2fdab 100644 --- a/docs/edit.md +++ b/docs/edit.md @@ -1,15 +1,15 @@ Script: *edit.ps1* ======================== -This PowerShell script opens a text editor to edit the given file. +This PowerShell script opens a text editor with the given text file. Parameters ---------- ```powershell -PS> ./edit.ps1 [[-Filename] ] [] +PS> ./edit.ps1 [[-path] ] [] --Filename - Specifies the path to the filename +-path + Specifies the path to the text file (will be queried if none given) Required? false Position? 1 @@ -25,7 +25,7 @@ PS> ./edit.ps1 [[-Filename] ] [] Example ------- ```powershell -PS> ./edit.ps1 C:\MyFile.txt +PS> ./edit.ps1 C:\MyDiary.txt ``` @@ -42,29 +42,49 @@ Script Content ```powershell <# .SYNOPSIS - Opens an editor to edit a file + Opens a text editor .DESCRIPTION - This PowerShell script opens a text editor to edit the given file. -.PARAMETER Filename - Specifies the path to the filename + This PowerShell script opens a text editor with the given text file. +.PARAMETER path + Specifies the path to the text file (will be queried if none given) .EXAMPLE - PS> ./edit.ps1 C:\MyFile.txt + PS> ./edit.ps1 C:\MyDiary.txt .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$Filename = "") +param([string]$path = "") + +function TryEditor { param([string]$editor, [string]$path) + try { + Write-Host -noNewline "$editorΒ·" + & $editor "$path" + if ($lastExitCode -ne "0") { + "⚠️ Can't execute '$editor' - make sure it's installed and available" + exit 1 + } + exit 0 # success + } catch { + return + } +} try { - if ($IsLinux) { - & vi "$Filename" - if ($lastExitCode -ne "0") { throw "Can't execute 'vi' - make sure vi is installed and available" } - } else { - & notepad.exe "$Filename" - if ($lastExitCode -ne "0") { throw "Can't execute 'notepad.exe' - make sure notepad.exe is installed and available" } - } + if ($path -eq "" ) { $path = Read-Host "Enter the path to the text file" } + + Write-Host -noNewline "Trying " + TryEditor "vim" $path + TryEditor "vi" $path + TryEditor "nano" $path + TryEditor "pico" $path + TryEditor "emacs" $path + TryEditor "notepad.exe" $path + TryEditor "wordpad.exe" $path + Write-Host "" + + throw "No text editor found - use 'winget install' to install your favorite text editor." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -72,4 +92,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of edit.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of edit.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/enable-crash-dumps.md b/docs/enable-crash-dumps.md index 8169f053..b2f3776c 100644 --- a/docs/enable-crash-dumps.md +++ b/docs/enable-crash-dumps.md @@ -330,4 +330,4 @@ Else exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of enable-crash-dumps.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of enable-crash-dumps.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/enable-god-mode.md b/docs/enable-god-mode.md index cd7d0a9d..f22e5fb8 100644 --- a/docs/enable-god-mode.md +++ b/docs/enable-god-mode.md @@ -61,4 +61,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of enable-god-mode.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of enable-god-mode.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/enable-ipv6.md b/docs/enable-ipv6.md index 1b1e4f01..4245e6f0 100644 --- a/docs/enable-ipv6.md +++ b/docs/enable-ipv6.md @@ -56,4 +56,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of enable-ipv6.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of enable-ipv6.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/encrypt-file.md b/docs/encrypt-file.md index 2eb5640c..3da43741 100644 --- a/docs/encrypt-file.md +++ b/docs/encrypt-file.md @@ -182,4 +182,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of encrypt-file.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of encrypt-file.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/enter-chat.md b/docs/enter-chat.md index 31397045..4fd6f692 100644 --- a/docs/enter-chat.md +++ b/docs/enter-chat.md @@ -125,4 +125,4 @@ function Get-ChatChannel } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of enter-chat.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of enter-chat.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/export-to-manuals.md b/docs/export-to-manuals.md index 5575f84c..4109759e 100644 --- a/docs/export-to-manuals.md +++ b/docs/export-to-manuals.md @@ -90,4 +90,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of export-to-manuals.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of export-to-manuals.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/fetch-repo.md b/docs/fetch-repo.md index e2d07d36..b3ed1642 100644 --- a/docs/fetch-repo.md +++ b/docs/fetch-repo.md @@ -89,4 +89,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of fetch-repo.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of fetch-repo.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/fetch-repos.md b/docs/fetch-repos.md index 47d8d7cf..04fd9747 100644 --- a/docs/fetch-repos.md +++ b/docs/fetch-repos.md @@ -98,4 +98,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of fetch-repos.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of fetch-repos.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/firefox-installer.md b/docs/firefox-installer.md index 9a76b48d..e345a01b 100644 --- a/docs/firefox-installer.md +++ b/docs/firefox-installer.md @@ -64,4 +64,4 @@ try { ``` -*(generated by convert-ps2md.ps1 using the comment-based help of firefox-installer.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of firefox-installer.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/get-md5.md b/docs/get-md5.md index 25dfd4b3..e23697a5 100644 --- a/docs/get-md5.md +++ b/docs/get-md5.md @@ -72,4 +72,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of get-md5.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of get-md5.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/get-sha1.md b/docs/get-sha1.md index a647a2e8..7d420f8f 100644 --- a/docs/get-sha1.md +++ b/docs/get-sha1.md @@ -72,4 +72,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of get-sha1.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of get-sha1.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/get-sha256.md b/docs/get-sha256.md index cb87d437..97263c14 100644 --- a/docs/get-sha256.md +++ b/docs/get-sha256.md @@ -72,4 +72,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of get-sha256.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of get-sha256.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/hibernate.md b/docs/hibernate.md index 10d95fac..7f112eb8 100644 --- a/docs/hibernate.md +++ b/docs/hibernate.md @@ -59,4 +59,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of hibernate.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of hibernate.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/import-vm.md b/docs/import-vm.md index 092aa711..0245a4a2 100644 --- a/docs/import-vm.md +++ b/docs/import-vm.md @@ -23,4 +23,4 @@ Start-VM $VMName exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of import-vm.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of import-vm.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/inspect-exe.md b/docs/inspect-exe.md index 43ac878c..57ccf632 100644 --- a/docs/inspect-exe.md +++ b/docs/inspect-exe.md @@ -68,4 +68,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of inspect-exe.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of inspect-exe.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-audacity.md b/docs/install-audacity.md index 8f5421c8..dd38ce37 100644 --- a/docs/install-audacity.md +++ b/docs/install-audacity.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-audacity.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-audacity.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-basic-apps.md b/docs/install-basic-apps.md index 6a3b3dad..e29c9308 100644 --- a/docs/install-basic-apps.md +++ b/docs/install-basic-apps.md @@ -93,4 +93,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-basic-apps.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-basic-apps.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-basic-snaps.md b/docs/install-basic-snaps.md index 7f2f2ed4..bcc49fc6 100644 --- a/docs/install-basic-snaps.md +++ b/docs/install-basic-snaps.md @@ -78,4 +78,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-basic-snaps.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-basic-snaps.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-calibre-server.md b/docs/install-calibre-server.md index b9aa9a53..a25a90cc 100644 --- a/docs/install-calibre-server.md +++ b/docs/install-calibre-server.md @@ -121,4 +121,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-calibre-server.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-calibre-server.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-chocolatey.md b/docs/install-chocolatey.md index e3812f75..b63e89a4 100644 --- a/docs/install-chocolatey.md +++ b/docs/install-chocolatey.md @@ -56,4 +56,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-chocolatey.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-chocolatey.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-chrome.md b/docs/install-chrome.md index e336eb46..febfcf38 100644 --- a/docs/install-chrome.md +++ b/docs/install-chrome.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-chrome.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-chrome.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-crystal-disk-info.md b/docs/install-crystal-disk-info.md index f7751a51..5ebc1de8 100644 --- a/docs/install-crystal-disk-info.md +++ b/docs/install-crystal-disk-info.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-crystal-disk-info.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-crystal-disk-info.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-crystal-disk-mark.md b/docs/install-crystal-disk-mark.md index cbd05092..64594724 100644 --- a/docs/install-crystal-disk-mark.md +++ b/docs/install-crystal-disk-mark.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-crystal-disk-mark.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-crystal-disk-mark.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-discord.md b/docs/install-discord.md index 51c6fd74..d73fb736 100644 --- a/docs/install-discord.md +++ b/docs/install-discord.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-discord.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-discord.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-edge.md b/docs/install-edge.md index b5e70f2e..893acff9 100644 --- a/docs/install-edge.md +++ b/docs/install-edge.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-edge.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-edge.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-evcc.md b/docs/install-evcc.md index b124be67..4063a066 100644 --- a/docs/install-evcc.md +++ b/docs/install-evcc.md @@ -77,4 +77,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-evcc.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-evcc.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-firefox.md b/docs/install-firefox.md index 749145aa..ca20af40 100644 --- a/docs/install-firefox.md +++ b/docs/install-firefox.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-firefox.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-firefox.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-git-extensions.md b/docs/install-git-extensions.md index a57d9037..72fe77d2 100644 --- a/docs/install-git-extensions.md +++ b/docs/install-git-extensions.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-git-extensions.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-git-extensions.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-git-for-windows.md b/docs/install-git-for-windows.md index b039f819..af8372fa 100644 --- a/docs/install-git-for-windows.md +++ b/docs/install-git-for-windows.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-git-for-windows.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-git-for-windows.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-github-cli.md b/docs/install-github-cli.md index 52409121..62774bc2 100644 --- a/docs/install-github-cli.md +++ b/docs/install-github-cli.md @@ -68,4 +68,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-github-cli.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-github-cli.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-irfanview.md b/docs/install-irfanview.md index 8cf2b2e4..77b17d67 100644 --- a/docs/install-irfanview.md +++ b/docs/install-irfanview.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-irfanview.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-irfanview.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-knot-resolver.md b/docs/install-knot-resolver.md index f5d70551..43c381a0 100644 --- a/docs/install-knot-resolver.md +++ b/docs/install-knot-resolver.md @@ -70,4 +70,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-knot-resolver.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-knot-resolver.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-microsoft-teams.md b/docs/install-microsoft-teams.md index 90ffd207..ea306fc9 100644 --- a/docs/install-microsoft-teams.md +++ b/docs/install-microsoft-teams.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-microsoft-teams.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-microsoft-teams.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-netflix.md b/docs/install-netflix.md index 82a6450a..ab6ae72a 100644 --- a/docs/install-netflix.md +++ b/docs/install-netflix.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-netflix.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-netflix.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-nine-zip.md b/docs/install-nine-zip.md index 31367251..f4fbf105 100644 --- a/docs/install-nine-zip.md +++ b/docs/install-nine-zip.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-nine-zip.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-nine-zip.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-obs-studio.md b/docs/install-obs-studio.md index c961239a..b61e3e53 100644 --- a/docs/install-obs-studio.md +++ b/docs/install-obs-studio.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-obs-studio.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-obs-studio.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-octoprint.md b/docs/install-octoprint.md index 0c34d432..7e10476b 100644 --- a/docs/install-octoprint.md +++ b/docs/install-octoprint.md @@ -32,4 +32,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-octoprint.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-octoprint.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-one-calendar.md b/docs/install-one-calendar.md index 07888772..2b17c10b 100644 --- a/docs/install-one-calendar.md +++ b/docs/install-one-calendar.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-one-calendar.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-one-calendar.ps1 as of 03/27/2024 17:36:26)* diff --git a/docs/install-opera-browser.md b/docs/install-opera-browser.md index 526d0bfd..bb8d1bcb 100644 --- a/docs/install-opera-browser.md +++ b/docs/install-opera-browser.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-opera-browser.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-opera-browser.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/install-opera-gx.md b/docs/install-opera-gx.md index f4be8059..4079188b 100644 --- a/docs/install-opera-gx.md +++ b/docs/install-opera-gx.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-opera-gx.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-opera-gx.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/install-paint-3d.md b/docs/install-paint-3d.md index 3881f6af..e8005ff1 100644 --- a/docs/install-paint-3d.md +++ b/docs/install-paint-3d.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-paint-3d.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-paint-3d.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/install-power-toys.md b/docs/install-power-toys.md index 9c433364..af5ba6e0 100644 --- a/docs/install-power-toys.md +++ b/docs/install-power-toys.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-power-toys.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-power-toys.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/install-powershell.md b/docs/install-powershell.md index 132040f8..fd0278bb 100644 --- a/docs/install-powershell.md +++ b/docs/install-powershell.md @@ -636,4 +636,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-powershell.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-powershell.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/install-rufus.md b/docs/install-rufus.md index 8c6d8385..84a742d7 100644 --- a/docs/install-rufus.md +++ b/docs/install-rufus.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-rufus.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-rufus.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/install-signal-cli.md b/docs/install-signal-cli.md index a6d01a42..3dbbdaf1 100644 --- a/docs/install-signal-cli.md +++ b/docs/install-signal-cli.md @@ -90,4 +90,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-signal-cli.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-signal-cli.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/install-skype.md b/docs/install-skype.md index fff86fc4..6ddc044f 100644 --- a/docs/install-skype.md +++ b/docs/install-skype.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-skype.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-skype.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/install-spotify.md b/docs/install-spotify.md index 955d16c9..5620b20e 100644 --- a/docs/install-spotify.md +++ b/docs/install-spotify.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-spotify.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-spotify.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/install-ssh-client.md b/docs/install-ssh-client.md index 69d4b777..db7b9bc7 100644 --- a/docs/install-ssh-client.md +++ b/docs/install-ssh-client.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-ssh-client.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-ssh-client.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/install-ssh-server.md b/docs/install-ssh-server.md index 5a4aded2..85b0af4b 100644 --- a/docs/install-ssh-server.md +++ b/docs/install-ssh-server.md @@ -78,4 +78,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-ssh-server.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-ssh-server.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/install-thunderbird.md b/docs/install-thunderbird.md index 11775a45..e63824f7 100644 --- a/docs/install-thunderbird.md +++ b/docs/install-thunderbird.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-thunderbird.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-thunderbird.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/install-twitter.md b/docs/install-twitter.md index 85908f31..d1005a94 100644 --- a/docs/install-twitter.md +++ b/docs/install-twitter.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-twitter.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-twitter.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/install-unbound-server.md b/docs/install-unbound-server.md index ed4ca417..8c530f92 100644 --- a/docs/install-unbound-server.md +++ b/docs/install-unbound-server.md @@ -99,4 +99,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-unbound-server.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-unbound-server.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/install-updates.md b/docs/install-updates.md index 548c7306..804a8394 100644 --- a/docs/install-updates.md +++ b/docs/install-updates.md @@ -18,8 +18,12 @@ Example ------- ```powershell PS> ./install-updates.ps1 -⏳ (1/2) Checking drive space... -βœ… Drive C: uses 56%, 441GB free of 999GB +⏳ (1/2) Checking drive and swap space... +βœ… Drive C: uses 56% of 1TB Β· 441GB free +βœ… Swap space uses 2% of 1GB Β· 1GB free + + + ⏳ (2/2) Installing updates from winget and Microsoft Store... ... @@ -44,8 +48,10 @@ Script Content NOTE: Use the script 'list-updates.ps1' to list the latest software updates before. .EXAMPLE PS> ./install-updates.ps1 - ⏳ (1/2) Checking drive space... - βœ… Drive C: uses 56%, 441GB free of 999GB + ⏳ (1/2) Checking drive and swap space... + βœ… Drive C: uses 56% of 1TB Β· 441GB free + βœ… Swap space uses 2% of 1GB Β· 1GB free + ⏳ (2/2) Installing updates from winget and Microsoft Store... ... .LINK @@ -58,9 +64,10 @@ try { $stopWatch = [system.diagnostics.stopwatch]::startNew() if ($IsLinux) { - "⏳ (1/5) Checking drive space..." + "⏳ (1/5) Checking drive and swap space..." & "$PSScriptRoot/check-drive-space.ps1" / - + & "$PSScriptRoot/check-swap-space.ps1" + "" "⏳ (2/5) Querying latest package information..." & sudo apt update @@ -77,9 +84,10 @@ try { & sudo softwareupdate -i -a Write-Progress -completed " " } else { - "⏳ (1/2) Checking drive space..." + "⏳ (1/2) Checking drive and swap space..." & "$PSScriptRoot/check-drive-space.ps1" C - + & "$PSScriptRoot/check-swap-space.ps1" + "" "⏳ (2/2) Installing updates from winget and Microsoft Store..." "" & winget upgrade --all --include-unknown @@ -93,4 +101,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-updates.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-updates.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/install-visual-studio-code.md b/docs/install-visual-studio-code.md index 88a819fe..160bc622 100644 --- a/docs/install-visual-studio-code.md +++ b/docs/install-visual-studio-code.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-visual-studio-code.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-visual-studio-code.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/install-vivaldi.md b/docs/install-vivaldi.md index 453c1dbf..f9ac83cc 100644 --- a/docs/install-vivaldi.md +++ b/docs/install-vivaldi.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-vivaldi.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-vivaldi.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/install-vlc.md b/docs/install-vlc.md index 30ba51e3..5690b1da 100644 --- a/docs/install-vlc.md +++ b/docs/install-vlc.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-vlc.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-vlc.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/install-windows-terminal.md b/docs/install-windows-terminal.md index 11abef7b..f6f55fb5 100644 --- a/docs/install-windows-terminal.md +++ b/docs/install-windows-terminal.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-windows-terminal.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-windows-terminal.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/install-wsl.md b/docs/install-wsl.md index 0a63ec9d..e040cc19 100644 --- a/docs/install-wsl.md +++ b/docs/install-wsl.md @@ -74,4 +74,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-wsl.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-wsl.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/install-zoom.md b/docs/install-zoom.md index 2dc8e22b..b2197758 100644 --- a/docs/install-zoom.md +++ b/docs/install-zoom.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-zoom.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-zoom.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/introduce-powershell.md b/docs/introduce-powershell.md index 38be2a7a..8a25fdbe 100644 --- a/docs/introduce-powershell.md +++ b/docs/introduce-powershell.md @@ -91,4 +91,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of introduce-powershell.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of introduce-powershell.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-aliases.md b/docs/list-aliases.md index 78d7d54f..6161b244 100644 --- a/docs/list-aliases.md +++ b/docs/list-aliases.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-aliases.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-aliases.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-anagrams.md b/docs/list-anagrams.md index 61ae6f33..a3431853 100644 --- a/docs/list-anagrams.md +++ b/docs/list-anagrams.md @@ -120,4 +120,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-anagrams.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-anagrams.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-apps.md b/docs/list-apps.md index f2295f53..7263d487 100644 --- a/docs/list-apps.md +++ b/docs/list-apps.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-apps.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-apps.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-ascii-table.md b/docs/list-ascii-table.md index 8e5ed86c..7f6f16d3 100644 --- a/docs/list-ascii-table.md +++ b/docs/list-ascii-table.md @@ -120,4 +120,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-ascii-table.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-ascii-table.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-automatic-variables.md b/docs/list-automatic-variables.md index 07169425..626fc67d 100644 --- a/docs/list-automatic-variables.md +++ b/docs/list-automatic-variables.md @@ -100,4 +100,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-automatic-variables.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-automatic-variables.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-battery-status.md b/docs/list-battery-status.md index 967e3a30..317612b3 100644 --- a/docs/list-battery-status.md +++ b/docs/list-battery-status.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-battery-status.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-battery-status.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-bios.md b/docs/list-bios.md index d205387f..78b8bc32 100644 --- a/docs/list-bios.md +++ b/docs/list-bios.md @@ -63,4 +63,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-bios.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-bios.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-bluetooth-devices.md b/docs/list-bluetooth-devices.md index 5ab003d1..c4b48586 100644 --- a/docs/list-bluetooth-devices.md +++ b/docs/list-bluetooth-devices.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-bluetooth-devices.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-bluetooth-devices.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-branches.md b/docs/list-branches.md index 66e70c7a..1ca3dfe2 100644 --- a/docs/list-branches.md +++ b/docs/list-branches.md @@ -1,14 +1,14 @@ Script: *list-branches.ps1* ======================== -This PowerShell script lists all branches in a Git repository. +This PowerShell script lists branches in a Git repository - either all (default) or by a search pattern. Parameters ---------- ```powershell -PS> ./list-branches.ps1 [[-RepoDir] ] [[-SearchPattern] ] [] +PS> ./list-branches.ps1 [[-pathToRepo] ] [[-searchPattern] ] [] --RepoDir +-pathToRepo Specifies the path to the Git repository (current working directory by default) Required? false @@ -17,8 +17,8 @@ PS> ./list-branches.ps1 [[-RepoDir] ] [[-SearchPattern] ] [ - Specifies the search patter (anything by default) +-searchPattern + Specifies the search pattern ("*", anything by default) Required? false Position? 2 @@ -59,11 +59,11 @@ Script Content .SYNOPSIS Lists Git branches .DESCRIPTION - This PowerShell script lists all branches in a Git repository. -.PARAMETER RepoDir + This PowerShell script lists branches in a Git repository - either all (default) or by a search pattern. +.PARAMETER pathToRepo Specifies the path to the Git repository (current working directory by default) -.PARAMETER SearchPattern - Specifies the search patter (anything by default) +.PARAMETER searchPattern + Specifies the search pattern ("*", anything by default) .EXAMPLE PS> ./list-branches.ps1 @@ -76,28 +76,28 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -param([string]$RepoDir = "$PWD", [string]$SearchPattern = "*") +param([string]$pathToRepo = "$PWD", [string]$searchPattern = "*") try { - if (-not(test-path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" } + if (-not(Test-Path "$pathToRepo" -pathType container)) { throw "Can't access repo folder '$pathToRepo' - maybe a typo or missing folder permissions?" } - $Null = (git --version) + $null = (git --version) if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } - & git -C "$RepoDir" fetch + & git -C "$pathToRepo" fetch if ($lastExitCode -ne "0") { throw "'git fetch' failed" } - $Branches = $(git -C "$RepoDir" branch --list --remotes --no-color --no-column) + $branches = $(git -C "$pathToRepo" branch --list --remotes --no-color --no-column) if ($lastExitCode -ne "0") { throw "'git branch --list' failed" } "" "List of Git Branches" "--------------------" - foreach($Branch in $Branches) { - if ("$Branch" -match "origin/HEAD") { continue } - $BranchName = $Branch.substring(9) - if ("$BranchName" -notlike "$SearchPattern") { continue } - "$BranchName" + foreach($branch in $branches) { + if ("$branch" -match "origin/HEAD") { continue } + $branchName = $branch.substring(9) + if ("$branchName" -notlike "$searchPattern") { continue } + "$branchName" } "" exit 0 # success @@ -107,4 +107,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-branches.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-branches.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-calendar.md b/docs/list-calendar.md index 89cdb440..5bfe1cc0 100644 --- a/docs/list-calendar.md +++ b/docs/list-calendar.md @@ -244,4 +244,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-calendar.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-calendar.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-cheat-sheet.md b/docs/list-cheat-sheet.md index 4a5ef985..edcbf7aa 100644 --- a/docs/list-cheat-sheet.md +++ b/docs/list-cheat-sheet.md @@ -75,4 +75,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-cheat-sheet.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-cheat-sheet.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-city-weather.md b/docs/list-city-weather.md index c05def2a..982db34d 100644 --- a/docs/list-city-weather.md +++ b/docs/list-city-weather.md @@ -50,4 +50,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-city-weather.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-city-weather.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-cli-tools.md b/docs/list-cli-tools.md index 34a36cbc..49739b76 100644 --- a/docs/list-cli-tools.md +++ b/docs/list-cli-tools.md @@ -355,4 +355,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-cli-tools.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-cli-tools.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-clipboard.md b/docs/list-clipboard.md index fa870375..398748f9 100644 --- a/docs/list-clipboard.md +++ b/docs/list-clipboard.md @@ -55,4 +55,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-clipboard.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-clipboard.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-cmdlets.md b/docs/list-cmdlets.md index 897bd885..b013b2c7 100644 --- a/docs/list-cmdlets.md +++ b/docs/list-cmdlets.md @@ -67,4 +67,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-cmdlets.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-cmdlets.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-coffee-prices.md b/docs/list-coffee-prices.md index 76904f25..eae88390 100644 --- a/docs/list-coffee-prices.md +++ b/docs/list-coffee-prices.md @@ -72,4 +72,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-coffee-prices.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-coffee-prices.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-commit-stats.md b/docs/list-commit-stats.md index 94b58993..fe7b3492 100644 --- a/docs/list-commit-stats.md +++ b/docs/list-commit-stats.md @@ -93,4 +93,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-commit-stats.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-commit-stats.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-commits-live.md b/docs/list-commits-live.md new file mode 100644 index 00000000..c886fc88 --- /dev/null +++ b/docs/list-commits-live.md @@ -0,0 +1,118 @@ +Script: *list-commits-live.ps1* +======================== + +This PowerShell script permanently lists the latest commit in a Git repository in real-time. + +Parameters +---------- +```powershell +PS> ./list-commits-live.ps1 [[-pathToRepo] ] [[-updateInterval] ] [[-speed] ] [] + +-pathToRepo + Specifies the file path to the local Git repository. + + Required? false + Position? 1 + Default value "$PWD" + Accept pipeline input? false + Accept wildcard characters? false + +-updateInterval + + Required? false + Position? 2 + Default value 30 + Accept pipeline input? false + Accept wildcard characters? false + +-speed + + Required? false + Position? 3 + Default value 17 + Accept pipeline input? false + Accept wildcard characters? false + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Example +------- +```powershell +PS> ./commit-ticker.ps1 +❇️ Updated general.csv by Markus Fleschutz (HEAD -> main, origin/main, origin/HEAD) +... + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + List commits live in real-time. +.DESCRIPTION + This PowerShell script permanently lists the latest commit in a Git repository in real-time. +.PARAMETER pathToRepo + Specifies the file path to the local Git repository. +.EXAMPLE + PS> ./commit-ticker.ps1 + ❇️ Updated general.csv by Markus Fleschutz (HEAD -> main, origin/main, origin/HEAD) + ... +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +param([string]$pathToRepo = "$PWD", [int]$updateInterval = 30, [int]$speed = 17) + +try { + Write-Progress "Searching for Git executable..." + $null = (git --version) + if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } + + Write-Progress "Checking file patch to Git repository..." + if (-not(Test-Path "$pathToRepo" -pathType container)) { throw "Can't access directory: $pathToRepo" } + + Write-Progress "Fetching updates..." + & git -C "$pathToRepo" fetch --all --recurse-submodules=no --jobs=1 --quiet + if ($lastExitCode -ne "0") { throw "'git fetch' failed" } + Write-Progress -completed "Done." + + $prevLine = "" + $tzOffset = (Get-Timezone).BaseUtcOffset.TotalSeconds + for (;;) { + $line = (git -C "$pathToRepo" log origin --format=format:'%at %s by %an%d' --max-count=1) + if ($line -ne $prevLine) { + $unixTimestamp = [int64]$line.Substring(0,10) + $time = (Get-Date -day 1 -month 1 -year 1970 -hour 0 -minute 0 -second 0).AddSeconds($unixTimestamp) + $time = $time.AddSeconds($tzOffset) + $timeString = $time.ToString("HH:mm") + $message = $line.Substring(11) + & "$PSScriptRoot/write-typewriter.ps1" "❇️ $timeString $message" $speed + $prevLine = $line + } else { + Start-Sleep -seconds $updateInterval + } + & git -C "$pathToRepo" fetch --all --recurse-submodules=no --jobs=1 --quiet + if ($lastExitCode -ne "0") { throw "'git fetch' failed" } + } + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of list-commits-live.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-commits.md b/docs/list-commits.md index 1fd1654c..f999d34c 100644 --- a/docs/list-commits.md +++ b/docs/list-commits.md @@ -121,4 +121,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-commits.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-commits.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-console-colors.md b/docs/list-console-colors.md index 2e475d8b..9d7324e7 100644 --- a/docs/list-console-colors.md +++ b/docs/list-console-colors.md @@ -74,4 +74,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-console-colors.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-console-colors.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-countries.md b/docs/list-countries.md index b1830729..395c19b1 100644 --- a/docs/list-countries.md +++ b/docs/list-countries.md @@ -52,4 +52,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-countries.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-countries.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-cpu.md b/docs/list-cpu.md index 2966437d..caae3439 100644 --- a/docs/list-cpu.md +++ b/docs/list-cpu.md @@ -63,4 +63,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-cpu.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-cpu.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-credits.md b/docs/list-credits.md index be7f77c1..d18792de 100644 --- a/docs/list-credits.md +++ b/docs/list-credits.md @@ -80,4 +80,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-credits.ps1 as of 01/25/2024 13:58:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-credits.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-crypto-rates.md b/docs/list-crypto-rates.md index 4797a574..82c43b68 100644 --- a/docs/list-crypto-rates.md +++ b/docs/list-crypto-rates.md @@ -76,4 +76,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-crypto-rates.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-crypto-rates.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-defender-settings.md b/docs/list-defender-settings.md index eb440161..668af665 100644 --- a/docs/list-defender-settings.md +++ b/docs/list-defender-settings.md @@ -69,4 +69,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-defender-settings.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-defender-settings.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-dir-tree.md b/docs/list-dir-tree.md index db49fa72..0217244a 100644 --- a/docs/list-dir-tree.md +++ b/docs/list-dir-tree.md @@ -122,4 +122,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-dir-tree.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-dir-tree.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-dns-servers.md b/docs/list-dns-servers.md index d03c4944..9d42c559 100644 --- a/docs/list-dns-servers.md +++ b/docs/list-dns-servers.md @@ -21,13 +21,13 @@ Script Content .SYNOPSIS Lists DNS servers .DESCRIPTION - This PowerShell script measures the latency of public and free DNS servers and lists it. + This PowerShell script list public and free DNS servers together with IPv4 addresses and measured latency. .EXAMPLE PS> ./list-dns-servers.ps1 - Provider IPv4 Latency - -------- ---- ------- - AdGuard DNS (Cyprus) 94.140.14.14 / 94.140.15.15 222 / 205 ms + DNS PROVIDER IPv4 ADDRESSES LATENCY + ------------ ---- --------- ------- + AdGuard DNS (Cyprus) 94.140.14.14 Β· 94.140.15.15 222 Β· 205 ms ... .LINK https://github.com/fleschutz/PowerShell @@ -35,26 +35,24 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -function CheckDNSServer { param($Provider, $IPv4Pri, $IPv4Sec) - Write-Progress "Measuring latency of $Provider..." - $SW=[system.diagnostics.stopwatch]::startNew();$null=(nslookup fleschutz.de $IPv4Pri 2>$null);[int]$Lat1=$SW.Elapsed.TotalMilliseconds +function MeasureDNSServer([string]$provider, [string]$IPv4Pri, [string]$IPv4Sec) { + $time=[system.diagnostics.stopwatch]::startNew();$null=(nslookup fleschutz.de $IPv4Pri 2>$null);[int]$lat1=$time.Elapsed.TotalMilliseconds - $SW=[system.diagnostics.stopwatch]::startNew();$null=(nslookup fleschutz.de $IPv4Sec 2>$null);[int]$Lat2=$SW.Elapsed.TotalMilliseconds + $time=[system.diagnostics.stopwatch]::startNew();$null=(nslookup fleschutz.de $IPv4Sec 2>$null);[int]$lat2=$time.Elapsed.TotalMilliseconds - New-Object PSObject -Property @{ Provider=$Provider; IPv4="$IPv4Pri / $IPv4Sec"; Latency="$Lat1 / $Lat2 ms" } + New-Object PSObject -Property @{ 'DNS PROVIDER'=$provider; 'IPv4 ADDRESSES'="$IPv4Pri Β· $IPv4Sec"; LATENCY="$lat1 Β· $lat2 ms" } } function List-DNS-Servers { - Write-Progress "Loading Data/public-dns-servers.csv..." - $Table = Import-CSV "$PSScriptRoot/../data/public-dns-servers.csv" - foreach($Row in $Table) { - CheckDNSServer $Row.PROVIDER $Row.IPv4_PRI $Row.IPv4_SEC - } - Write-Progress -completed "." + Write-Progress "Loading data/public-dns-servers.csv..." + $table = Import-CSV "$PSScriptRoot/../data/public-dns-servers.csv" + Write-Progress -completed "Done." + foreach($row in $table) { MeasureDNSServer $row.PROVIDER $row.IPv4_PRI $row.IPv4_SEC } + } try { - List-DNS-Servers | Format-Table -property @{e='Provider';width=50},@{e='IPv4';width=32},@{e='Latency';width=15} + List-DNS-Servers | Format-Table -property @{e='DNS PROVIDER';width=50},@{e='IPv4 ADDRESSES';width=32},@{e='LATENCY';width=15} exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -62,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-dns-servers.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-dns-servers.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-drives.md b/docs/list-drives.md index 5897288a..a8c3bb05 100644 --- a/docs/list-drives.md +++ b/docs/list-drives.md @@ -63,4 +63,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-drives.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-drives.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-earthquakes.md b/docs/list-earthquakes.md index 9ea6c63d..6ad364c5 100644 --- a/docs/list-earthquakes.md +++ b/docs/list-earthquakes.md @@ -79,4 +79,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-earthquakes.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-earthquakes.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-emojis.md b/docs/list-emojis.md index 50bedb31..63a59908 100644 --- a/docs/list-emojis.md +++ b/docs/list-emojis.md @@ -72,4 +72,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-emojis.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-emojis.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-empty-dirs.md b/docs/list-empty-dirs.md index ed4001f5..6888a424 100644 --- a/docs/list-empty-dirs.md +++ b/docs/list-empty-dirs.md @@ -81,4 +81,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-empty-dirs.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-empty-dirs.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-empty-files.md b/docs/list-empty-files.md index ff8ae644..b5ef65b4 100644 --- a/docs/list-empty-files.md +++ b/docs/list-empty-files.md @@ -81,4 +81,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-empty-files.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-empty-files.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-encrypted-files.md b/docs/list-encrypted-files.md index 3450bd0a..27fd2e1d 100644 --- a/docs/list-encrypted-files.md +++ b/docs/list-encrypted-files.md @@ -81,4 +81,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-encrypted-files.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-encrypted-files.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-environment-variables.md b/docs/list-environment-variables.md index e87e2aba..fbb037f6 100644 --- a/docs/list-environment-variables.md +++ b/docs/list-environment-variables.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-environment-variables.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-environment-variables.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-error-types.md b/docs/list-error-types.md index d274ba61..33bbe80d 100644 --- a/docs/list-error-types.md +++ b/docs/list-error-types.md @@ -26,4 +26,4 @@ Script Content } | Select BaseType,Name,FullName ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-error-types.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-error-types.ps1 as of 03/27/2024 17:36:27)* diff --git a/docs/list-exchange-rates.md b/docs/list-exchange-rates.md index 467a0c85..8494220a 100644 --- a/docs/list-exchange-rates.md +++ b/docs/list-exchange-rates.md @@ -95,4 +95,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-exchange-rates.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-exchange-rates.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-executables.md b/docs/list-executables.md index 1b949e21..725e4f2b 100644 --- a/docs/list-executables.md +++ b/docs/list-executables.md @@ -1,7 +1,7 @@ Script: *list-executables.ps1* ======================== -This PowerShell script scans a directory tree and lists all executables. +This PowerShell script scans a given directory tree and lists all executables with suffix .EXE. Parameters ---------- @@ -26,8 +26,9 @@ Example ------- ```powershell PS> ./list-executables.ps1 C:\Windows +C:\Windows\bfsvc.exe ... -βœ”οΈ Found 8239 executables within πŸ“‚C:\Windows in 99 sec +βœ”οΈ Found 7967 executables within πŸ“‚C:\Windows in 168 sec. ``` @@ -44,15 +45,16 @@ Script Content ```powershell <# .SYNOPSIS - Lists all executables in a directory tree + Lists all executables in a dir tree .DESCRIPTION - This PowerShell script scans a directory tree and lists all executables. + This PowerShell script scans a given directory tree and lists all executables with suffix .EXE. .PARAMETER path Specifies the path to the directory tree (current working directory by default) .EXAMPLE PS> ./list-executables.ps1 C:\Windows + C:\Windows\bfsvc.exe ... - βœ”οΈ Found 8239 executables within πŸ“‚C:\Windows in 99 sec + βœ”οΈ Found 7967 executables within πŸ“‚C:\Windows in 168 sec. .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -64,16 +66,16 @@ param([string]$path = "$PWD") try { $stopWatch = [system.diagnostics.stopwatch]::startNew() + Write-Progress "Listing executables within $path ..." $path = Resolve-Path "$path" - Write-Progress "Scanning $path for executables..." [int]$count = 0 Get-ChildItem "$path" -attributes !Directory -recurse -force | Where-Object { $_.Name -like "*.exe" } | ForEach-Object { - "πŸ“‚$($_.FullName)" + "$($_.FullName)" $count++ } Write-Progress -completed " " - [int]$Elapsed = $stopWatch.Elapsed.TotalSeconds - "βœ”οΈ Found $count executables within πŸ“‚$path in $elapsed sec" + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "βœ”οΈ Found $count executables within πŸ“‚$path in $elapsed sec." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -81,4 +83,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-executables.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-executables.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-fibonacci.md b/docs/list-fibonacci.md index f3958ac1..d3ebe458 100644 --- a/docs/list-fibonacci.md +++ b/docs/list-fibonacci.md @@ -43,4 +43,4 @@ foreach ($i in 0..100) { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-fibonacci.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-fibonacci.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-files.md b/docs/list-files.md index 1774065c..4588c56a 100644 --- a/docs/list-files.md +++ b/docs/list-files.md @@ -68,4 +68,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-files.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-files.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-folder.md b/docs/list-folder.md index a427b603..5ab6aaaf 100644 --- a/docs/list-folder.md +++ b/docs/list-folder.md @@ -91,4 +91,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-folder.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-folder.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-fritzbox-calls.md b/docs/list-fritzbox-calls.md index b18c3f4f..a88645cf 100644 --- a/docs/list-fritzbox-calls.md +++ b/docs/list-fritzbox-calls.md @@ -153,4 +153,4 @@ echo $Result exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-fritzbox-calls.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-fritzbox-calls.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-fritzbox-devices.md b/docs/list-fritzbox-devices.md index ed3b61fc..3a1eb32f 100644 --- a/docs/list-fritzbox-devices.md +++ b/docs/list-fritzbox-devices.md @@ -105,4 +105,4 @@ $HostTable | format-table -property Active,IPAddress,MACAddress,HostName,Interfa exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-fritzbox-devices.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-fritzbox-devices.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-headlines.md b/docs/list-headlines.md index 06df3530..6e630558 100644 --- a/docs/list-headlines.md +++ b/docs/list-headlines.md @@ -89,4 +89,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-headlines.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-headlines.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-hidden-files.md b/docs/list-hidden-files.md index 607a718a..8a146006 100644 --- a/docs/list-hidden-files.md +++ b/docs/list-hidden-files.md @@ -81,4 +81,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-hidden-files.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-hidden-files.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-installed-languages.md b/docs/list-installed-languages.md index 2fa8cd98..c5a520c7 100644 --- a/docs/list-installed-languages.md +++ b/docs/list-installed-languages.md @@ -50,4 +50,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-installed-languages.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-installed-languages.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-installed-scripts.md b/docs/list-installed-scripts.md index ddb9c2af..daefab06 100644 --- a/docs/list-installed-scripts.md +++ b/docs/list-installed-scripts.md @@ -48,4 +48,4 @@ Get-InstalledScript exit # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-installed-scripts.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-installed-scripts.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-installed-software.md b/docs/list-installed-software.md index 29d1b6a4..74db06d2 100644 --- a/docs/list-installed-software.md +++ b/docs/list-installed-software.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-installed-software.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-installed-software.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-ipv6.md b/docs/list-ipv6.md index e72a9b54..a16d0c54 100644 --- a/docs/list-ipv6.md +++ b/docs/list-ipv6.md @@ -63,4 +63,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-ipv6.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-ipv6.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-latest-tag.md b/docs/list-latest-tag.md index ea2a25f3..282d0dc8 100644 --- a/docs/list-latest-tag.md +++ b/docs/list-latest-tag.md @@ -77,4 +77,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-latest-tag.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-latest-tag.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-latest-tags.md b/docs/list-latest-tags.md index f751c5ef..10859d6d 100644 --- a/docs/list-latest-tags.md +++ b/docs/list-latest-tags.md @@ -85,4 +85,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-latest-tags.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-latest-tags.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-memos.md b/docs/list-memos.md index d6b2bf17..a0e05a0a 100644 --- a/docs/list-memos.md +++ b/docs/list-memos.md @@ -71,4 +71,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-memos.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-memos.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-motherboard.md b/docs/list-motherboard.md index 1eee1aec..ed7ea99d 100644 --- a/docs/list-motherboard.md +++ b/docs/list-motherboard.md @@ -61,4 +61,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-motherboard.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-motherboard.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-mysql-tables.md b/docs/list-mysql-tables.md index 997facc4..c318b1e8 100644 --- a/docs/list-mysql-tables.md +++ b/docs/list-mysql-tables.md @@ -90,4 +90,4 @@ $result = Invoke-MySqlQuery -ConnectionString "server=$server; database=$databa $result | Export-Csv $csvfilepath -NoTypeInformation ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-mysql-tables.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-mysql-tables.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-network-connections.md b/docs/list-network-connections.md index ce3a925b..dfc22b4f 100644 --- a/docs/list-network-connections.md +++ b/docs/list-network-connections.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-network-connections.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-network-connections.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-network-routes.md b/docs/list-network-routes.md index 46d6a6b2..44357ebc 100644 --- a/docs/list-network-routes.md +++ b/docs/list-network-routes.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-network-routes.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-network-routes.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-network-shares.md b/docs/list-network-shares.md index 570018b6..84c2aba8 100644 --- a/docs/list-network-shares.md +++ b/docs/list-network-shares.md @@ -20,9 +20,9 @@ PS> ./list-network-shares.ps1 -Name Path Description ----- ---- ----------- -Users C:\Users +Name Path Description +---- ---- ----------- +Public C:\Public Public folder for file transfer ``` @@ -39,15 +39,15 @@ Script Content ```powershell <# .SYNOPSIS - Lists all network shares of the local computer + Lists the local network shares .DESCRIPTION This PowerShell script lists all network shares of the local computer. .EXAMPLE PS> ./list-network-shares.ps1 - Name Path Description - ---- ---- ----------- - Users C:\Users + Name Path Description + ---- ---- ----------- + Public C:\Public Public folder for file transfer .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -55,7 +55,7 @@ Script Content #> try { - Get-WmiObject win32_share | where {$_.name -NotLike "*$"} + Get-WmiObject win32_share | where {$_.name -NotLike "*$"} exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -63,4 +63,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-network-shares.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-network-shares.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-news.md b/docs/list-news.md index b3ca20ed..b99cb72e 100644 --- a/docs/list-news.md +++ b/docs/list-news.md @@ -44,7 +44,8 @@ Example ------- ```powershell PS> ./list-news.ps1 -❇️ Deadly Mediterranean wildfires kill more than 40 + +❇️ 09:15 Deadly Mediterranean wildfires kill more than 40 ... ``` @@ -73,7 +74,8 @@ Script Content Specifies the speed to write the text (10 ms by default) .EXAMPLE PS> ./list-news.ps1 - ❇️ Deadly Mediterranean wildfires kill more than 40 + + ❇️ 09:15 Deadly Mediterranean wildfires kill more than 40 ... .LINK https://github.com/fleschutz/PowerShell @@ -85,14 +87,18 @@ param([string]$RSS_URL = "https://news.yahoo.com/rss/world", [int]$maxLines = 24 try { [xml]$content = (Invoke-WebRequest -URI $RSS_URL -useBasicParsing).Content + + $URL = $content.rss.channel.link + "" + " [UTC] [SOURCE: $URL]" + [int]$count = 1 foreach ($item in $content.rss.channel.item) { - & "$PSScriptRoot/write-typewriter.ps1" "❇️ $($item.title)" $speed + $title = $item.title + $time = $item.pubDate.Substring(11, 5) + & "$PSScriptRoot/write-typewriter.ps1" "❇️ $time $title" $speed if ($count++ -eq $maxLines) { break } } - $source = $content.rss.channel.title - $date = $content.rss.channel.pubDate - " (by $source as of $date)" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -100,4 +106,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-news.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-news.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-nic.md b/docs/list-nic.md index 24a88b02..35a0f432 100644 --- a/docs/list-nic.md +++ b/docs/list-nic.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-nic.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-nic.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-nina-warnings.md b/docs/list-nina-warnings.md index 78b24d70..0bfe3a5d 100644 --- a/docs/list-nina-warnings.md +++ b/docs/list-nina-warnings.md @@ -66,4 +66,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-nina-warnings.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-nina-warnings.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-os-releases.md b/docs/list-os-releases.md index be95aba2..b7d5e163 100644 --- a/docs/list-os-releases.md +++ b/docs/list-os-releases.md @@ -66,4 +66,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-os-releases.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-os-releases.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-os-updates.md b/docs/list-os-updates.md index 0a763795..95ab0961 100644 --- a/docs/list-os-updates.md +++ b/docs/list-os-updates.md @@ -89,4 +89,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-os-updates.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-os-updates.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-os.md b/docs/list-os.md index ede76e90..d885d5b7 100644 --- a/docs/list-os.md +++ b/docs/list-os.md @@ -61,4 +61,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-os.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-os.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-outlook-inbox.md b/docs/list-outlook-inbox.md index 40ca7d4f..75ce310c 100644 --- a/docs/list-outlook-inbox.md +++ b/docs/list-outlook-inbox.md @@ -56,4 +56,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-outlook-inbox.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-outlook-inbox.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-outlook-sent.md b/docs/list-outlook-sent.md index d4c6e34a..09df4ff0 100644 --- a/docs/list-outlook-sent.md +++ b/docs/list-outlook-sent.md @@ -56,4 +56,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-outlook-sent.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-outlook-sent.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-passwords.md b/docs/list-passwords.md index 8b34acd3..57c96aaf 100644 --- a/docs/list-passwords.md +++ b/docs/list-passwords.md @@ -111,4 +111,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-passwords.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-passwords.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-pi.md b/docs/list-pi.md index a3dd137d..3b3a16ea 100644 --- a/docs/list-pi.md +++ b/docs/list-pi.md @@ -117,4 +117,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-pi.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-pi.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-pins.md b/docs/list-pins.md index d7402588..ce4f31c5 100644 --- a/docs/list-pins.md +++ b/docs/list-pins.md @@ -100,4 +100,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-pins.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-pins.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-power-schemes.md b/docs/list-power-schemes.md index 0085f92c..9deb4224 100644 --- a/docs/list-power-schemes.md +++ b/docs/list-power-schemes.md @@ -21,4 +21,4 @@ powercfg /list exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-power-schemes.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-power-schemes.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-powershell-modules.md b/docs/list-powershell-modules.md new file mode 100644 index 00000000..8498b079 --- /dev/null +++ b/docs/list-powershell-modules.md @@ -0,0 +1,68 @@ +Script: *list-powershell-modules.ps1* +======================== + +This PowerShell script lists the installed PowerShell modules. + +Parameters +---------- +```powershell +PS> ./list-powershell-modules.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Example +------- +```powershell +PS> ./list-powershell-modules.ps1 + + + +Name Version ModuleType ExportedCommands +---- ------- ---------- ---------------- +Microsoft.PowerShell.Management 3.1.0.0 Manifest {Add-Computer, Add-Content, Checkpoint-Computer...} +... + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Lists the PowerShell modules +.DESCRIPTION + This PowerShell script lists the installed PowerShell modules. +.EXAMPLE + PS> ./list-powershell-modules.ps1 + + Name Version ModuleType ExportedCommands + ---- ------- ---------- ---------------- + Microsoft.PowerShell.Management 3.1.0.0 Manifest {Add-Computer, Add-Content, Checkpoint-Computer...} + ... +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +try { + Get-Module | Format-Table -property Name,Version,ModuleType,ExportedCommands + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of list-powershell-modules.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-powershell-profiles.md b/docs/list-powershell-profiles.md new file mode 100644 index 00000000..a63b64e6 --- /dev/null +++ b/docs/list-powershell-profiles.md @@ -0,0 +1,61 @@ +Script: *list-powershell-profiles.ps1* +======================== + +list-powershell-profiles.ps1 + + +Parameters +---------- +```powershell + + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Lists the PowerShell profiles +.DESCRIPTION + This PowerShell script lists the user's PowerShell profiles. +.EXAMPLE + PS> ./list-powershell-profiles.ps1 + + Prio Profile Name Location Existent + ---- ------------ -------- -------- + 1 AllUsersAllHosts /opt/PowerShell/profile.ps1 no + 2 AllUsersCurrentHost /opt/PowerShell/Microsoft.PowerShell_profile.ps1 no + 3 CurrentUserAllHosts /home/markus/.config/powershell/profile.ps1 no + 4 CurrentUserCurrentHost /home/markus/.config/powershell/Microsoft.PowerShell_profile.ps1 yes +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +function ListProfile { param([int]$prio, [string]$profileName, [string]$Location) + if (Test-Path "$Location") { $Exists = "yes" } else { $Exists = "no" } + New-Object PSObject -Property @{ 'Prio'="$prio"; 'Profile Name'="$profileName"; 'Location'="$Location"; 'Exists'="$Exists" } +} + +function ListProfiles { + ListProfile 1 "AllUsersAllHosts" $PROFILE.AllUsersAllHosts + ListProfile 2 "AllUsersCurrentHost" $PROFILE.AllUsersCurrentHost + ListProfile 3 "CurrentUserAllHosts" $PROFILE.CurrentUserAllHosts + ListProfile 4 "CurrentUserCurrentHost" $PROFILE.CurrentUserCurrentHost +} + +try { + ListProfiles | Format-Table -property Prio,'Profile Name',Exists,Location + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of list-powershell-profiles.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-powershell-verbs.md b/docs/list-powershell-verbs.md new file mode 100644 index 00000000..7663c82d --- /dev/null +++ b/docs/list-powershell-verbs.md @@ -0,0 +1,68 @@ +Script: *list-powershell-verbs.ps1* +======================== + +This PowerShell script lists all allowed/recommended verbs in PowerShell. + +Parameters +---------- +```powershell +PS> ./list-powershell-verbs.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Example +------- +```powershell +PS> ./list-powershell-verbs.ps1 + + + +Verb Group +---- ----- +Add Common +... + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Lists verbs in PowerShell +.DESCRIPTION + This PowerShell script lists all allowed/recommended verbs in PowerShell. +.EXAMPLE + PS> ./list-powershell-verbs.ps1 + + Verb Group + ---- ----- + Add Common + ... +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +try { + Get-Verb | Sort-Object -Property Verb + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of list-powershell-verbs.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-print-jobs.md b/docs/list-print-jobs.md index 7b0232f4..f9ddaa2f 100644 --- a/docs/list-print-jobs.md +++ b/docs/list-print-jobs.md @@ -87,4 +87,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-print-jobs.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-print-jobs.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-printers.md b/docs/list-printers.md index b4b11ef4..5286b296 100644 --- a/docs/list-printers.md +++ b/docs/list-printers.md @@ -59,4 +59,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-printers.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-printers.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-processes.md b/docs/list-processes.md index 0908116e..75cf0d8b 100644 --- a/docs/list-processes.md +++ b/docs/list-processes.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-processes.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-processes.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-public-ip.md b/docs/list-public-ip.md index 881c665f..4f30d8c5 100644 --- a/docs/list-public-ip.md +++ b/docs/list-public-ip.md @@ -17,7 +17,7 @@ Example ------- ```powershell PS> ./list-public-ip.ps1 -βœ… Public IP address 185.72.229.161, 2003:f2:6128:fc01:e543:601:30c2:a028 near Munich, Germany +βœ… Public IP address 185.72.229.161, 2003:f2:6128:fd01:e543:601:30c2:a028 near Munich, Germany ``` @@ -34,12 +34,12 @@ Script Content ```powershell <# .SYNOPSIS - Lists the public IP address information + Lists the public IP address .DESCRIPTION This PowerShell script queries the public IP address information and prints it. .EXAMPLE PS> ./list-public-ip.ps1 - βœ… Public IP address 185.72.229.161, 2003:f2:6128:fc01:e543:601:30c2:a028 near Munich, Germany + βœ… Public IP address 185.72.229.161, 2003:f2:6128:fd01:e543:601:30c2:a028 near Munich, Germany .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -62,7 +62,7 @@ try { if ("$publicIPv6" -eq "") { $publicIPv6 = "no IPv6" } if ("$city" -eq "") { $city = "unknown city" } if ("$country" -eq "") { $country = "unknown country" } - Write-Output "βœ… Public IP address $publicIPv4, $publicIPv6 near $city, $country" ; if ($country -eq "Russia") { Write-Host -foregroundColor red "DON'T TRUST PUTIN !!! FLEE NOW OR DIE AS SOLDIER IN UKRAINE !!!" } + Write-Host "βœ… Public IP address $publicIPv4, $publicIPv6 near $city, $country" ; if ($country -eq "Russia") { Write-Host -foregroundColor red "DON'T TRUST PUTIN !!! FLEE NOW OR DIE AS SOLDIER IN UKRAINE !!!" } exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -70,4 +70,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-public-ip.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-public-ip.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-pull-requests.md b/docs/list-pull-requests.md index 5d54fad1..67e2a75c 100644 --- a/docs/list-pull-requests.md +++ b/docs/list-pull-requests.md @@ -83,4 +83,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-pull-requests.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-pull-requests.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-ram.md b/docs/list-ram.md index 428ab623..8b8d4eb8 100644 --- a/docs/list-ram.md +++ b/docs/list-ram.md @@ -63,4 +63,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-ram.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-ram.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-read-only-files.md b/docs/list-read-only-files.md index 08cd9b33..7e84b591 100644 --- a/docs/list-read-only-files.md +++ b/docs/list-read-only-files.md @@ -81,4 +81,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-read-only-files.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-read-only-files.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-recycle-bin.md b/docs/list-recycle-bin.md index d73b6159..e503f4ed 100644 --- a/docs/list-recycle-bin.md +++ b/docs/list-recycle-bin.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-recycle-bin.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-recycle-bin.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-repos.md b/docs/list-repos.md index 6751e292..913f1e54 100644 --- a/docs/list-repos.md +++ b/docs/list-repos.md @@ -6,10 +6,10 @@ This PowerShell script lists details of all Git repositories in a folder. Parameters ---------- ```powershell -PS> ./list-repos.ps1 [[-ParentDir] ] [] +PS> ./list-repos.ps1 [[-parentDir] ] [] --ParentDir - Specifies the path to the parent directory. +-parentDir + Specifies the path to the parent directory (current working directory by default) Required? false Position? 1 @@ -29,7 +29,7 @@ PS> ./list-repos C:\MyRepos -Local Repo Latest Tag Branch Status Remote URL +Repository Latest Tag Branch Status Remote URL ---------- ---------- ------ ------ ---------- πŸ“‚cmake v3.23.0 main βœ”οΈclean git@github.com:Kitware/CMake ↓0 ... @@ -52,12 +52,12 @@ Script Content Lists Git repos .DESCRIPTION This PowerShell script lists details of all Git repositories in a folder. -.PARAMETER ParentDir - Specifies the path to the parent directory. +.PARAMETER parentDir + Specifies the path to the parent directory (current working directory by default) .EXAMPLE PS> ./list-repos C:\MyRepos - Local Repo Latest Tag Branch Status Remote URL + Repository Latest Tag Branch Status Remote URL ---------- ---------- ------ ------ ---------- πŸ“‚cmake v3.23.0 main βœ”οΈclean git@github.com:Kitware/CMake ↓0 ... @@ -67,35 +67,35 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -param([string]$ParentDir = "$PWD") +param([string]$parentDir = "$PWD") function ListRepos { - $Folders = (Get-ChildItem "$ParentDir" -attributes Directory) - foreach($Folder in $Folders) { - $FolderName = (Get-Item "$Folder").Name - $LatestTagCommitID = (git -C "$Folder" rev-list --tags --max-count=1) - if ($LatestTagCommitID -ne "") { - $LatestTag = (git -C "$Folder" describe --tags $LatestTagCommitID) + $folders = (Get-ChildItem "$parentDir" -attributes Directory) + foreach($folder in $folders) { + $folderName = (Get-Item "$folder").Name + $latestTagCommitID = (git -C "$folder" rev-list --tags --max-count=1) + if ($latestTagCommitID -ne "") { + $latestTag = (git -C "$folder" describe --tags $latestTagCommitID) } else { - $LatestTag = "" + $latestTag = "" } - $Branch = (git -C "$Folder" branch --show-current) - $RemoteURL = (git -C "$Folder" remote get-url origin) - $NumCommits = (git -C "$Folder" rev-list HEAD...origin/$Branch --count) - $Status = (git -C "$Folder" status --short) - if ("$Status" -eq "") { $Status = "βœ”οΈclean" } - elseif ("$Status" -like " M *") { $Status = "⚠️modified" } - New-Object PSObject -property @{'Local Repo'="πŸ“‚$FolderName";'Latest Tag'="$LatestTag";'Branch'="$Branch";'Status'="$Status";'Remote URL'="$RemoteURL ↓$NumCommits";} + $branch = (git -C "$folder" branch --show-current) + $remoteURL = (git -C "$folder" remote get-url origin) + $numCommits = (git -C "$folder" rev-list HEAD...origin/$branch --count) + $status = (git -C "$folder" status --short) + if ("$status" -eq "") { $status = "βœ”οΈclean" } + elseif ("$status" -like " M *") { $status = "⚠️modified" } + New-Object PSObject -property @{'Repository'="πŸ“‚$folderName";'Latest Tag'="$latestTag";'Branch'="$branch";'Status'="$status";'Remote URL'="$remoteURL ↓$numCommits";} } } try { - if (-not(Test-Path "$ParentDir" -pathType container)) { throw "Can't access directory: $ParentDir" } + if (-not(Test-Path "$parentDir" -pathType container)) { throw "Can't access directory: $parentDir" } - $Null = (git --version) + $null = (git --version) if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } - ListRepos | Format-Table -property @{e='Local Repo';width=19},@{e='Latest Tag';width=18},@{e='Branch';width=20},@{e='Status';width=10},'Remote URL' + ListRepos | Format-Table -property @{e='Repository';width=19},@{e='Latest Tag';width=18},@{e='Branch';width=20},@{e='Status';width=10},'Remote URL' exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -103,4 +103,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-repos.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-repos.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-scripts.md b/docs/list-scripts.md index 707ba0ed..9167091e 100644 --- a/docs/list-scripts.md +++ b/docs/list-scripts.md @@ -70,4 +70,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-scripts.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-scripts.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-services.md b/docs/list-services.md index bc5b82e0..e149df12 100644 --- a/docs/list-services.md +++ b/docs/list-services.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-services.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-services.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-special-folders.md b/docs/list-special-folders.md index 3e575ea6..844972cb 100644 --- a/docs/list-special-folders.md +++ b/docs/list-special-folders.md @@ -105,4 +105,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-special-folders.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-special-folders.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-sql-tables.md b/docs/list-sql-tables.md index 5f3036f0..0969f899 100644 --- a/docs/list-sql-tables.md +++ b/docs/list-sql-tables.md @@ -93,4 +93,4 @@ $result = Invoke-SqlServerQuery -Credential $creds -ConnectionTimeout 10000 -Dat $result | Export-Csv $csvfilepath -NoTypeInformation ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-sql-tables.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-sql-tables.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-submodules.md b/docs/list-submodules.md index 8f3eee6c..7d37adbb 100644 --- a/docs/list-submodules.md +++ b/docs/list-submodules.md @@ -81,4 +81,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-submodules.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-submodules.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-suggestions.md b/docs/list-suggestions.md index 04dc15a3..669f3e4d 100644 --- a/docs/list-suggestions.md +++ b/docs/list-suggestions.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-suggestions.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-suggestions.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-system-files.md b/docs/list-system-files.md index b50fcd18..85314516 100644 --- a/docs/list-system-files.md +++ b/docs/list-system-files.md @@ -81,4 +81,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-system-files.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-system-files.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-system-info.md b/docs/list-system-info.md index d4975b42..d46db9cd 100644 --- a/docs/list-system-info.md +++ b/docs/list-system-info.md @@ -141,4 +141,4 @@ $info exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-system-info.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-system-info.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-tags.md b/docs/list-tags.md index af96387e..da4dce93 100644 --- a/docs/list-tags.md +++ b/docs/list-tags.md @@ -109,4 +109,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-tags.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-tags.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-tasks.md b/docs/list-tasks.md index 640b3da6..aae5f9d1 100644 --- a/docs/list-tasks.md +++ b/docs/list-tasks.md @@ -44,4 +44,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-tasks.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-tasks.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-timezone.md b/docs/list-timezone.md index 246a43f6..6ccebe75 100644 --- a/docs/list-timezone.md +++ b/docs/list-timezone.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-timezone.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-timezone.ps1 as of 03/27/2024 17:36:28)* diff --git a/docs/list-timezones.md b/docs/list-timezones.md index 2fb1f09f..01e08267 100644 --- a/docs/list-timezones.md +++ b/docs/list-timezones.md @@ -67,4 +67,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-timezones.ps1 as of 01/25/2024 13:58:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-timezones.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/list-tiobe-index.md b/docs/list-tiobe-index.md index c745bbcb..0b8f2942 100644 --- a/docs/list-tiobe-index.md +++ b/docs/list-tiobe-index.md @@ -78,4 +78,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-tiobe-index.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-tiobe-index.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/list-unused-files.md b/docs/list-unused-files.md index 5972908e..1f0d7d6a 100644 --- a/docs/list-unused-files.md +++ b/docs/list-unused-files.md @@ -95,4 +95,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-unused-files.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-unused-files.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/list-updates.md b/docs/list-updates.md index 915fad2d..98096987 100644 --- a/docs/list-updates.md +++ b/docs/list-updates.md @@ -1,7 +1,8 @@ Script: *list-updates.ps1* ======================== -This PowerShell script queries the latest available software updates for the local machine and lists it. +This PowerShell script queries the latest available software updates for the +local machine and lists it. NOTE: Use the script 'install-updates.ps1' to install the listed updates. Parameters @@ -21,9 +22,9 @@ PS> ./list-updates.ps1 -Name Id Version Available Source --------------------------------------------------------------------------------------------------- -Git Git.Git 2.41.0 2.41.0.2 winget +Name Id Version Available Source +------------------------------------------------------------------------------ +Git Git.Git 2.43.0 2.44.0 winget ... ``` @@ -43,14 +44,15 @@ Script Content .SYNOPSIS Lists software updates .DESCRIPTION - This PowerShell script queries the latest available software updates for the local machine and lists it. + This PowerShell script queries the latest available software updates for the + local machine and lists it. NOTE: Use the script 'install-updates.ps1' to install the listed updates. .EXAMPLE PS> ./list-updates.ps1 - Name Id Version Available Source - -------------------------------------------------------------------------------------------------- - Git Git.Git 2.41.0 2.41.0.2 winget + Name Id Version Available Source + ------------------------------------------------------------------------------ + Git Git.Git 2.43.0 2.44.0 winget ... .LINK https://github.com/fleschutz/PowerShell @@ -73,7 +75,8 @@ try { & winget upgrade --include-unknown Write-Progress -completed "Done." } - " (use 'install-updates.ps1' to install the listed updates)" + " " + "NOTE: Use the script 'install-updates.ps1' to install the listed updates." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -81,4 +84,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-updates.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-updates.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/list-user-accounts.md b/docs/list-user-accounts.md index 382ae245..fbe117a6 100644 --- a/docs/list-user-accounts.md +++ b/docs/list-user-accounts.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-user-accounts.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-user-accounts.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/list-user-groups.md b/docs/list-user-groups.md index d6b99e2f..ef730e7b 100644 --- a/docs/list-user-groups.md +++ b/docs/list-user-groups.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-user-groups.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-user-groups.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/list-voices.md b/docs/list-voices.md index 048a3eed..2f202fb8 100644 --- a/docs/list-voices.md +++ b/docs/list-voices.md @@ -71,4 +71,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-voices.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-voices.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/list-weather.md b/docs/list-weather.md index d0bf83f3..ffb1c035 100644 --- a/docs/list-weather.md +++ b/docs/list-weather.md @@ -63,8 +63,8 @@ Script Content param([string]$Location = "") # empty means determine automatically -function GetDescription { param([string]$Text) - switch($Text) { +function GetDescription { param([string]$text) + switch ($text.trim()) { "Blizzard" { return "❄️ blizzard ⚠️" } "Blowing snow" { return "❄️ blowing snow ⚠️" } "Clear" { return "πŸŒ™ clear" } @@ -84,6 +84,7 @@ function GetDescription { param([string]$Text) "Moderate or heavy sleet" { return "❄️ moderate or heavy sleet ⚠️" } "Moderate or heavy rain shower" { return "πŸ’§ moderate or heavy rain shower ⚠️" } "Moderate or heavy snow showers"{ return "❄️ moderate or heavy snow showers ⚠️" } + "Moderate or heavy snow in area with thunder" { return "❄️ moderate or heavy snow with thunder ⚠️" } "Moderate rain" { return "πŸ’§ moderate rain" } "Moderate rain at times" { return "πŸ’§ moderate rain at times" } "Moderate snow" { return "❄️ moderate snow" } @@ -97,6 +98,8 @@ function GetDescription { param([string]$Text) "Patchy light snow" { return "❄️ patchy light snow" } "Patchy moderate snow" { return "❄️ patchy moderate snow" } "Patchy rain possible" { return "πŸ’§ patchy rain possible" } + "Patchy rain nearby" { return "πŸ’§ patchy rain nearby" } + "Patchy sleet nearby" { return "❄️ patchy sleet nearby" } "Patchy snow possible" { return "❄️ patchy snow possible" } "Sunny" { return "β˜€οΈ sunny" } "Thundery outbreaks possible" { return "⚑️thundery outbreaks possible" } @@ -169,4 +172,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-weather.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-weather.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/list-wifi.md b/docs/list-wifi.md index d9f6d7de..49e218e4 100644 --- a/docs/list-wifi.md +++ b/docs/list-wifi.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-wifi.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-wifi.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/list-window-titles.md b/docs/list-window-titles.md index 7292a6c1..211aec9f 100644 --- a/docs/list-window-titles.md +++ b/docs/list-window-titles.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-window-titles.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-window-titles.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/list-workdir.md b/docs/list-workdir.md index ce9302ab..1e830af8 100644 --- a/docs/list-workdir.md +++ b/docs/list-workdir.md @@ -56,4 +56,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-workdir.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-workdir.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/list-wsl-distros.md b/docs/list-wsl-distros.md index 480e3d0e..9329f03b 100644 --- a/docs/list-wsl-distros.md +++ b/docs/list-wsl-distros.md @@ -23,4 +23,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-wsl-distros.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-wsl-distros.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/locate-city.md b/docs/locate-city.md index 385f129f..e3536d0e 100644 --- a/docs/locate-city.md +++ b/docs/locate-city.md @@ -87,4 +87,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of locate-city.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of locate-city.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/locate-ipaddress.md b/docs/locate-ipaddress.md index ff49d9b0..846929eb 100644 --- a/docs/locate-ipaddress.md +++ b/docs/locate-ipaddress.md @@ -46,4 +46,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of locate-ipaddress.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of locate-ipaddress.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/locate-my-phone.md b/docs/locate-my-phone.md index 92185cdc..01b8e873 100644 --- a/docs/locate-my-phone.md +++ b/docs/locate-my-phone.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of locate-my-phone.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of locate-my-phone.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/locate-zip-code.md b/docs/locate-zip-code.md index 8b738ec0..0913bebe 100644 --- a/docs/locate-zip-code.md +++ b/docs/locate-zip-code.md @@ -101,4 +101,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of locate-zip-code.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of locate-zip-code.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/lock-desktop.md b/docs/lock-desktop.md index 7de849f3..6f5c96e7 100644 --- a/docs/lock-desktop.md +++ b/docs/lock-desktop.md @@ -54,4 +54,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of lock-desktop.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of lock-desktop.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/log-off.md b/docs/log-off.md index 1f153fe5..7719f991 100644 --- a/docs/log-off.md +++ b/docs/log-off.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of log-off.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of log-off.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/make-install.md b/docs/make-install.md index e594addd..5f8424f9 100644 --- a/docs/make-install.md +++ b/docs/make-install.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of make-install.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of make-install.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/measure-BubbleSort.md b/docs/measure-BubbleSort.md index a81014f0..d6dc91fd 100644 --- a/docs/measure-BubbleSort.md +++ b/docs/measure-BubbleSort.md @@ -92,4 +92,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of measure-BubbleSort.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-BubbleSort.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/measure-BucketSort.md b/docs/measure-BucketSort.md index 4ad08f15..362f2e2e 100644 --- a/docs/measure-BucketSort.md +++ b/docs/measure-BucketSort.md @@ -120,4 +120,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of measure-BucketSort.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-BucketSort.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/measure-CountingSort.md b/docs/measure-CountingSort.md index 5472b8ec..6e6f1bad 100644 --- a/docs/measure-CountingSort.md +++ b/docs/measure-CountingSort.md @@ -111,4 +111,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of measure-CountingSort.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-CountingSort.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/measure-HeapSort.md b/docs/measure-HeapSort.md index 07068071..f1a2aa2e 100644 --- a/docs/measure-HeapSort.md +++ b/docs/measure-HeapSort.md @@ -126,4 +126,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of measure-HeapSort.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-HeapSort.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/measure-InsertionSort.md b/docs/measure-InsertionSort.md index 25f2f6bd..32fb1758 100644 --- a/docs/measure-InsertionSort.md +++ b/docs/measure-InsertionSort.md @@ -95,4 +95,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of measure-InsertionSort.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-InsertionSort.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/measure-MergeSort.md b/docs/measure-MergeSort.md index 8821b869..2a51e1a1 100644 --- a/docs/measure-MergeSort.md +++ b/docs/measure-MergeSort.md @@ -120,4 +120,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of measure-MergeSort.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-MergeSort.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/measure-QuickSort.md b/docs/measure-QuickSort.md index 05cdf8a0..088bcf96 100644 --- a/docs/measure-QuickSort.md +++ b/docs/measure-QuickSort.md @@ -101,4 +101,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of measure-QuickSort.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-QuickSort.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/measure-SelectionSort.md b/docs/measure-SelectionSort.md index e1fbaed7..7fd82e2f 100644 --- a/docs/measure-SelectionSort.md +++ b/docs/measure-SelectionSort.md @@ -94,4 +94,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of measure-SelectionSort.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-SelectionSort.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/measure-sorting-algorithms.md b/docs/measure-sorting-algorithms.md index 72ce6150..2906c753 100644 --- a/docs/measure-sorting-algorithms.md +++ b/docs/measure-sorting-algorithms.md @@ -73,4 +73,4 @@ param([int]$numIntegers = 3000) exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of measure-sorting-algorithms.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-sorting-algorithms.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/merry-christmas.md b/docs/merry-christmas.md index e5a43f49..c75aa762 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 ``` -*(generated by convert-ps2md.ps1 using the comment-based help of merry-christmas.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of merry-christmas.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/minimize-all-windows.md b/docs/minimize-all-windows.md index 073f0788..9316bd89 100644 --- a/docs/minimize-all-windows.md +++ b/docs/minimize-all-windows.md @@ -54,4 +54,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of minimize-all-windows.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of minimize-all-windows.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/move-mouse-pointer.md b/docs/move-mouse-pointer.md index 2254b647..adf3d41e 100644 --- a/docs/move-mouse-pointer.md +++ b/docs/move-mouse-pointer.md @@ -84,4 +84,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of move-mouse-pointer.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of move-mouse-pointer.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/move-vm.md b/docs/move-vm.md index 1d076f92..a2e0b8d2 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 ``` -*(generated by convert-ps2md.ps1 using the comment-based help of move-vm.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of move-vm.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/my-profile.md b/docs/my-profile.md index c9a1aceb..5bd6cee1 100644 --- a/docs/my-profile.md +++ b/docs/my-profile.md @@ -24,7 +24,7 @@ if ($IsLinux) { $Username = $(whoami) } else { $Username = $env:USERNAME } $host.ui.RawUI.WindowTitle = "$Username @ $(hostname)" # COMMAND PROMPT -function prompt { write-host -noNewline -foregroundColor yellow "`n➀"; return " " } +function prompt { Write-Host -noNewline -foregroundColor yellow "`n➀ "; return " " } # ALIAS NAMES del alias:pwd -force -errorAction SilentlyContinue @@ -34,4 +34,4 @@ del alias:ls -force -errorAction SilentlyContinue set-alias -name ls -value list-folder.ps1 # ls = list folder (short format) ``` -*(generated by convert-ps2md.ps1 using the comment-based help of my-profile.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of my-profile.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/new-branch.md b/docs/new-branch.md index 8464db1e..d93a0c3a 100644 --- a/docs/new-branch.md +++ b/docs/new-branch.md @@ -1,15 +1,15 @@ Script: *new-branch.ps1* ======================== -This PowerShell script creates a new branch in a local Git repository and switches to it. +This PowerShell script creates a new Git branch in a local repository and switches to it. Parameters ---------- ```powershell -PS> ./new-branch.ps1 [[-newBranch] ] [[-repoPath] ] [] +PS> ./new-branch.ps1 [[-newBranch] ] [[-pathToRepo] ] [] -newBranch - Specifies the new branch name + Specifies the new Git branch name (check the allowed characters) Required? false Position? 1 @@ -17,8 +17,8 @@ PS> ./new-branch.ps1 [[-newBranch] ] [[-repoPath] ] [ - Specifies the path to the Git repository (current working directory per default) +-pathToRepo + Specifies the file path to the local repository (current working directory per default) Required? false Position? 2 @@ -34,14 +34,14 @@ PS> ./new-branch.ps1 [[-newBranch] ] [[-repoPath] ] [ ./new-branch.ps1 test123 C:\MyRepo +PS> ./new-branch.ps1 test123 C:\Repos\rust ⏳ (1/6) Searching for Git executable... git version 2.42.0.windows.2 -⏳ (2/6) Checking local repository... -⏳ (3/6) Fetching latest updates... +⏳ (2/6) Checking Git repository... +⏳ (3/6) Fetching updates... ⏳ (4/6) Creating new branch... ⏳ (5/6) Pushing updates... ⏳ (6/6) Updating submodules... -βœ”οΈ Created branch 'test123' in repo πŸ“‚MyRepo (based on 'main') in 18 sec +βœ”οΈ Created branch 'test123' in πŸ“‚rust repository in 18 sec (based on 'main') ``` @@ -58,32 +58,32 @@ Script Content ```powershell <# .SYNOPSIS - Creates a new Git branch + Creates a new branch .DESCRIPTION - This PowerShell script creates a new branch in a local Git repository and switches to it. + This PowerShell script creates a new Git branch in a local repository and switches to it. .PARAMETER newBranch - Specifies the new branch name -.PARAMETER repoPath - Specifies the path to the Git repository (current working directory per default) + Specifies the new Git branch name (check the allowed characters) +.PARAMETER pathToRepo + Specifies the file path to the local repository (current working directory per default) .EXAMPLE - PS> ./new-branch.ps1 test123 C:\MyRepo + PS> ./new-branch.ps1 test123 C:\Repos\rust ⏳ (1/6) Searching for Git executable... git version 2.42.0.windows.2 - ⏳ (2/6) Checking local repository... - ⏳ (3/6) Fetching latest updates... + ⏳ (2/6) Checking Git repository... + ⏳ (3/6) Fetching updates... ⏳ (4/6) Creating new branch... ⏳ (5/6) Pushing updates... ⏳ (6/6) Updating submodules... - βœ”οΈ Created branch 'test123' in repo πŸ“‚MyRepo (based on 'main') in 18 sec + βœ”οΈ Created branch 'test123' in πŸ“‚rust repository in 18 sec (based on 'main') .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$newBranch = "", [string]$repoPath = "$PWD") +param([string]$newBranch = "", [string]$pathToRepo = "$PWD") try { - if ($newBranch -eq "") { $newBranch = Read-Host "Enter the new branch name" } + if ($newBranch -eq "") { $newBranch = Read-Host "Enter the new Git branch name" } $stopWatch = [system.diagnostics.stopwatch]::startNew() @@ -91,31 +91,31 @@ 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..." - if (-not(Test-Path "$repoPath" -pathType container)) { throw "Can't access directory: $repoPath" } - $repoPathName = (Get-Item "$repoPath").Name + Write-Host "⏳ (2/6) Checking Git repository..." + if (-not(Test-Path "$pathToRepo" -pathType container)) { throw "Can't access directory: $pathToRepo" } + $repoName = (Get-Item "$pathToRepo").Name - "⏳ (3/6) Fetching latest updates..." - & git -C "$repoPath" fetch --all --recurse-submodules --prune --prune-tags --force + "⏳ (3/6) Fetching updates..." + & git -C "$pathToRepo" fetch --all --recurse-submodules --prune --prune-tags --force if ($lastExitCode -ne "0") { throw "'git fetch' failed with exit code $lastExitCode" } - $currentBranch = (git -C "$repoPath" rev-parse --abbrev-ref HEAD) + $currentBranch = (git -C "$pathToRepo" 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 "$repoPath" checkout -b "$newBranch" + & git -C "$pathToRepo" checkout -b "$newBranch" if ($lastExitCode -ne "0") { throw "'git checkout -b $newBranch' failed with exit code $lastExitCode" } "⏳ (5/6) Pushing updates..." - & git -C "$repoPath" push origin "$newBranch" + & git -C "$pathToRepo" push origin "$newBranch" if ($lastExitCode -ne "0") { throw "'git push origin $newBranch' failed with exit code $lastExitCode" } "⏳ (6/6) Updating submodules..." - & git -C "$repoPath" submodule update --init --recursive + & git -C "$pathToRepo" 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' in repo πŸ“‚$repoPathName (based on '$currentBranch') in $elapsed sec" + "βœ”οΈ Created branch '$newBranch' in πŸ“‚$repoName repository in $elapsed sec (based on '$currentBranch')" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -123,4 +123,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-branch.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-branch.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/new-email.md b/docs/new-email.md index 5512cf31..64a7a4b4 100644 --- a/docs/new-email.md +++ b/docs/new-email.md @@ -67,4 +67,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-email.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-email.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/new-linux-vm.md b/docs/new-linux-vm.md index fde808c0..539ce29d 100644 --- a/docs/new-linux-vm.md +++ b/docs/new-linux-vm.md @@ -38,4 +38,4 @@ $VMName = "linux" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-linux-vm.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-linux-vm.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/new-qrcode.md b/docs/new-qrcode.md index 6e59de69..91701c10 100644 --- a/docs/new-qrcode.md +++ b/docs/new-qrcode.md @@ -101,4 +101,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-qrcode.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-qrcode.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/new-script.md b/docs/new-script.md index b3d5653e..2df04311 100644 --- a/docs/new-script.md +++ b/docs/new-script.md @@ -74,4 +74,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-script.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-script.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/new-shortcut.md b/docs/new-shortcut.md index 9dbb14f3..43b240c5 100644 --- a/docs/new-shortcut.md +++ b/docs/new-shortcut.md @@ -100,4 +100,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-shortcut.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-shortcut.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/new-symlink.md b/docs/new-symlink.md index a3f528e6..6f6138ae 100644 --- a/docs/new-symlink.md +++ b/docs/new-symlink.md @@ -82,4 +82,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-symlink.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-symlink.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/new-tag.md b/docs/new-tag.md index 708000ee..91118512 100644 --- a/docs/new-tag.md +++ b/docs/new-tag.md @@ -101,4 +101,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-tag.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-tag.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/new-user.md b/docs/new-user.md index 1b5b55a7..7f9056d0 100644 --- a/docs/new-user.md +++ b/docs/new-user.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-user.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-user.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/new-windows-vm.md b/docs/new-windows-vm.md index 3b70d976..702fecf5 100644 --- a/docs/new-windows-vm.md +++ b/docs/new-windows-vm.md @@ -37,4 +37,4 @@ $VMName = "windows" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-windows-vm.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-windows-vm.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/new-zipfile.md b/docs/new-zipfile.md index 6ba02b00..43f0472a 100644 --- a/docs/new-zipfile.md +++ b/docs/new-zipfile.md @@ -73,4 +73,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-zipfile.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-zipfile.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/on-desktop-login.md b/docs/on-desktop-login.md index 36288db9..787ee04d 100644 --- a/docs/on-desktop-login.md +++ b/docs/on-desktop-login.md @@ -1,7 +1,7 @@ Script: *on-desktop-login.ps1* ======================== -This PowerShell script executes some 'welcome' tasks on desktop login by the user. +This PowerShell script executes some 'welcome' tasks on every desktop login by the user. NOTE: For installation on Windows create and put a symbolic link to this script into the Autostart folder (usually at: C:\Users\\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup). Parameters @@ -34,9 +34,9 @@ Script Content ```powershell <# .SYNOPSIS - Executes tasks on desktop login + Executes tasks on every desktop login .DESCRIPTION - This PowerShell script executes some 'welcome' tasks on desktop login by the user. + This PowerShell script executes some 'welcome' tasks on every desktop login by the user. NOTE: For installation on Windows create and put a symbolic link to this script into the Autostart folder (usually at: C:\Users\\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup). .EXAMPLE PS> ./on-desktop-login.ps1 @@ -50,10 +50,11 @@ try { & "$PSScriptRoot/write-big.ps1" "Welcome back" " " & "$PSScriptRoot/check-uptime.ps1" + & "$PSScriptRoot/check-pending-reboot.ps1" & "$PSScriptRoot/check-firewall.ps1" + & "$PSScriptRoot/check-smart-devices.ps1" & "$PSScriptRoot/check-swap-space.ps1" & "$PSScriptRoot/check-drives.ps1" - & "$PSScriptRoot/check-pending-reboot.ps1" & "$PSScriptRoot/open-dashboards.ps1" " " & "$PSScriptRoot/write-quote.ps1" @@ -73,4 +74,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of on-desktop-login.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of on-desktop-login.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/open-apps-folder.md b/docs/open-apps-folder.md index 7081d250..9af237ca 100644 --- a/docs/open-apps-folder.md +++ b/docs/open-apps-folder.md @@ -49,4 +49,4 @@ exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-apps-folder.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-apps-folder.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/open-auto-start-folder.md b/docs/open-auto-start-folder.md index cd4d4afa..0fe42434 100644 --- a/docs/open-auto-start-folder.md +++ b/docs/open-auto-start-folder.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-auto-start-folder.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-auto-start-folder.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/open-bing-maps.md b/docs/open-bing-maps.md index 016c840d..799ee0f4 100644 --- a/docs/open-bing-maps.md +++ b/docs/open-bing-maps.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-bing-maps.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-bing-maps.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/open-booking-com.md b/docs/open-booking-com.md index 08c5afca..90172cfe 100644 --- a/docs/open-booking-com.md +++ b/docs/open-booking-com.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-booking-com.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-booking-com.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/open-c-drive.md b/docs/open-c-drive.md index 5b62b20d..2fcad1c6 100644 --- a/docs/open-c-drive.md +++ b/docs/open-c-drive.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-c-drive.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-c-drive.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/open-calculator.md b/docs/open-calculator.md index 3b7be7fb..11360319 100644 --- a/docs/open-calculator.md +++ b/docs/open-calculator.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-calculator.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-calculator.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/open-chrome.md b/docs/open-chrome.md index f53aae21..e0ac50f5 100644 --- a/docs/open-chrome.md +++ b/docs/open-chrome.md @@ -66,4 +66,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-chrome.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-chrome.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/open-clock.md b/docs/open-clock.md index 72637c0b..f30e3e62 100644 --- a/docs/open-clock.md +++ b/docs/open-clock.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-clock.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-clock.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/open-cortana.md b/docs/open-cortana.md index a1380649..b30cba99 100644 --- a/docs/open-cortana.md +++ b/docs/open-cortana.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-cortana.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-cortana.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/open-d-drive.md b/docs/open-d-drive.md index f09efdbc..41344171 100644 --- a/docs/open-d-drive.md +++ b/docs/open-d-drive.md @@ -47,4 +47,4 @@ Script Content & "$PSScriptRoot/open-file-explorer.ps1" "D:" ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-d-drive.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-d-drive.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/open-dashboards.md b/docs/open-dashboards.md index 700a82d8..f2b4cc65 100644 --- a/docs/open-dashboards.md +++ b/docs/open-dashboards.md @@ -6,7 +6,16 @@ This PowerShell script launches the Web browser with 20 tabs of popular dashboar Parameters ---------- ```powershell -PS> ./open-dashboards.ps1 [] +PS> ./open-dashboards.ps1 [[-interval] ] [] + +-interval + Specifies the time interval (110ms per default) + + Required? false + Position? 1 + Default value 110 + Accept pipeline input? false + Accept wildcard characters? false [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, @@ -17,7 +26,8 @@ Example ------- ```powershell PS> ./open-dashboards.ps1 -βœ… Launching Web browser with 20 tabs showing: Toggl Track, Google Calendar, Google Mail, Google Keep, Google Photos, Google News, Outlook Mail, CNN News, GitHub Explore, FlightRadar24, Earthquake Watch, Live Cyber Threat Map, Live Traffic, Netflix Top 10, YouTube Music Charts, Webcams, Peak Zugspitze, Airport Salzburg, Windy Weather Radar, Windy Weather Temperatures, (Hint: execute './switch-tabs.ps1' for automated tab switching) +βœ… Launching Web browser with 20 tabs showing: Toggl Track, Google Calendar, Google Mail, ... +NOTE: Execute './switch-tabs.ps1' to switch from tab to tab automatically. ... ``` @@ -38,9 +48,12 @@ Script Content Open web dashboards .DESCRIPTION This PowerShell script launches the Web browser with 20 tabs of popular dashboard websites. +.PARAMETER interval + Specifies the time interval (110ms per default) .EXAMPLE PS> ./open-dashboards.ps1 - βœ… Launching Web browser with 20 tabs showing: Toggl Track, Google Calendar, Google Mail, Google Keep, Google Photos, Google News, Outlook Mail, CNN News, GitHub Explore, FlightRadar24, Earthquake Watch, Live Cyber Threat Map, Live Traffic, Netflix Top 10, YouTube Music Charts, Webcams, Peak Zugspitze, Airport Salzburg, Windy Weather Radar, Windy Weather Temperatures, (Hint: execute './switch-tabs.ps1' for automated tab switching) + βœ… Launching Web browser with 20 tabs showing: Toggl Track, Google Calendar, Google Mail, ... + NOTE: Execute './switch-tabs.ps1' to switch from tab to tab automatically. ... .LINK https://github.com/fleschutz/PowerShell @@ -48,18 +61,22 @@ Script Content Author: Markus Fleschutz | License: CC0 #> +param([int]$interval = 110) # milliseconds + try { Write-Progress "Reading Data/popular-dashboards.csv..." $table = Import-CSV "$PSScriptRoot/../data/popular-dashboards.csv" $numRows = $table.Length - Write-Progress -completed " " + Write-Progress -completed "Done." + Write-Host "βœ… Launching Web browser with 20 tabs showing: " -noNewline foreach($row in $table) { Write-Host "$($row.NAME), " -noNewline & "$PSScriptRoot/open-default-browser.ps1" "$($row.URL)" - Start-Sleep -milliseconds 100 + Start-Sleep -milliseconds $interval } - Write-Host "(Hint: execute './switch-tabs.ps1' for automated tab switching)" + Write-Host "" + 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])" @@ -67,4 +84,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-dashboards.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-dashboards.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/open-deep-l-translator.md b/docs/open-deep-l-translator.md index 059f3424..5b2b3c7a 100644 --- a/docs/open-deep-l-translator.md +++ b/docs/open-deep-l-translator.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-deep-l-translator.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-deep-l-translator.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/open-default-browser.md b/docs/open-default-browser.md index d7fbb80c..d2f9edef 100644 --- a/docs/open-default-browser.md +++ b/docs/open-default-browser.md @@ -66,4 +66,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-default-browser.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-default-browser.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/open-desktop-folder.md b/docs/open-desktop-folder.md index 0ae7776e..593b2b09 100644 --- a/docs/open-desktop-folder.md +++ b/docs/open-desktop-folder.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-desktop-folder.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-desktop-folder.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/open-documents-folder.md b/docs/open-documents-folder.md index 772a48e5..82e92bea 100644 --- a/docs/open-documents-folder.md +++ b/docs/open-documents-folder.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-documents-folder.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-documents-folder.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/open-downloads-folder.md b/docs/open-downloads-folder.md index 4744ba3c..75cd7eaf 100644 --- a/docs/open-downloads-folder.md +++ b/docs/open-downloads-folder.md @@ -61,4 +61,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-downloads-folder.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-downloads-folder.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/open-dropbox-folder.md b/docs/open-dropbox-folder.md index 207e1893..7841b851 100644 --- a/docs/open-dropbox-folder.md +++ b/docs/open-dropbox-folder.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-dropbox-folder.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-dropbox-folder.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/open-duck-duck-go.md b/docs/open-duck-duck-go.md index 8ca395a2..4f51e2f9 100644 --- a/docs/open-duck-duck-go.md +++ b/docs/open-duck-duck-go.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-duck-duck-go.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-duck-duck-go.ps1 as of 03/27/2024 17:36:29)* diff --git a/docs/open-e-drive.md b/docs/open-e-drive.md index 835aeabe..351adc6e 100644 --- a/docs/open-e-drive.md +++ b/docs/open-e-drive.md @@ -47,4 +47,4 @@ Script Content & "$PSScriptRoot/open-file-explorer.ps1" "E:" ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-e-drive.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-e-drive.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-edge.md b/docs/open-edge.md index 05bdf7e2..6ed9b161 100644 --- a/docs/open-edge.md +++ b/docs/open-edge.md @@ -48,4 +48,4 @@ Start-Process microsoft-edge:// exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-edge.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-edge.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-egg-timer.md b/docs/open-egg-timer.md index aa2f4a9a..87f564a7 100644 --- a/docs/open-egg-timer.md +++ b/docs/open-egg-timer.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-egg-timer.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-egg-timer.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-email-client.md b/docs/open-email-client.md index 624ba8a0..39a65acd 100644 --- a/docs/open-email-client.md +++ b/docs/open-email-client.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-email-client.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-email-client.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-f-drive.md b/docs/open-f-drive.md index 0c366bc0..dcaeaae4 100644 --- a/docs/open-f-drive.md +++ b/docs/open-f-drive.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-f-drive.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-f-drive.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-file-explorer.md b/docs/open-file-explorer.md index a8b1620e..1c777048 100644 --- a/docs/open-file-explorer.md +++ b/docs/open-file-explorer.md @@ -70,4 +70,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-file-explorer.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-file-explorer.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-fire-place.md b/docs/open-fire-place.md index 6751ddee..cec484c5 100644 --- a/docs/open-fire-place.md +++ b/docs/open-fire-place.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-fire-place.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-fire-place.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-firefox.md b/docs/open-firefox.md index 7b6b3853..a0e86963 100644 --- a/docs/open-firefox.md +++ b/docs/open-firefox.md @@ -73,4 +73,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-firefox.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-firefox.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-flight-radar.md b/docs/open-flight-radar.md index 005854ad..b79941f2 100644 --- a/docs/open-flight-radar.md +++ b/docs/open-flight-radar.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-flight-radar.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-flight-radar.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-g-drive.md b/docs/open-g-drive.md index 5c04be88..47ba3fad 100644 --- a/docs/open-g-drive.md +++ b/docs/open-g-drive.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-g-drive.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-g-drive.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-git-extensions.md b/docs/open-git-extensions.md index 453c9060..cb12c086 100644 --- a/docs/open-git-extensions.md +++ b/docs/open-git-extensions.md @@ -48,4 +48,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-git-extensions.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-git-extensions.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-google-books.md b/docs/open-google-books.md index c5e26344..5c5ac6cf 100644 --- a/docs/open-google-books.md +++ b/docs/open-google-books.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-books.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-books.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-google-calendar.md b/docs/open-google-calendar.md index 463fed65..b5a28eff 100644 --- a/docs/open-google-calendar.md +++ b/docs/open-google-calendar.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-calendar.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-calendar.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-google-contacts.md b/docs/open-google-contacts.md index 42e2ccea..23039f86 100644 --- a/docs/open-google-contacts.md +++ b/docs/open-google-contacts.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-contacts.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-contacts.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-google-docs.md b/docs/open-google-docs.md index be69270f..3d84904f 100644 --- a/docs/open-google-docs.md +++ b/docs/open-google-docs.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-docs.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-docs.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-google-earth.md b/docs/open-google-earth.md index 6427ee5b..4148c30d 100644 --- a/docs/open-google-earth.md +++ b/docs/open-google-earth.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-earth.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-earth.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-google-mail.md b/docs/open-google-mail.md index 93b3084d..e9e0c681 100644 --- a/docs/open-google-mail.md +++ b/docs/open-google-mail.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-mail.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-mail.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-google-maps.md b/docs/open-google-maps.md index 75b6a4d5..2e159842 100644 --- a/docs/open-google-maps.md +++ b/docs/open-google-maps.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-maps.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-maps.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-google-news.md b/docs/open-google-news.md index abb27019..282a2239 100644 --- a/docs/open-google-news.md +++ b/docs/open-google-news.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-news.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-news.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-google-photos.md b/docs/open-google-photos.md index c971eb06..738b011e 100644 --- a/docs/open-google-photos.md +++ b/docs/open-google-photos.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-photos.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-photos.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-google-play.md b/docs/open-google-play.md index eb36c318..9a6bb5d1 100644 --- a/docs/open-google-play.md +++ b/docs/open-google-play.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-play.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-play.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-google-search.md b/docs/open-google-search.md index 69009318..e91d41d6 100644 --- a/docs/open-google-search.md +++ b/docs/open-google-search.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-search.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-search.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-google-stadia.md b/docs/open-google-stadia.md index e45ebd6d..ec74803c 100644 --- a/docs/open-google-stadia.md +++ b/docs/open-google-stadia.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-stadia.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-stadia.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-google-translate.md b/docs/open-google-translate.md index cb32fd6d..6f359e0f 100644 --- a/docs/open-google-translate.md +++ b/docs/open-google-translate.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-translate.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-translate.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-home-folder.md b/docs/open-home-folder.md index 88bfb133..723d02da 100644 --- a/docs/open-home-folder.md +++ b/docs/open-home-folder.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-home-folder.ps1 as of 01/25/2024 13:58:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-home-folder.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-internet-archive.md b/docs/open-internet-archive.md index 73547780..caa9fb23 100644 --- a/docs/open-internet-archive.md +++ b/docs/open-internet-archive.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-internet-archive.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-internet-archive.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-jitsi-meet.md b/docs/open-jitsi-meet.md index 4cf5b315..e51a1f98 100644 --- a/docs/open-jitsi-meet.md +++ b/docs/open-jitsi-meet.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-jitsi-meet.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-jitsi-meet.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-m-drive.md b/docs/open-m-drive.md index 881e8f3f..1616c887 100644 --- a/docs/open-m-drive.md +++ b/docs/open-m-drive.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-m-drive.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-m-drive.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-magnifier.md b/docs/open-magnifier.md index d3947102..fb144d9d 100644 --- a/docs/open-magnifier.md +++ b/docs/open-magnifier.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-magnifier.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-magnifier.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-microsoft-paint.md b/docs/open-microsoft-paint.md index 4d4c84a8..6e448094 100644 --- a/docs/open-microsoft-paint.md +++ b/docs/open-microsoft-paint.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-microsoft-paint.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-microsoft-paint.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-microsoft-solitaire.md b/docs/open-microsoft-solitaire.md index 679cbf05..672e03e8 100644 --- a/docs/open-microsoft-solitaire.md +++ b/docs/open-microsoft-solitaire.md @@ -48,4 +48,4 @@ Start-Process xboxliveapp-1297287741: exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-microsoft-solitaire.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-microsoft-solitaire.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-microsoft-store.md b/docs/open-microsoft-store.md index d12ed060..99cff0c0 100644 --- a/docs/open-microsoft-store.md +++ b/docs/open-microsoft-store.md @@ -48,4 +48,4 @@ Start-Process ms-windows-store: exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-microsoft-store.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-microsoft-store.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-microsoft-teams.md b/docs/open-microsoft-teams.md index 9d2568cf..916dc3b7 100644 --- a/docs/open-microsoft-teams.md +++ b/docs/open-microsoft-teams.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-microsoft-teams.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-microsoft-teams.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-music-folder.md b/docs/open-music-folder.md index d9521b4d..a27e946a 100644 --- a/docs/open-music-folder.md +++ b/docs/open-music-folder.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-music-folder.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-music-folder.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-netflix.md b/docs/open-netflix.md index 608f817a..5e5511db 100644 --- a/docs/open-netflix.md +++ b/docs/open-netflix.md @@ -48,4 +48,4 @@ Start-Process netflix: exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-netflix.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-netflix.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-note-pad.md b/docs/open-note-pad.md index 62745350..a6cfc291 100644 --- a/docs/open-note-pad.md +++ b/docs/open-note-pad.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-note-pad.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-note-pad.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-obs-studio.md b/docs/open-obs-studio.md index 00dc9c02..27d57fed 100644 --- a/docs/open-obs-studio.md +++ b/docs/open-obs-studio.md @@ -47,4 +47,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-obs-studio.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-obs-studio.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-office-365.md b/docs/open-office-365.md index e87f9b5b..468a7a66 100644 --- a/docs/open-office-365.md +++ b/docs/open-office-365.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-office-365.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-office-365.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-one-drive-folder.md b/docs/open-one-drive-folder.md index 64017395..f84690ef 100644 --- a/docs/open-one-drive-folder.md +++ b/docs/open-one-drive-folder.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-one-drive-folder.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-one-drive-folder.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-outlook.md b/docs/open-outlook.md index a4368d39..c31f46d7 100644 --- a/docs/open-outlook.md +++ b/docs/open-outlook.md @@ -47,4 +47,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-outlook.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-outlook.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-paint-three-d.md b/docs/open-paint-three-d.md index 9a0a25c3..4d682d06 100644 --- a/docs/open-paint-three-d.md +++ b/docs/open-paint-three-d.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-paint-three-d.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-paint-three-d.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-pictures-folder.md b/docs/open-pictures-folder.md index 4e678d48..0a69dd18 100644 --- a/docs/open-pictures-folder.md +++ b/docs/open-pictures-folder.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-pictures-folder.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-pictures-folder.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-rdp.md b/docs/open-rdp.md index 1d968011..ec05e3c2 100644 --- a/docs/open-rdp.md +++ b/docs/open-rdp.md @@ -64,4 +64,4 @@ if ($hostname -eq "") { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-rdp.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-rdp.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-recycle-bin-folder.md b/docs/open-recycle-bin-folder.md index 3b8539ed..a1bafbd1 100644 --- a/docs/open-recycle-bin-folder.md +++ b/docs/open-recycle-bin-folder.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-recycle-bin-folder.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-recycle-bin-folder.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-remote-desktop.md b/docs/open-remote-desktop.md index d01caab4..08bb8369 100644 --- a/docs/open-remote-desktop.md +++ b/docs/open-remote-desktop.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-remote-desktop.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-remote-desktop.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-repos-folder.md b/docs/open-repos-folder.md index b7db9a08..4b3aabea 100644 --- a/docs/open-repos-folder.md +++ b/docs/open-repos-folder.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-repos-folder.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-repos-folder.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-screen-clip.md b/docs/open-screen-clip.md index 9e67ccaa..636d4342 100644 --- a/docs/open-screen-clip.md +++ b/docs/open-screen-clip.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-screen-clip.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-screen-clip.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-screen-sketch.md b/docs/open-screen-sketch.md index db442a18..cf6dd937 100644 --- a/docs/open-screen-sketch.md +++ b/docs/open-screen-sketch.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-screen-sketch.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-screen-sketch.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-skype.md b/docs/open-skype.md index f87ae7e7..54245bcf 100644 --- a/docs/open-skype.md +++ b/docs/open-skype.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-skype.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-skype.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-snipping-tool.md b/docs/open-snipping-tool.md index af9db339..cbd1a9c9 100644 --- a/docs/open-snipping-tool.md +++ b/docs/open-snipping-tool.md @@ -48,4 +48,4 @@ Start-Process SnippingTool.exe exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-snipping-tool.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-snipping-tool.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-speed-test.md b/docs/open-speed-test.md index aa2cef59..f62626ae 100644 --- a/docs/open-speed-test.md +++ b/docs/open-speed-test.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-speed-test.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-speed-test.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-spotify.md b/docs/open-spotify.md index 3403c68d..f01c0230 100644 --- a/docs/open-spotify.md +++ b/docs/open-spotify.md @@ -48,4 +48,4 @@ Start-Process spotify: exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-spotify.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-spotify.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-stack-overflow.md b/docs/open-stack-overflow.md index 0c0d2057..fc2928ad 100644 --- a/docs/open-stack-overflow.md +++ b/docs/open-stack-overflow.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-stack-overflow.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-stack-overflow.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-start-page.md b/docs/open-start-page.md index aa94fcd5..b3970bfc 100644 --- a/docs/open-start-page.md +++ b/docs/open-start-page.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-start-page.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-start-page.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-street-map.md b/docs/open-street-map.md index b6d7d225..fccc4aa3 100644 --- a/docs/open-street-map.md +++ b/docs/open-street-map.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-street-map.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-street-map.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-task-manager.md b/docs/open-task-manager.md index 93227c94..b5ee31a5 100644 --- a/docs/open-task-manager.md +++ b/docs/open-task-manager.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-task-manager.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-task-manager.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-temporary-folder.md b/docs/open-temporary-folder.md index 5e5b39ea..e5a4ceb9 100644 --- a/docs/open-temporary-folder.md +++ b/docs/open-temporary-folder.md @@ -50,4 +50,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-temporary-folder.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-temporary-folder.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-three-d-viewer.md b/docs/open-three-d-viewer.md index b2f646df..c27199e5 100644 --- a/docs/open-three-d-viewer.md +++ b/docs/open-three-d-viewer.md @@ -48,4 +48,4 @@ Start-Process com.microsoft.3dviewer: exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-three-d-viewer.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-three-d-viewer.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-thunderbird.md b/docs/open-thunderbird.md index 0611f532..cc5c5f41 100644 --- a/docs/open-thunderbird.md +++ b/docs/open-thunderbird.md @@ -45,4 +45,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-thunderbird.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-thunderbird.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-videos-folders.md b/docs/open-videos-folders.md index ebf2dc75..4335e7b3 100644 --- a/docs/open-videos-folders.md +++ b/docs/open-videos-folders.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-videos-folders.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-videos-folders.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-visual-studio.md b/docs/open-visual-studio.md index caa0d9ee..f5e2280a 100644 --- a/docs/open-visual-studio.md +++ b/docs/open-visual-studio.md @@ -47,4 +47,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-visual-studio.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-visual-studio.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-vpn-settings.md b/docs/open-vpn-settings.md index d307bc0b..5ead3420 100644 --- a/docs/open-vpn-settings.md +++ b/docs/open-vpn-settings.md @@ -48,4 +48,4 @@ Start-Process ms-settings:network-vpn exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-vpn-settings.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-vpn-settings.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-windows-defender.md b/docs/open-windows-defender.md index a0387b8f..cadc7cbf 100644 --- a/docs/open-windows-defender.md +++ b/docs/open-windows-defender.md @@ -48,4 +48,4 @@ Start-Process windowsdefender: exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-windows-defender.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-windows-defender.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-windows-terminal.md b/docs/open-windows-terminal.md index c924ffa3..25490b06 100644 --- a/docs/open-windows-terminal.md +++ b/docs/open-windows-terminal.md @@ -48,4 +48,4 @@ Start-Process wt.exe exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-windows-terminal.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-windows-terminal.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/open-xing.md b/docs/open-xing.md index c1ee7277..2d5b9431 100644 --- a/docs/open-xing.md +++ b/docs/open-xing.md @@ -48,4 +48,4 @@ Start-Process xing: exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-xing.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-xing.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/pick-commit.md b/docs/pick-commit.md index 83ea717c..533b1b8e 100644 --- a/docs/pick-commit.md +++ b/docs/pick-commit.md @@ -151,4 +151,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of pick-commit.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of pick-commit.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/ping-host.md b/docs/ping-host.md new file mode 100644 index 00000000..bed4ff99 --- /dev/null +++ b/docs/ping-host.md @@ -0,0 +1,135 @@ +Script: *ping-host.ps1* +======================== + +This PowerShell script pings the given host continously and shows the roundtrip times in a horizontal chart. + +Parameters +---------- +```powershell +PS> ./ping-host.ps1 [[-hostname] ] [[-timeInterval] ] [] + +-hostname + Specifies the hostname or IP address of the host to ping (windows.com by default) + + Required? false + Position? 1 + Default value windows.com + Accept pipeline input? false + Accept wildcard characters? false + +-timeInterval + Specifies the time interval in milliseconds to repeat the ping (1000 by default) + + Required? false + Position? 2 + Default value 1000 + Accept pipeline input? false + Accept wildcard characters? false + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Example +------- +```powershell +PS> ./ping-host.ps1 + + + +Ping Roundtrip Times to Host: windows.com +β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 136ms +β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 154ms +β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 234ms +... + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Ping a host continuously +.DESCRIPTION + This PowerShell script pings the given host continously and shows the roundtrip times in a horizontal chart. +.PARAMETER hostname + Specifies the hostname or IP address of the host to ping (windows.com by default) +.PARAMETER timeInterval + Specifies the time interval in milliseconds to repeat the ping (1000 by default) +.EXAMPLE + PS> ./ping-host.ps1 + + Ping Roundtrip Times to Host: windows.com + β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 136ms + β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 154ms + β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 234ms + ... +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +param([string]$hostname = "windows.com", [int]$timeInterval = 1000) + +function GetPingLatency([string]$hostname) { + $hostsArray = $hostname.Split(",") + $tasks = $hostsArray | foreach { + (New-Object Net.NetworkInformation.Ping).SendPingAsync($_,1000) + } + [Threading.Tasks.Task]::WaitAll($tasks) + foreach($ping in $tasks.Result) { + if ($ping.Status -eq "Success") { return $ping.RoundtripTime } + } + return 1000 +} + +function WriteChartLine { param([float]$value, [float]$maxValue, [string]$text) + $num = ($value * 110.0) / $maxValue + while ($num -ge 1.0) { + Write-Host -noNewLine "β–ˆ" + $num -= 1.0 + } + if ($num -ge 0.875) { + Write-Host -noNewLine "β–‰" + } elseif ($num -ge 0.75) { + Write-Host -noNewLine "β–Š" + } elseif ($num -ge 0.625) { + Write-Host -noNewLine "β–‹" + } elseif ($num -ge 0.5) { + Write-Host -noNewLine "β–Œ" + } elseif ($num -ge 0.375) { + Write-Host -noNewLine "▍" + } elseif ($num -ge 0.25) { + Write-Host -noNewLine "β–Ž" + } elseif ($num -ge 0.125) { + Write-Host -noNewLine "▏" + } + Write-Host " $text" +} + +try { + Write-Host "`nPing Roundtrip Times to Host: $($hostname)" -foregroundColor green + do { + [float]$latency = GetPingLatency $hostname + WriteChartLine $latency 1000.0 "$($latency)ms" + Start-Sleep -Milliseconds $timeInterval + } while($true) + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of ping-host.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/ping-local-hosts.md b/docs/ping-local-hosts.md index c01d8ade..1a7a6bd4 100644 --- a/docs/ping-local-hosts.md +++ b/docs/ping-local-hosts.md @@ -17,7 +17,7 @@ Example ------- ```powershell PS> ./ping-local-hosts.ps1 -βœ… Up: Hippo Jenkins01 Jenkins02 Rocket Vega +βœ… Up: hippo jenkins01 jenkins02 rocket vega ``` @@ -39,44 +39,43 @@ Script Content This PowerShell script pings the computers in the local network and lists which one are up. .EXAMPLE PS> ./ping-local-hosts.ps1 - βœ… Up: Hippo Jenkins01 Jenkins02 Rocket Vega + βœ… Up: hippo jenkins01 jenkins02 rocket vega .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +$names = @('ad','amnesiac','archlinux','auriga','berlin','boston','brother','canon','castor','cisco','echodot','epson','fedora','fireball','firewall','fritz.box','fritz!repeater','gassensor','gateway','hippo','heizung','hodor','homemanager','io','iphone','jarvis','jenkins','la','laptop','jupiter','mars','mercury','miami','mobile','none','none-1','none-2','ny','octopi','office','officepc','paris','pi','pixel-6a','pluto','printer','proxy','r2d2','raspberry','rocket','rome','router','sentinel','server','shelly1','smartphone','smartwatch','soundbar','sunnyboy','surface','switch','tablet','tau','tigercat','tolino','tv','ubuntu','vega','venus','xrx','zeus') # sorted alphabetically +[int]$pingTimeout = 600 # ms + try { Write-Progress "Sending pings to the local hosts..." - [string]$hosts = "Amnesiac,ArchLinux,Berlin,Boston,Brother,Canon,Castor,Cisco,EchoDot,Epson,Fedora,Fireball,Firewall,fritz.box,GasSensor,Gateway,Hippo,HomeManager,Io,iPhone,Jarvis,Jenkins01,Jenkins02,LA,Laptop,Jupiter,Mars,Mercury,Miami,Mobile,NY,OctoPi,Paris,Pixel-6a,Pluto,Printer,Proxy,R2D2,Raspberry,Rocket,Rome,Router,Server,Shelly1,SmartPhone,SmartWatch,Soundbar,Sunnyboy,Surface,Switch,Tablet,Tolino,TV,Ubuntu,Vega,Venus,XRX,Zeus" # sorted alphabetically - $hostsArray = $hosts.Split(",") - $count = $hostsArray.Count - [int]$timeout = 600 # ms $queue = [System.Collections.Queue]::new() - foreach($hostname in $hostsArray) { + foreach($name in $names) { $ping = [System.Net.Networkinformation.Ping]::new() - $obj = @{ Host = $hostname; Ping = $ping; Async = $ping.SendPingAsync($hostname, $timeout) } - $queue.Enqueue($obj) + $queue.Enqueue( @{Host=$name; Ping=$ping; Async=$ping.SendPingAsync($name, $pingTimeout)} ) } - [string]$result = "" - while ($queue.Count -gt 0) { + $up = "" + do { $obj = $queue.Dequeue() try { - if ($obj.Async.Wait($timeout) -eq $true) { + if ($obj.Async.Wait($pingTimeout)) { if ($obj.Async.Result.Status -ne "TimedOut") { - $result += "$($obj.Host) " + $up += "$($obj.Host) " } continue } } catch { - if ($obj.Async.IsCompleted -eq $true) { continue } + if ($obj.Async.IsCompleted) { continue } } $queue.Enqueue($obj) - } - Write-Progress -completed "Done." - Write-Host "βœ… Up: $($result)" + } while ($queue.Count -gt 0) + + Write-Progress -completed "done." + Write-Host "βœ… Up: $($up)" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -84,4 +83,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of ping-local-hosts.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of ping-local-hosts.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/ping-remote-hosts.md b/docs/ping-remote-hosts.md index 60573bfc..0e4725fa 100644 --- a/docs/ping-remote-hosts.md +++ b/docs/ping-remote-hosts.md @@ -90,4 +90,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of ping-remote-hosts.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of ping-remote-hosts.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/ping-weather.md b/docs/ping-weather.md index 10f40fce..6f43fe13 100644 --- a/docs/ping-weather.md +++ b/docs/ping-weather.md @@ -99,4 +99,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of ping-weather.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of ping-weather.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/play-bee-sound.md b/docs/play-bee-sound.md index fb080515..094c1933 100644 --- a/docs/play-bee-sound.md +++ b/docs/play-bee-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-bee-sound.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-bee-sound.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/play-beep-sound.md b/docs/play-beep-sound.md index f5f57ffa..07ff6f21 100644 --- a/docs/play-beep-sound.md +++ b/docs/play-beep-sound.md @@ -56,4 +56,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-beep-sound.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-beep-sound.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/play-cat-sound.md b/docs/play-cat-sound.md index cbaa7f34..92d24dc2 100644 --- a/docs/play-cat-sound.md +++ b/docs/play-cat-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-cat-sound.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-cat-sound.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/play-cow-sound.md b/docs/play-cow-sound.md index b490d772..477ef88d 100644 --- a/docs/play-cow-sound.md +++ b/docs/play-cow-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-cow-sound.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-cow-sound.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/play-dog-sound.md b/docs/play-dog-sound.md index 7c328ada..33aa1371 100644 --- a/docs/play-dog-sound.md +++ b/docs/play-dog-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-dog-sound.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-dog-sound.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/play-donkey-sound.md b/docs/play-donkey-sound.md index 79cd7400..311cc035 100644 --- a/docs/play-donkey-sound.md +++ b/docs/play-donkey-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-donkey-sound.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-donkey-sound.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/play-elephant-sound.md b/docs/play-elephant-sound.md index 9c7e0a20..6d761ebd 100644 --- a/docs/play-elephant-sound.md +++ b/docs/play-elephant-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-elephant-sound.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-elephant-sound.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/play-elk-sound.md b/docs/play-elk-sound.md index 53797cf0..c49fd658 100644 --- a/docs/play-elk-sound.md +++ b/docs/play-elk-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-elk-sound.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-elk-sound.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/play-files.md b/docs/play-files.md index 1bb5c55d..8ad08608 100644 --- a/docs/play-files.md +++ b/docs/play-files.md @@ -76,4 +76,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-files.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-files.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/play-frog-sound.md b/docs/play-frog-sound.md index 6b535139..7d4805c6 100644 --- a/docs/play-frog-sound.md +++ b/docs/play-frog-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-frog-sound.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-frog-sound.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/play-goat-sound.md b/docs/play-goat-sound.md index 4057e742..3c617a2e 100644 --- a/docs/play-goat-sound.md +++ b/docs/play-goat-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-goat-sound.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-goat-sound.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/play-gorilla-sound.md b/docs/play-gorilla-sound.md index 84d6414b..c7a3c597 100644 --- a/docs/play-gorilla-sound.md +++ b/docs/play-gorilla-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-gorilla-sound.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-gorilla-sound.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/play-happy-birthday.md b/docs/play-happy-birthday.md index e8d950b1..8053d6a9 100644 --- a/docs/play-happy-birthday.md +++ b/docs/play-happy-birthday.md @@ -79,4 +79,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-happy-birthday.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-happy-birthday.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/play-horse-sound.md b/docs/play-horse-sound.md index c8224d77..91ae656d 100644 --- a/docs/play-horse-sound.md +++ b/docs/play-horse-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-horse-sound.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-horse-sound.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/play-imperial-march.md b/docs/play-imperial-march.md index 6d42f3c5..52911a5d 100644 --- a/docs/play-imperial-march.md +++ b/docs/play-imperial-march.md @@ -72,4 +72,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-imperial-march.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-imperial-march.ps1 as of 03/27/2024 17:36:30)* diff --git a/docs/play-jingle-bells.md b/docs/play-jingle-bells.md index c52783c9..df2ac063 100644 --- a/docs/play-jingle-bells.md +++ b/docs/play-jingle-bells.md @@ -201,4 +201,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-jingle-bells.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-jingle-bells.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/play-lion-sound.md b/docs/play-lion-sound.md index ab5b1698..1b855203 100644 --- a/docs/play-lion-sound.md +++ b/docs/play-lion-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-lion-sound.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-lion-sound.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/play-m3u.md b/docs/play-m3u.md index 380da776..cde764eb 100644 --- a/docs/play-m3u.md +++ b/docs/play-m3u.md @@ -92,4 +92,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-m3u.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-m3u.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/play-mission-impossible.md b/docs/play-mission-impossible.md index 977f19f2..8b8c1360 100644 --- a/docs/play-mission-impossible.md +++ b/docs/play-mission-impossible.md @@ -100,4 +100,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-mission-impossible.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-mission-impossible.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/play-mp3.md b/docs/play-mp3.md index 4d8f3336..ed271b0d 100644 --- a/docs/play-mp3.md +++ b/docs/play-mp3.md @@ -91,4 +91,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-mp3.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-mp3.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/play-parrot-sound.md b/docs/play-parrot-sound.md index 240bd37f..146dd67e 100644 --- a/docs/play-parrot-sound.md +++ b/docs/play-parrot-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-parrot-sound.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-parrot-sound.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/play-pig-sound.md b/docs/play-pig-sound.md index 98117469..4c5e33f0 100644 --- a/docs/play-pig-sound.md +++ b/docs/play-pig-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-pig-sound.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-pig-sound.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/play-pong.md b/docs/play-pong.md index 94e80e21..ee59ef48 100644 --- a/docs/play-pong.md +++ b/docs/play-pong.md @@ -176,4 +176,4 @@ while ($true) { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-pong.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-pong.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/play-rattlesnake-sound.md b/docs/play-rattlesnake-sound.md index f4b59a6a..a2941452 100644 --- a/docs/play-rattlesnake-sound.md +++ b/docs/play-rattlesnake-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-rattlesnake-sound.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-rattlesnake-sound.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/play-rick.md b/docs/play-rick.md index 338ca040..9f263946 100644 --- a/docs/play-rick.md +++ b/docs/play-rick.md @@ -49,4 +49,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-rick.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-rick.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/play-snake.md b/docs/play-snake.md index 9ff08513..e7a8b478 100644 --- a/docs/play-snake.md +++ b/docs/play-snake.md @@ -86,4 +86,4 @@ Start-Sleep -milliseconds 300 exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-snake.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-snake.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/play-super-mario.md b/docs/play-super-mario.md index 162a1d41..7be758af 100644 --- a/docs/play-super-mario.md +++ b/docs/play-super-mario.md @@ -71,4 +71,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-super-mario.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-super-mario.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/play-tetris-melody.md b/docs/play-tetris-melody.md index e3efc68e..2d5e2163 100644 --- a/docs/play-tetris-melody.md +++ b/docs/play-tetris-melody.md @@ -161,4 +161,4 @@ Start-Sleep -milliseconds 500 exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-tetris-melody.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-tetris-melody.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/play-vulture-sound.md b/docs/play-vulture-sound.md index c28dd430..f07d9fed 100644 --- a/docs/play-vulture-sound.md +++ b/docs/play-vulture-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-vulture-sound.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-vulture-sound.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/play-wolf-sound.md b/docs/play-wolf-sound.md index 3c1c2c91..939bc8ee 100644 --- a/docs/play-wolf-sound.md +++ b/docs/play-wolf-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-wolf-sound.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-wolf-sound.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/poweroff.md b/docs/poweroff.md index bfe92c15..7083db95 100644 --- a/docs/poweroff.md +++ b/docs/poweroff.md @@ -59,4 +59,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of poweroff.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of poweroff.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/print-image.md b/docs/print-image.md index 8a50d07e..36eb2e5e 100644 --- a/docs/print-image.md +++ b/docs/print-image.md @@ -69,4 +69,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of print-image.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of print-image.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/publish-to-ipfs.md b/docs/publish-to-ipfs.md index b9796194..9eba2650 100644 --- a/docs/publish-to-ipfs.md +++ b/docs/publish-to-ipfs.md @@ -119,4 +119,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of publish-to-ipfs.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of publish-to-ipfs.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/pull-repo.md b/docs/pull-repo.md index 3f7e8cf6..66975a25 100644 --- a/docs/pull-repo.md +++ b/docs/pull-repo.md @@ -97,4 +97,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of pull-repo.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of pull-repo.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/pull-repos.md b/docs/pull-repos.md index 30324cbe..6f9f317b 100644 --- a/docs/pull-repos.md +++ b/docs/pull-repos.md @@ -26,7 +26,7 @@ Example ------- ```powershell PS> ./pull-repos C:\MyRepos -⏳ (1) Searching for Git executable... git version 2.42.0 +⏳ (1) Searching for Git executable... git version 2.43.0 ⏳ (2) Checking parent folder... 33 subfolders ⏳ (3/35) Pulling into πŸ“‚base256unicode... ... @@ -53,7 +53,7 @@ Script Content Specifies the path to the parent folder .EXAMPLE PS> ./pull-repos C:\MyRepos - ⏳ (1) Searching for Git executable... git version 2.42.0 + ⏳ (1) Searching for Git executable... git version 2.43.0 ⏳ (2) Checking parent folder... 33 subfolders ⏳ (3/35) Pulling into πŸ“‚base256unicode... ... @@ -93,12 +93,17 @@ try { $step++ } [int]$elapsed = $stopWatch.Elapsed.TotalSeconds - "βœ”οΈ Pulled updates into $numFolders repos under πŸ“‚$parentDirName ($failed failed, took $elapsed sec)" - exit 0 # success + if ($failed -eq 0) { + "βœ”οΈ Updated $numFolders repos under πŸ“‚$parentDirName in $elapsed sec." + exit 0 # success + } else { + "⚠️ Updated $numFolders repos under πŸ“‚$parentDirName but $failed failed (took $elapsed sec)." + exit 1 + } } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" exit 1 } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of pull-repos.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of pull-repos.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/query-smart-data.md b/docs/query-smart-data.md index 0ec59689..42314fb0 100644 --- a/docs/query-smart-data.md +++ b/docs/query-smart-data.md @@ -106,4 +106,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of query-smart-data.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of query-smart-data.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/reboot-fritzbox.md b/docs/reboot-fritzbox.md index 66b7243c..f31061aa 100644 --- a/docs/reboot-fritzbox.md +++ b/docs/reboot-fritzbox.md @@ -152,4 +152,4 @@ echo $Result exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of reboot-fritzbox.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of reboot-fritzbox.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/reboot.md b/docs/reboot.md index 523ef535..be9488f2 100644 --- a/docs/reboot.md +++ b/docs/reboot.md @@ -59,4 +59,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of reboot.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of reboot.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/remind-me.md b/docs/remind-me.md index 5ad2dd6a..2fcf8803 100644 --- a/docs/remind-me.md +++ b/docs/remind-me.md @@ -88,4 +88,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of remind-me.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of remind-me.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/remove-dir-tree.md b/docs/remove-dir-tree.md new file mode 100644 index 00000000..ad25d6df --- /dev/null +++ b/docs/remove-dir-tree.md @@ -0,0 +1,72 @@ +Script: *remove-dir-tree.ps1* +======================== + +This PowerShell script silently removes a directory tree recursively. Use it with care! + +Parameters +---------- +```powershell +PS> ./remove-dir-tree.ps1 [[-pathToDirTree] ] [] + +-pathToDirTree + Specifies the file path to the directory tree + + Required? false + Position? 1 + Default value + Accept pipeline input? false + 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-tree.ps1 C:\Temp + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Removes a dir tree +.DESCRIPTION + This PowerShell script silently removes a directory tree recursively. Use it with care! +.PARAMETER pathToDirTree + Specifies the file path to the directory tree +.EXAMPLE + PS> ./remove-dir-tree.ps1 C:\Temp +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +param([string]$pathToDirTree = "") + +try { + if ($pathToDirTree -eq "" ) { $pathToDirTree = Read-Host "Enter the path to the directory tree" } + + Remove-Item -Force -Recurse -Confirm:$false $pathToDirTree + + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of remove-dir-tree.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/remove-empty-dirs.md b/docs/remove-empty-dirs.md index 8bcd39cc..9eac2ba3 100644 --- a/docs/remove-empty-dirs.md +++ b/docs/remove-empty-dirs.md @@ -91,4 +91,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of remove-empty-dirs.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of remove-empty-dirs.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/remove-old-dirs.md b/docs/remove-old-dirs.md index 710ab4b0..42f170b3 100644 --- a/docs/remove-old-dirs.md +++ b/docs/remove-old-dirs.md @@ -92,4 +92,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of remove-old-dirs.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of remove-old-dirs.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/remove-print-jobs.md b/docs/remove-print-jobs.md index efd1ee5b..bf7f126d 100644 --- a/docs/remove-print-jobs.md +++ b/docs/remove-print-jobs.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of remove-print-jobs.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of remove-print-jobs.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/remove-tag.md b/docs/remove-tag.md index 328d7fcb..bc981eb5 100644 --- a/docs/remove-tag.md +++ b/docs/remove-tag.md @@ -111,4 +111,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of remove-tag.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of remove-tag.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/remove-vm.md b/docs/remove-vm.md index db221350..456be6ca 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 ``` -*(generated by convert-ps2md.ps1 using the comment-based help of remove-vm.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of remove-vm.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/replace-in-files.md b/docs/replace-in-files.md index 201679a6..22cc54b0 100644 --- a/docs/replace-in-files.md +++ b/docs/replace-in-files.md @@ -105,4 +105,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of replace-in-files.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of replace-in-files.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/restart-network-adapters.md b/docs/restart-network-adapters.md index fb5ff279..d5eca180 100644 --- a/docs/restart-network-adapters.md +++ b/docs/restart-network-adapters.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of restart-network-adapters.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of restart-network-adapters.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/roll-a-dice.md b/docs/roll-a-dice.md index ac540a89..538a42f5 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 ``` -*(generated by convert-ps2md.ps1 using the comment-based help of roll-a-dice.ps1 as of 01/25/2024 13:58:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of roll-a-dice.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/save-credentials.md b/docs/save-credentials.md index 7f3f4d64..afdbaa41 100644 --- a/docs/save-credentials.md +++ b/docs/save-credentials.md @@ -73,4 +73,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of save-credentials.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of save-credentials.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/save-screenshot.md b/docs/save-screenshot.md index 2b3a6991..4d633942 100644 --- a/docs/save-screenshot.md +++ b/docs/save-screenshot.md @@ -98,4 +98,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of save-screenshot.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of save-screenshot.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/scan-ports.md b/docs/scan-ports.md index 956ee658..852851cc 100644 --- a/docs/scan-ports.md +++ b/docs/scan-ports.md @@ -65,4 +65,4 @@ foreach($add in $range) { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of scan-ports.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of scan-ports.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/search-filename.md b/docs/search-filename.md index 01a712ea..b65d251f 100644 --- a/docs/search-filename.md +++ b/docs/search-filename.md @@ -96,4 +96,4 @@ Search-Folder -FilePath $path -SearchTerm $term exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of search-filename.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of search-filename.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/search-files.md b/docs/search-files.md index e683f6f0..fabf14e5 100644 --- a/docs/search-files.md +++ b/docs/search-files.md @@ -92,4 +92,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of search-files.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of search-files.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/send-email.md b/docs/send-email.md index 0cf7d552..25b0107d 100644 --- a/docs/send-email.md +++ b/docs/send-email.md @@ -121,4 +121,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of send-email.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of send-email.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/send-tcp.md b/docs/send-tcp.md index 8c9974cb..6c20fa2e 100644 --- a/docs/send-tcp.md +++ b/docs/send-tcp.md @@ -104,4 +104,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of send-tcp.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of send-tcp.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/send-udp.md b/docs/send-udp.md index 9def2ecf..a4a17137 100644 --- a/docs/send-udp.md +++ b/docs/send-udp.md @@ -102,4 +102,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of send-udp.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of send-udp.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/set-timer.md b/docs/set-timer.md index bf03126d..f892964c 100644 --- a/docs/set-timer.md +++ b/docs/set-timer.md @@ -74,4 +74,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of set-timer.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of set-timer.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/set-volume.md b/docs/set-volume.md index 9c2c59f2..00b4189c 100644 --- a/docs/set-volume.md +++ b/docs/set-volume.md @@ -77,4 +77,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of set-volume.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of set-volume.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/set-wallpaper.md b/docs/set-wallpaper.md index 2cf2117c..0ca77a2d 100644 --- a/docs/set-wallpaper.md +++ b/docs/set-wallpaper.md @@ -122,4 +122,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of set-wallpaper.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of set-wallpaper.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/show-lightnings.md b/docs/show-lightnings.md index a80e97ba..39a84a03 100644 --- a/docs/show-lightnings.md +++ b/docs/show-lightnings.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of show-lightnings.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of show-lightnings.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/show-notification.md b/docs/show-notification.md index 79d5796e..9efd354c 100644 --- a/docs/show-notification.md +++ b/docs/show-notification.md @@ -87,4 +87,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of show-notification.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of show-notification.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/show-traffic.md b/docs/show-traffic.md index 69049eac..7e2a76f0 100644 --- a/docs/show-traffic.md +++ b/docs/show-traffic.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of show-traffic.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of show-traffic.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/simulate-presence.md b/docs/simulate-presence.md index 4b7e9730..5583e63d 100644 --- a/docs/simulate-presence.md +++ b/docs/simulate-presence.md @@ -74,4 +74,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of simulate-presence.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of simulate-presence.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/smart-data2csv.md b/docs/smart-data2csv.md index 6f52f42d..18ae0686 100644 --- a/docs/smart-data2csv.md +++ b/docs/smart-data2csv.md @@ -141,4 +141,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of smart-data2csv.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of smart-data2csv.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/speak-arabic.md b/docs/speak-arabic.md index 175359fd..1aea102c 100644 --- a/docs/speak-arabic.md +++ b/docs/speak-arabic.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-arabic.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-arabic.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/speak-checklist.md b/docs/speak-checklist.md index bbe23eee..16e12102 100644 --- a/docs/speak-checklist.md +++ b/docs/speak-checklist.md @@ -78,4 +78,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-checklist.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-checklist.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/speak-countdown.md b/docs/speak-countdown.md index 61cacb27..7cb1d73a 100644 --- a/docs/speak-countdown.md +++ b/docs/speak-countdown.md @@ -70,4 +70,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-countdown.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-countdown.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/speak-croatian.md b/docs/speak-croatian.md index af94f756..a4276e4e 100644 --- a/docs/speak-croatian.md +++ b/docs/speak-croatian.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-croatian.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-croatian.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/speak-danish.md b/docs/speak-danish.md index f9042a81..71da933b 100644 --- a/docs/speak-danish.md +++ b/docs/speak-danish.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-danish.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-danish.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/speak-dutch.md b/docs/speak-dutch.md index 0a6c713d..c1ff0020 100644 --- a/docs/speak-dutch.md +++ b/docs/speak-dutch.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-dutch.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-dutch.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/speak-english.md b/docs/speak-english.md index 70e48b42..ccaa5af6 100644 --- a/docs/speak-english.md +++ b/docs/speak-english.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-english.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-english.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/speak-epub.md b/docs/speak-epub.md index 31999440..7219e143 100644 --- a/docs/speak-epub.md +++ b/docs/speak-epub.md @@ -139,4 +139,4 @@ foreach($item in $content.package.manifest.Item) { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-epub.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-epub.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/speak-esperanto.md b/docs/speak-esperanto.md index 02f48591..ac503488 100644 --- a/docs/speak-esperanto.md +++ b/docs/speak-esperanto.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-esperanto.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-esperanto.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/speak-file.md b/docs/speak-file.md index 2054bffd..b373d975 100644 --- a/docs/speak-file.md +++ b/docs/speak-file.md @@ -71,4 +71,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-file.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-file.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/speak-finnish.md b/docs/speak-finnish.md index b2233d71..5d3013e1 100644 --- a/docs/speak-finnish.md +++ b/docs/speak-finnish.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-finnish.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-finnish.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/speak-french.md b/docs/speak-french.md index 741b88da..a4282051 100644 --- a/docs/speak-french.md +++ b/docs/speak-french.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-french.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-french.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/speak-german.md b/docs/speak-german.md index b0234006..bf1b4d4f 100644 --- a/docs/speak-german.md +++ b/docs/speak-german.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-german.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-german.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/speak-greek.md b/docs/speak-greek.md index bf14df35..aa1c55f9 100644 --- a/docs/speak-greek.md +++ b/docs/speak-greek.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-greek.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-greek.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/speak-hebrew.md b/docs/speak-hebrew.md index 48606ca7..d3b4ea85 100644 --- a/docs/speak-hebrew.md +++ b/docs/speak-hebrew.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-hebrew.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-hebrew.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/speak-hindi.md b/docs/speak-hindi.md index 9a357118..dad51942 100644 --- a/docs/speak-hindi.md +++ b/docs/speak-hindi.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-hindi.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-hindi.ps1 as of 03/27/2024 17:36:31)* diff --git a/docs/speak-italian.md b/docs/speak-italian.md index 541b143b..23b661d0 100644 --- a/docs/speak-italian.md +++ b/docs/speak-italian.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-italian.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-italian.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/speak-japanese.md b/docs/speak-japanese.md index 808a903b..23188405 100644 --- a/docs/speak-japanese.md +++ b/docs/speak-japanese.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-japanese.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-japanese.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/speak-korean.md b/docs/speak-korean.md index a431d970..9cf16e5e 100644 --- a/docs/speak-korean.md +++ b/docs/speak-korean.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-korean.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-korean.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/speak-latin.md b/docs/speak-latin.md index 3b5561cc..5cb2865b 100644 --- a/docs/speak-latin.md +++ b/docs/speak-latin.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-latin.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-latin.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/speak-mandarin.md b/docs/speak-mandarin.md index 013a6db6..c63ab8c0 100644 --- a/docs/speak-mandarin.md +++ b/docs/speak-mandarin.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-mandarin.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-mandarin.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/speak-norwegian.md b/docs/speak-norwegian.md index b2b39776..2abd1cf4 100644 --- a/docs/speak-norwegian.md +++ b/docs/speak-norwegian.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-norwegian.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-norwegian.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/speak-polish.md b/docs/speak-polish.md index 71562b6c..5835be97 100644 --- a/docs/speak-polish.md +++ b/docs/speak-polish.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-polish.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-polish.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/speak-portuguese.md b/docs/speak-portuguese.md index 0872a8aa..afc57e88 100644 --- a/docs/speak-portuguese.md +++ b/docs/speak-portuguese.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-portuguese.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-portuguese.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/speak-russian.md b/docs/speak-russian.md index d354ac36..292288f9 100644 --- a/docs/speak-russian.md +++ b/docs/speak-russian.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-russian.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-russian.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/speak-spanish.md b/docs/speak-spanish.md index a4110aea..a74b6315 100644 --- a/docs/speak-spanish.md +++ b/docs/speak-spanish.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-spanish.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-spanish.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/speak-swedish.md b/docs/speak-swedish.md index 8e84a428..784bb1c6 100644 --- a/docs/speak-swedish.md +++ b/docs/speak-swedish.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-swedish.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-swedish.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/speak-test.md b/docs/speak-test.md index f85f72e7..bd5ae491 100644 --- a/docs/speak-test.md +++ b/docs/speak-test.md @@ -83,4 +83,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-test.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-test.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/speak-text.md b/docs/speak-text.md index 83a6d4ee..48a6ca42 100644 --- a/docs/speak-text.md +++ b/docs/speak-text.md @@ -69,4 +69,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-text.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-text.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/speak-thai.md b/docs/speak-thai.md index 0dc8c99c..8550d3d6 100644 --- a/docs/speak-thai.md +++ b/docs/speak-thai.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-thai.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-thai.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/speak-turkish.md b/docs/speak-turkish.md index 84a58bc9..48f257fc 100644 --- a/docs/speak-turkish.md +++ b/docs/speak-turkish.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-turkish.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-turkish.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/speak-ukrainian.md b/docs/speak-ukrainian.md index 2bf57c01..fdd2cabb 100644 --- a/docs/speak-ukrainian.md +++ b/docs/speak-ukrainian.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-ukrainian.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-ukrainian.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/spell-word.md b/docs/spell-word.md index 4ae0ee67..6c0ba194 100644 --- a/docs/spell-word.md +++ b/docs/spell-word.md @@ -74,4 +74,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of spell-word.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of spell-word.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/start-ipfs-server.md b/docs/start-ipfs-server.md index 228d3d75..a9998514 100644 --- a/docs/start-ipfs-server.md +++ b/docs/start-ipfs-server.md @@ -90,4 +90,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of start-ipfs-server.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of start-ipfs-server.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/suspend.md b/docs/suspend.md index 1d61f1e9..7d48566d 100644 --- a/docs/suspend.md +++ b/docs/suspend.md @@ -54,4 +54,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of suspend.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of suspend.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/switch-branch.md b/docs/switch-branch.md index fac732aa..2e900bca 100644 --- a/docs/switch-branch.md +++ b/docs/switch-branch.md @@ -1,15 +1,15 @@ Script: *switch-branch.ps1* ======================== -This PowerShell script switches to another branch in a Git repository (including submodules). +This PowerShell script switches to a given branch in a Git repository (including updating submodules). Parameters ---------- ```powershell -PS> ./switch-branch.ps1 [[-branchName] ] [[-repoDir] ] [] +PS> ./switch-branch.ps1 [[-branchName] ] [[-pathToRepo] ] [] -branchName - Specifies the branch name + Specifies the target branch name Required? false Position? 1 @@ -17,8 +17,8 @@ PS> ./switch-branch.ps1 [[-branchName] ] [[-repoDir] ] [ - Specifies the path to the local Git repository +-pathToRepo + Specifies the file path to the local Git repository Required? false Position? 2 @@ -34,14 +34,14 @@ PS> ./switch-branch.ps1 [[-branchName] ] [[-repoDir] ] [ ./switch-branch main C:\MyRepo -⏳ (1/6) Searching for Git executable... git version 2.42.0.windows.1 -⏳ (2/6) Checking local repository... +PS> ./switch-branch main C:\Repos\rust +⏳ (1/6) Searching for Git executable... git version 2.43.0.windows.1 +⏳ (2/6) Checking Git repository... ⏳ (3/6) Fetching updates... ⏳ (4/6) Switching to branch 'main'... ⏳ (5/6) Pulling updates... ⏳ (6/6) Updating submodules... -βœ”οΈ Switched repo πŸ“‚MyRepo to branch 'main' in 22 sec +βœ”οΈ Switched πŸ“‚rust repository to 'main' branch in 22 sec. ``` @@ -60,64 +60,64 @@ Script Content .SYNOPSIS Switches the Git branch .DESCRIPTION - This PowerShell script switches to another branch in a Git repository (including submodules). + This PowerShell script switches to a given branch in a Git repository (including updating submodules). .PARAMETER branchName - Specifies the branch name -.PARAMETER repoDir - Specifies the path to the local Git repository + Specifies the target branch name +.PARAMETER pathToRepo + Specifies the file path to the local Git repository .EXAMPLE - PS> ./switch-branch main C:\MyRepo - ⏳ (1/6) Searching for Git executable... git version 2.42.0.windows.1 - ⏳ (2/6) Checking local repository... + PS> ./switch-branch main C:\Repos\rust + ⏳ (1/6) Searching for Git executable... git version 2.43.0.windows.1 + ⏳ (2/6) Checking Git repository... ⏳ (3/6) Fetching updates... ⏳ (4/6) Switching to branch 'main'... ⏳ (5/6) Pulling updates... ⏳ (6/6) Updating submodules... - βœ”οΈ Switched repo πŸ“‚MyRepo to branch 'main' in 22 sec + βœ”οΈ Switched πŸ“‚rust repository to 'main' branch in 22 sec. .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$branchName = "", [string]$repoDir = "$PWD") +param([string]$branchName = "", [string]$pathToRepo = "$PWD") try { if ($branchName -eq "") { $branchName = Read-Host "Enter the branch name to switch to" } - if ($repoDir -eq "") { $repoDir = Read-Host "Enter the path to the local Git repository" } + if ($pathToRepo -eq "") { $pathToRepo = Read-Host "Enter the file path to the Git repository" } - $StopWatch = [system.diagnostics.stopwatch]::startNew() + $stopWatch = [system.diagnostics.stopwatch]::startNew() Write-Host "⏳ (1/6) Searching for Git executable... " -noNewline & 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..." - $repoDir = Resolve-Path "$repoDir" - if (-not(Test-Path "$repoDir" -pathType container)) { throw "Can't access directory: $repoDir" } - $Result = (git status) - if ($lastExitCode -ne "0") { throw "'git status' in $repoDir failed with exit code $lastExitCode" } - if ("$Result" -notmatch "nothing to commit, working tree clean") { throw "Git repository is NOT clean: $Result" } - $repoDirName = (Get-Item "$repoDir").Name + Write-Host "⏳ (2/6) Checking Git repository..." + $pathToRepo = Resolve-Path "$pathToRepo" + if (-not(Test-Path "$pathToRepo" -pathType container)) { throw "Can't access repo folder: $pathToRepo" } + $result = (git status) + if ($lastExitCode -ne "0") { throw "'git status' in $pathToRepo 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 - "⏳ (3/6) Fetching latest updates..." - & git -C "$repoDir" fetch --all --prune --prune-tags --force + "⏳ (3/6) Fetching updates..." + & git -C "$pathToRepo" fetch --all --prune --prune-tags --force if ($lastExitCode -ne "0") { throw "'git fetch' failed with exit code $lastExitCode" } "⏳ (4/6) Switching to branch '$branchName'..." - & git -C "$repoDir" checkout --recurse-submodules "$branchName" + & git -C "$pathToRepo" checkout --recurse-submodules "$branchName" if ($lastExitCode -ne "0") { throw "'git checkout $branchName' failed with exit code $lastExitCode" } "⏳ (5/6) Pulling updates..." - & git -C "$repoDir" pull --recurse-submodules + & git -C "$pathToRepo" pull --recurse-submodules if ($lastExitCode -ne "0") { throw "'git pull' failed with exit code $lastExitCode" } "⏳ (6/6) Updating submodules..." - & git -C "$repoDir" submodule update --init --recursive + & git -C "$pathToRepo" 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 branch '$branchName' in $Elapsed sec" + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "βœ”οΈ Switched πŸ“‚$repoDirName repository to '$branchName' branch in $elapsed sec." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -125,4 +125,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of switch-branch.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of switch-branch.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/switch-shelly1.md b/docs/switch-shelly1.md index 85629423..bad0d16e 100644 --- a/docs/switch-shelly1.md +++ b/docs/switch-shelly1.md @@ -94,4 +94,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of switch-shelly1.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of switch-shelly1.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/switch-tabs.md b/docs/switch-tabs.md index 9d4e401e..b0ef4325 100644 --- a/docs/switch-tabs.md +++ b/docs/switch-tabs.md @@ -1,15 +1,15 @@ Script: *switch-tabs.ps1* ======================== -This PowerShell script switches browser tabs automatically every seconds (by pressing Ctrl + PageDown). +This PowerShell script switches automatically from tab to tab every seconds (by pressing Ctrl + PageDown). Parameters ---------- ```powershell -PS> ./switch-tabs.ps1 [[-Interval] ] [] +PS> ./switch-tabs.ps1 [[-timeInterval] ] [] --Interval - Specifies the switch interval in seconds (10 sec per default) +-timeInterval + Specifies the time interval in seconds (10sec per default) Required? false Position? 1 @@ -25,7 +25,9 @@ PS> ./switch-tabs.ps1 [[-Interval] ] [] Example ------- ```powershell -PS> ./switch-tabs +PS> ./switch-tabs.ps1 +⏳ Switching from tab to tab automatically every 10 seconds... + (click the Web browser to activate it - press here to stop it) ``` @@ -35,35 +37,37 @@ Author: Markus Fleschutz / License: CC0 Related Links ------------- -https://github.com/fleschutz/talk2windows +https://github.com/fleschutz/PowerShell Script Content -------------- ```powershell <# .SYNOPSIS - Switches browser tabs + Switches Web browser tabs .DESCRIPTION - This PowerShell script switches browser tabs automatically every seconds (by pressing Ctrl + PageDown). -.PARAMETER Interval - Specifies the switch interval in seconds (10 sec per default) + This PowerShell script switches automatically from tab to tab every seconds (by pressing Ctrl + PageDown). +.PARAMETER timeInterval + Specifies the time interval in seconds (10sec per default) .EXAMPLE - PS> ./switch-tabs + PS> ./switch-tabs.ps1 + ⏳ Switching from tab to tab automatically every 10 seconds... + (click the Web browser to activate it - press here to stop it) .NOTES Author: Markus Fleschutz / License: CC0 .LINK - https://github.com/fleschutz/talk2windows + https://github.com/fleschutz/PowerShell #> -param([int]$Interval = 10) # in seconds +param([int]$timeInterval = 10) # in seconds try { - Write-Host "⏳ Switching browser tabs automatically every $Interval seconds..." - Write-Host " (click into the browser window to activate it, press Ctrl + C here to stop it)" + Write-Host "⏳ Switching from tab to tab automatically every $timeInterval seconds..." + Write-Host " (click the Web browser to activate it - press here to stop it)" $obj = New-Object -com wscript.shell while ($true) { $obj.SendKeys("^{PGDN}") - Start-Sleep -seconds $Interval + Start-Sleep -seconds $timeInterval } exit 0 # success } catch { @@ -72,4 +76,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of switch-tabs.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of switch-tabs.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/sync-folder.md b/docs/sync-folder.md index 86eb0b12..0be64233 100644 --- a/docs/sync-folder.md +++ b/docs/sync-folder.md @@ -96,4 +96,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of sync-folder.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of sync-folder.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/sync-repo.md b/docs/sync-repo.md index 2588242f..9a2f4fb6 100644 --- a/docs/sync-repo.md +++ b/docs/sync-repo.md @@ -95,4 +95,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of sync-repo.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of sync-repo.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/tell-joke.md b/docs/tell-joke.md index 64f909ef..3981a602 100644 --- a/docs/tell-joke.md +++ b/docs/tell-joke.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of tell-joke.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of tell-joke.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/tell-quote.md b/docs/tell-quote.md index 6b2108a9..2cdeaa21 100644 --- a/docs/tell-quote.md +++ b/docs/tell-quote.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of tell-quote.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of tell-quote.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/toggle-caps-lock.md b/docs/toggle-caps-lock.md index cc6897e0..5f7a6394 100644 --- a/docs/toggle-caps-lock.md +++ b/docs/toggle-caps-lock.md @@ -54,4 +54,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of toggle-caps-lock.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of toggle-caps-lock.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/toggle-num-lock.md b/docs/toggle-num-lock.md index 3165bcfd..c0667890 100644 --- a/docs/toggle-num-lock.md +++ b/docs/toggle-num-lock.md @@ -54,4 +54,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of toggle-num-lock.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of toggle-num-lock.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/toggle-scroll-lock.md b/docs/toggle-scroll-lock.md index ec59d85d..f5c7458d 100644 --- a/docs/toggle-scroll-lock.md +++ b/docs/toggle-scroll-lock.md @@ -54,4 +54,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of toggle-scroll-lock.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of toggle-scroll-lock.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/translate-file.md b/docs/translate-file.md index 380e71bd..9e3983bd 100644 --- a/docs/translate-file.md +++ b/docs/translate-file.md @@ -108,4 +108,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of translate-file.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of translate-file.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/translate-files.md b/docs/translate-files.md index d99208a0..722f782c 100644 --- a/docs/translate-files.md +++ b/docs/translate-files.md @@ -105,4 +105,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of translate-files.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of translate-files.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/translate-text.md b/docs/translate-text.md index 2f6de6d0..345d83d1 100644 --- a/docs/translate-text.md +++ b/docs/translate-text.md @@ -104,4 +104,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of translate-text.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of translate-text.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/turn-volume-down.md b/docs/turn-volume-down.md index d48c85c7..3c0356ce 100644 --- a/docs/turn-volume-down.md +++ b/docs/turn-volume-down.md @@ -69,4 +69,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-down.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-down.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/turn-volume-fully-up.md b/docs/turn-volume-fully-up.md index 5ecb0178..82a6e40c 100644 --- a/docs/turn-volume-fully-up.md +++ b/docs/turn-volume-fully-up.md @@ -56,4 +56,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-fully-up.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-fully-up.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/turn-volume-off.md b/docs/turn-volume-off.md index 2a8f7f68..7c15fbfe 100644 --- a/docs/turn-volume-off.md +++ b/docs/turn-volume-off.md @@ -54,4 +54,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-off.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-off.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/turn-volume-on.md b/docs/turn-volume-on.md index 53325fd6..26294570 100644 --- a/docs/turn-volume-on.md +++ b/docs/turn-volume-on.md @@ -54,4 +54,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-on.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-on.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/turn-volume-up.md b/docs/turn-volume-up.md index 802f75a9..00c32587 100644 --- a/docs/turn-volume-up.md +++ b/docs/turn-volume-up.md @@ -69,4 +69,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-up.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-up.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-all-apps.md b/docs/uninstall-all-apps.md index 0d418f4c..a844a6c0 100644 --- a/docs/uninstall-all-apps.md +++ b/docs/uninstall-all-apps.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-all-apps.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-all-apps.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-bloatware.md b/docs/uninstall-bloatware.md index 72129cd6..ba35a734 100644 --- a/docs/uninstall-bloatware.md +++ b/docs/uninstall-bloatware.md @@ -98,4 +98,4 @@ winget uninstall 'Prime Video for Windows' exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-bloatware.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-bloatware.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-chrome.md b/docs/uninstall-chrome.md index 26fc4378..daddb7ee 100644 --- a/docs/uninstall-chrome.md +++ b/docs/uninstall-chrome.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-chrome.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-chrome.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-crystal-disk-info.md b/docs/uninstall-crystal-disk-info.md index 5cf0e12e..5d747bb4 100644 --- a/docs/uninstall-crystal-disk-info.md +++ b/docs/uninstall-crystal-disk-info.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-crystal-disk-info.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-crystal-disk-info.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-crystal-disk-mark.md b/docs/uninstall-crystal-disk-mark.md index 4b2e2690..2dae7ed0 100644 --- a/docs/uninstall-crystal-disk-mark.md +++ b/docs/uninstall-crystal-disk-mark.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-crystal-disk-mark.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-crystal-disk-mark.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-discord.md b/docs/uninstall-discord.md index 4a0feb13..41fe68b2 100644 --- a/docs/uninstall-discord.md +++ b/docs/uninstall-discord.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-discord.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-discord.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-edge.md b/docs/uninstall-edge.md index 06c00bae..1b07822b 100644 --- a/docs/uninstall-edge.md +++ b/docs/uninstall-edge.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-edge.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-edge.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-firefox.md b/docs/uninstall-firefox.md index 5967de35..225005dc 100644 --- a/docs/uninstall-firefox.md +++ b/docs/uninstall-firefox.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-firefox.ps1 as of 01/25/2024 13:58:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-firefox.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-git-extensions.md b/docs/uninstall-git-extensions.md index 94f08f0a..f456c1fb 100644 --- a/docs/uninstall-git-extensions.md +++ b/docs/uninstall-git-extensions.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-git-extensions.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-git-extensions.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-github-cli.md b/docs/uninstall-github-cli.md index 82fa7ff3..b823c5c5 100644 --- a/docs/uninstall-github-cli.md +++ b/docs/uninstall-github-cli.md @@ -70,4 +70,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-github-cli.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-github-cli.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-irfanview.md b/docs/uninstall-irfanview.md index 58a6bad8..b163a333 100644 --- a/docs/uninstall-irfanview.md +++ b/docs/uninstall-irfanview.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-irfanview.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-irfanview.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-microsoft-teams.md b/docs/uninstall-microsoft-teams.md index 00ebcfba..fc4cb237 100644 --- a/docs/uninstall-microsoft-teams.md +++ b/docs/uninstall-microsoft-teams.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-microsoft-teams.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-microsoft-teams.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-netflix.md b/docs/uninstall-netflix.md index f1c59881..208e4456 100644 --- a/docs/uninstall-netflix.md +++ b/docs/uninstall-netflix.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-netflix.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-netflix.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-nine-zip.md b/docs/uninstall-nine-zip.md index ce8196ee..aef64df9 100644 --- a/docs/uninstall-nine-zip.md +++ b/docs/uninstall-nine-zip.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-nine-zip.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-nine-zip.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-one-calendar.md b/docs/uninstall-one-calendar.md index 0f5e4c41..093d10cc 100644 --- a/docs/uninstall-one-calendar.md +++ b/docs/uninstall-one-calendar.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-one-calendar.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-one-calendar.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-opera-browser.md b/docs/uninstall-opera-browser.md index fe9a51d9..745c7644 100644 --- a/docs/uninstall-opera-browser.md +++ b/docs/uninstall-opera-browser.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-opera-browser.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-opera-browser.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-opera-gx.md b/docs/uninstall-opera-gx.md index 6a38d50e..6b2bcf0f 100644 --- a/docs/uninstall-opera-gx.md +++ b/docs/uninstall-opera-gx.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-opera-gx.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-opera-gx.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-paint-3d.md b/docs/uninstall-paint-3d.md index 1b999569..45686012 100644 --- a/docs/uninstall-paint-3d.md +++ b/docs/uninstall-paint-3d.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-paint-3d.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-paint-3d.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-rufus.md b/docs/uninstall-rufus.md index adf5d51c..9c59e194 100644 --- a/docs/uninstall-rufus.md +++ b/docs/uninstall-rufus.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-rufus.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-rufus.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-skype.md b/docs/uninstall-skype.md index e2da03d3..cc653f5a 100644 --- a/docs/uninstall-skype.md +++ b/docs/uninstall-skype.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-skype.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-skype.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-spotify.md b/docs/uninstall-spotify.md index 37314d2c..c27c6404 100644 --- a/docs/uninstall-spotify.md +++ b/docs/uninstall-spotify.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-spotify.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-spotify.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-twitter.md b/docs/uninstall-twitter.md index c220e36d..aa307a4c 100644 --- a/docs/uninstall-twitter.md +++ b/docs/uninstall-twitter.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-twitter.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-twitter.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-visual-studio-code.md b/docs/uninstall-visual-studio-code.md index e56e29d5..349ea787 100644 --- a/docs/uninstall-visual-studio-code.md +++ b/docs/uninstall-visual-studio-code.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-visual-studio-code.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-visual-studio-code.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-vlc.md b/docs/uninstall-vlc.md index 4462163a..ad5743a5 100644 --- a/docs/uninstall-vlc.md +++ b/docs/uninstall-vlc.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-vlc.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-vlc.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/uninstall-windows-terminal.md b/docs/uninstall-windows-terminal.md index d2d4bfa8..15fa96b8 100644 --- a/docs/uninstall-windows-terminal.md +++ b/docs/uninstall-windows-terminal.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-windows-terminal.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-windows-terminal.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/upgrade-ubuntu.md b/docs/upgrade-ubuntu.md index 6b3bc90c..0b919e96 100644 --- a/docs/upgrade-ubuntu.md +++ b/docs/upgrade-ubuntu.md @@ -87,4 +87,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of upgrade-ubuntu.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of upgrade-ubuntu.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/upload-file.md b/docs/upload-file.md index 988ace1b..4f3f75ad 100644 --- a/docs/upload-file.md +++ b/docs/upload-file.md @@ -145,4 +145,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of upload-file.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of upload-file.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/upload-to-dropbox.md b/docs/upload-to-dropbox.md index 33e88474..6f5391a7 100644 --- a/docs/upload-to-dropbox.md +++ b/docs/upload-to-dropbox.md @@ -74,4 +74,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of upload-to-dropbox.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of upload-to-dropbox.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/wake-up.md b/docs/wake-up.md index 3728106b..1b8dc8e8 100644 --- a/docs/wake-up.md +++ b/docs/wake-up.md @@ -120,4 +120,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of wake-up.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of wake-up.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/watch-file.md b/docs/watch-file.md index 14afc610..7680b2e3 100644 --- a/docs/watch-file.md +++ b/docs/watch-file.md @@ -64,4 +64,4 @@ function Watch-File { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of watch-file.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of watch-file.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/weather-report.md b/docs/weather-report.md index 053f0389..8e6c9dcc 100644 --- a/docs/weather-report.md +++ b/docs/weather-report.md @@ -66,4 +66,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of weather-report.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of weather-report.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/weather.md b/docs/weather.md index 60198549..cc3d3db2 100644 --- a/docs/weather.md +++ b/docs/weather.md @@ -66,4 +66,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of weather.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of weather.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/what-is.md b/docs/what-is.md index eb82bb04..d5fbe9c6 100644 --- a/docs/what-is.md +++ b/docs/what-is.md @@ -1,15 +1,15 @@ Script: *what-is.ps1* ======================== -This PowerShell script queries the meaning of the given abbreviation and prints it. +This PowerShell script queries the meaning of the given term/abbreviation/etc. and prints it. Parameters ---------- ```powershell -PS> ./what-is.ps1 [[-abbr] ] [] +PS> ./what-is.ps1 [[-term] ] [] --abbr - Specifies the abbreviation to query +-term + Specifies the term to query Required? false Position? 1 @@ -43,11 +43,11 @@ Script Content ```powershell <# .SYNOPSIS - Explains an abbreviation + Explains a term/abbreviation/etc. .DESCRIPTION - This PowerShell script queries the meaning of the given abbreviation and prints it. -.PARAMETER abbr - Specifies the abbreviation to query + This PowerShell script queries the meaning of the given term/abbreviation/etc. and prints it. +.PARAMETER term + Specifies the term to query .EXAMPLE PS> ./what-is VTOL πŸ’‘ VTOL in aviation refers to Vertical Take-Off and Landing @@ -57,21 +57,21 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -param([string]$abbr = "") +param([string]$term = "") try { - if ($abbr -eq "" ) { $abbr = Read-Host "Enter the abbreviation to query" } - $files = (Get-ChildItem "$PSScriptRoot/../data/abbr/*.csv") + if ($term -eq "" ) { $term = Read-Host "Enter the term/abbreviation/etc. to query" } + $files = (Get-ChildItem "$PSScriptRoot/../data/dicts/*.csv") $basename = "" foreach($file in $files) { $table = Import-CSV "$file" foreach($row in $table) { - if ($row.ABBR -ne $abbr) { continue } + if ($row.TERM -ne $term) { continue } $basename = (Get-Item "$file").Basename -Replace "_"," " - "πŸ’‘ $($row.ABBR) in $basename refers to $($row.MEANING)" + "πŸ’‘ $($row.TERM) in $basename refers to: $($row.MEANING)" } } - if ($basename -eq "") { "πŸ€·β€ Sorry, no '$abbr' entry found. Use to google it: https://www.google.com/search?q=abbreviation+$abbr" } + if ($basename -eq "") { "πŸ€·β€ Sorry, no '$term' entry found. Use to google it: https://www.google.com/search?q=what+is+$term" } exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -79,4 +79,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of what-is.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of what-is.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/windefender.md b/docs/windefender.md index fd453bf4..5d08d5cc 100644 --- a/docs/windefender.md +++ b/docs/windefender.md @@ -82,4 +82,4 @@ break } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of windefender.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of windefender.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/write-animated.md b/docs/write-animated.md index c4ae65ed..ffe95ade 100644 --- a/docs/write-animated.md +++ b/docs/write-animated.md @@ -167,4 +167,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-animated.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-animated.ps1 as of 03/27/2024 17:36:32)* diff --git a/docs/write-ascii-image.md b/docs/write-ascii-image.md index 4bbbb51f..62701e19 100644 --- a/docs/write-ascii-image.md +++ b/docs/write-ascii-image.md @@ -61,4 +61,4 @@ WriteLine " '`--._,dd###pp='''" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-ascii-image.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-ascii-image.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-big.md b/docs/write-big.md index dde27771..5af41e82 100644 --- a/docs/write-big.md +++ b/docs/write-big.md @@ -9,11 +9,11 @@ Parameters PS> ./write-big.ps1 [[-text] ] [] -text - Specifies the text to write + Specifies the text to write ("Hello World" by default) Required? false Position? 1 - Default value + Default value Hello World Accept pipeline input? false Accept wildcard characters? false @@ -25,7 +25,11 @@ PS> ./write-big.ps1 [[-text] ] [] Example ------- ```powershell -PS> ./write-big "Hello World" +PS> ./write-big.ps1 + _ _ ____ _ _ ___ __ __ ___ ____ _ ____ +| |_| || ___)| | | | / _ \ \ \/\/ / / _ \ | _ \| | | _ \ +| _ || __) | |__ | |__ ( (_) ) \ / ( (_) )| /| |__ | (_) ) +|_| |_||____)|____)|____) \___/ \_/\_/ \___/ |_|\_)|____)|____/ ``` @@ -46,21 +50,25 @@ Script Content .DESCRIPTION This PowerShell script writes the given text in big letters. .PARAMETER text - Specifies the text to write + Specifies the text to write ("Hello World" by default) .EXAMPLE - PS> ./write-big "Hello World" + PS> ./write-big.ps1 + _ _ ____ _ _ ___ __ __ ___ ____ _ ____ + | |_| || ___)| | | | / _ \ \ \/\/ / / _ \ | _ \| | | _ \ + | _ || __) | |__ | |__ ( (_) ) \ / ( (_) )| /| |__ | (_) ) + |_| |_||____)|____)|____) \___/ \_/\_/ \___/ |_|\_)|____)|____/ .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$text = "") +param([string]$text = "Hello World") Set-StrictMode -Version Latest -function BigA { param([int]$Row) - switch($Row) { +function BigA { param([int]$row) + switch($row) { 1 { return " __ " } 2 { return " /__\ " } 3 { return " /(__)\ " } @@ -68,8 +76,8 @@ function BigA { param([int]$Row) } } -function BigB { param([int]$Row) - switch($Row) { +function BigB { param([int]$row) + switch($row) { 1 { return " ____ " } 2 { return "| _ )" } 3 { return "| _ ( " } @@ -77,8 +85,8 @@ function BigB { param([int]$Row) } } -function BigC { param([int]$Row) - switch($Row) { +function BigC { param([int]$row) + switch($row) { 1 { return " ___ " } 2 { return " / __)" } 3 { return "( (__ " } @@ -86,8 +94,8 @@ function BigC { param([int]$Row) } } -function BigD { param([int]$Row) - switch($Row) { +function BigD { param([int]$row) + switch($row) { 1 { return " ____ " } 2 { return "| _ \ " } 3 { return "| (_) )" } @@ -95,8 +103,8 @@ function BigD { param([int]$Row) } } -function BigE { param([int]$Row) - switch($Row) { +function BigE { param([int]$row) + switch($row) { 1 { return " ____ " } 2 { return "| ___)" } 3 { return "| __) " } @@ -104,8 +112,8 @@ function BigE { param([int]$Row) } } -function BigF { param([int]$Row) - switch($Row) { +function BigF { param([int]$row) + switch($row) { 1 { return " ____ " } 2 { return "| ___)" } 3 { return "| __) " } @@ -113,8 +121,8 @@ function BigF { param([int]$Row) } } -function BigG { param([int]$Row) - switch($Row) { +function BigG { param([int]$row) + switch($row) { 1 { return " ____ " } 2 { return " / ___)" } 3 { return "( (__-." } @@ -122,8 +130,8 @@ function BigG { param([int]$Row) } } -function BigH { param([int]$Row) - switch($Row) { +function BigH { param([int]$row) + switch($row) { 1 { return " _ _ " } 2 { return "| |_| |" } 3 { return "| _ |" } @@ -131,8 +139,8 @@ function BigH { param([int]$Row) } } -function BigI { param([int]$Row) - switch($Row) { +function BigI { param([int]$row) + switch($row) { 1 { return " _ " } 2 { return "| |" } 3 { return "| |" } @@ -140,8 +148,8 @@ function BigI { param([int]$Row) } } -function BigJ { param([int]$Row) - switch($Row) { +function BigJ { param([int]$row) + switch($row) { 1 { return " __ " } 2 { return " ( |" } 3 { return ".-_) |" } @@ -149,8 +157,8 @@ function BigJ { param([int]$Row) } } -function BigK { param([int]$Row) - switch($Row) { +function BigK { param([int]$row) + switch($row) { 1 { return " _ _ " } 2 { return "| |/ )" } 3 { return "| ( " } @@ -158,8 +166,8 @@ function BigK { param([int]$Row) } } -function BigL { param([int]$Row) - switch($Row) { +function BigL { param([int]$row) + switch($row) { 1 { return " _ " } 2 { return "| | " } 3 { return "| |__ " } @@ -167,8 +175,8 @@ function BigL { param([int]$Row) } } -function BigM { param([int]$Row) - switch($Row) { +function BigM { param([int]$row) + switch($row) { 1 { return " _ _ " } 2 { return "| \ / |" } 3 { return "| \/ |" } @@ -176,8 +184,8 @@ function BigM { param([int]$Row) } } -function BigN { param([int]$Row) - switch($Row) { +function BigN { param([int]$row) + switch($row) { 1 { return " _ _ " } 2 { return "| \ | |" } 3 { return "| \| |" } @@ -185,8 +193,8 @@ function BigN { param([int]$Row) } } -function BigO { param([int]$Row) - switch($Row) { +function BigO { param([int]$row) + switch($row) { 1 { return " ___ " } 2 { return " / _ \ " } 3 { return "( (_) )" } @@ -194,8 +202,8 @@ function BigO { param([int]$Row) } } -function BigP { param([int]$Row) - switch($Row) { +function BigP { param([int]$row) + switch($row) { 1 { return " ____ " } 2 { return "| _ \" } 3 { return "| __/" } @@ -203,8 +211,8 @@ function BigP { param([int]$Row) } } -function BigQ { param([int]$Row) - switch($Row) { +function BigQ { param([int]$row) + switch($row) { 1 { return " ____ " } 2 { return " / _ \ " } 3 { return "( (_) ( " } @@ -212,8 +220,8 @@ function BigQ { param([int]$Row) } } -function BigR { param([int]$Row) - switch($Row) { +function BigR { param([int]$row) + switch($row) { 1 { return " ____ " } 2 { return "| _ \" } 3 { return "| /" } @@ -221,8 +229,8 @@ function BigR { param([int]$Row) } } -function BigS { param([int]$Row) - switch($Row) { +function BigS { param([int]$row) + switch($row) { 1 { return " ____ " } 2 { return "/ __)" } 3 { return "\__ \" } @@ -230,8 +238,8 @@ function BigS { param([int]$Row) } } -function BigT { param([int]$Row) - switch($Row) { +function BigT { param([int]$row) + switch($row) { 1 { return " _____ " } 2 { return "|_ _|" } 3 { return " | | " } @@ -239,8 +247,8 @@ function BigT { param([int]$Row) } } -function BigU { param([int]$Row) - switch($Row) { +function BigU { param([int]$row) + switch($row) { 1 { return " _ _ " } 2 { return "| | | |" } 3 { return "| |_| |" } @@ -248,8 +256,8 @@ function BigU { param([int]$Row) } } -function BigV { param([int]$Row) - switch($Row) { +function BigV { param([int]$row) + switch($row) { 1 { return " _ _ " } 2 { return "( \/ )" } 3 { return " \ / " } @@ -257,8 +265,8 @@ function BigV { param([int]$Row) } } -function BigW { param([int]$Row) - switch($Row) { +function BigW { param([int]$row) + switch($row) { 1 { return " __ __ " } 2 { return "\ \/\/ /" } 3 { return " \ / " } @@ -266,8 +274,8 @@ function BigW { param([int]$Row) } } -function BigX { param([int]$Row) - switch($Row) { +function BigX { param([int]$row) + switch($row) { 1 { return " _ _ " } 2 { return "( \/ )" } 3 { return " ) ( " } @@ -275,8 +283,8 @@ function BigX { param([int]$Row) } } -function BigY { param([int]$Row) - switch($Row) { +function BigY { param([int]$row) + switch($row) { 1 { return " _ _ " } 2 { return "( \/ )" } 3 { return " \ / " } @@ -284,8 +292,8 @@ function BigY { param([int]$Row) } } -function BigZ { param([int]$Row) - switch($Row) { +function BigZ { param([int]$row) + switch($row) { 1 { return " ____ " } 2 { return "(_ )" } 3 { return " / /_ " } @@ -293,8 +301,8 @@ function BigZ { param([int]$Row) } } -function Big0 { param([int]$Row) - switch($Row) { +function Big0 { param([int]$row) + switch($row) { 1 { return " ___ " } 2 { return " / _ \ " } 3 { return "( (_) )" } @@ -302,8 +310,8 @@ function Big0 { param([int]$Row) } } -function Big1 { param([int]$Row) - switch($Row) { +function Big1 { param([int]$row) + switch($row) { 1 { return " ___ " } 2 { return "/_ |" } 3 { return " | |" } @@ -311,8 +319,8 @@ function Big1 { param([int]$Row) } } -function Big2 { param([int]$Row) - switch($Row) { +function Big2 { param([int]$row) + switch($row) { 1 { return " ___ " } 2 { return "(__ \ " } 3 { return " / _/ " } @@ -320,8 +328,8 @@ function Big2 { param([int]$Row) } } -function Big3 { param([int]$Row) - switch($Row) { +function Big3 { param([int]$row) + switch($row) { 1 { return " ___ " } 2 { return "(__ )" } 3 { return " (_ \" } @@ -329,8 +337,8 @@ function Big3 { param([int]$Row) } } -function Big4 { param([int]$Row) - switch($Row) { +function Big4 { param([int]$row) + switch($row) { 1 { return " __ " } 2 { return " /. | " } 3 { return "(_ _)" } @@ -338,8 +346,8 @@ function Big4 { param([int]$Row) } } -function Big5 { param([int]$Row) - switch($Row) { +function Big5 { param([int]$row) + switch($row) { 1 { return " ____ " } 2 { return "| ___)" } 3 { return "|__ \ " } @@ -347,8 +355,8 @@ function Big5 { param([int]$Row) } } -function Big6 { param([int]$Row) - switch($Row) { +function Big6 { param([int]$row) + switch($row) { 1 { return " _ " } 2 { return " / ) " } 3 { return "/ _ \" } @@ -356,8 +364,8 @@ function Big6 { param([int]$Row) } } -function Big7 { param([int]$Row) - switch($Row) { +function Big7 { param([int]$row) + switch($row) { 1 { return " ___ " } 2 { return "(__ )" } 3 { return " / / " } @@ -365,8 +373,8 @@ function Big7 { param([int]$Row) } } -function Big8 { param([int]$Row) - switch($Row) { +function Big8 { param([int]$row) + switch($row) { 1 { return " ___ " } 2 { return "( _ )" } 3 { return "/ _ \" } @@ -374,8 +382,8 @@ function Big8 { param([int]$Row) } } -function Big9 { param([int]$Row) - switch($Row) { +function Big9 { param([int]$row) + switch($row) { 1 { return " ___ " } 2 { return "/ _ \" } 3 { return "\_ /" } @@ -383,8 +391,8 @@ function Big9 { param([int]$Row) } } -function BigColon { param([int]$Row) - switch($Row) { +function BigColon { param([int]$row) + switch($row) { 1 { return " " } 2 { return " o " } 3 { return " o " } @@ -392,8 +400,8 @@ function BigColon { param([int]$Row) } } -function BigMinus { param([int]$Row) - switch($Row) { +function BigMinus { param([int]$row) + switch($row) { 1 { return " " } 2 { return " ____ " } 3 { return "(____)" } @@ -401,63 +409,61 @@ function BigMinus { param([int]$Row) } } -function BigChar { param([string]$Char, [int]$Row) - switch($Char) { - 'A' { return BigA $Row } - 'B' { return BigB $Row } - 'C' { return BigC $Row } - 'D' { return BigD $Row } - 'E' { return BigE $Row } - 'F' { return BigF $Row } - 'G' { return BigG $Row } - 'H' { return BigH $Row } - 'I' { return BigI $Row } - 'J' { return BigJ $Row } - 'K' { return BigK $Row } - 'L' { return BigL $Row } - 'M' { return BigM $Row } - 'N' { return BigN $Row } - 'O' { return BigO $Row } - 'P' { return BigP $Row } - 'Q' { return BigQ $Row } - 'R' { return BigR $Row } - 'S' { return BigS $Row } - 'T' { return BigT $Row } - 'U' { return BigU $Row } - 'V' { return BigV $Row } - 'W' { return BigW $Row } - 'X' { return BigX $Row } - 'Y' { return BigY $Row } - 'Z' { return BigZ $Row } - '0' { return Big0 $Row } - '1' { return Big1 $Row } - '2' { return Big2 $Row } - '3' { return Big3 $Row } - '4' { return Big4 $Row } - '5' { return Big5 $Row } - '6' { return Big6 $Row } - '7' { return Big7 $Row } - '8' { return Big8 $Row } - '9' { return Big9 $Row } - ':' { return BigColon $Row } - '-' { return BigMinus $Row } +function BigChar { param([string]$char, [int]$row) + switch($char) { + 'A' { return BigA $row } + 'B' { return BigB $row } + 'C' { return BigC $row } + 'D' { return BigD $row } + 'E' { return BigE $row } + 'F' { return BigF $row } + 'G' { return BigG $row } + 'H' { return BigH $row } + 'I' { return BigI $row } + 'J' { return BigJ $row } + 'K' { return BigK $row } + 'L' { return BigL $row } + 'M' { return BigM $row } + 'N' { return BigN $row } + 'O' { return BigO $row } + 'P' { return BigP $row } + 'Q' { return BigQ $row } + 'R' { return BigR $row } + 'S' { return BigS $row } + 'T' { return BigT $row } + 'U' { return BigU $row } + 'V' { return BigV $row } + 'W' { return BigW $row } + 'X' { return BigX $row } + 'Y' { return BigY $row } + 'Z' { return BigZ $row } + '0' { return Big0 $row } + '1' { return Big1 $row } + '2' { return Big2 $row } + '3' { return Big3 $row } + '4' { return Big4 $row } + '5' { return Big5 $row } + '6' { return Big6 $row } + '7' { return Big7 $row } + '8' { return Big8 $row } + '9' { return Big9 $row } + ':' { return BigColon $row } + '-' { return BigMinus $row } } return " " } try { - if ($text -eq "" ) { [String]$text = read-host "Enter text to write" } - - [char[]]$ArrayOfChars = $text.ToUpper() - write-output "" - for ($Row = 1; $Row -lt 5; $Row++) { - $Line = "" - foreach($Char in $ArrayOfChars) { - $Line += BigChar $Char $Row + Write-Output "" + [char[]]$arrayOfChars = $text.ToUpper() + for ($row = 1; $row -lt 5; $row++) { + $line = "" + foreach($char in $arrayOfChars) { + $line += BigChar $char $row } - write-output $Line + Write-Output $line } - write-output "" + Write-Output "" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -465,4 +471,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-big.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-big.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-blue.md b/docs/write-blue.md index bd83a3dc..b5dcf5e9 100644 --- a/docs/write-blue.md +++ b/docs/write-blue.md @@ -64,4 +64,4 @@ write-host -foregroundColor blue "$text" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-blue.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-blue.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-braille.md b/docs/write-braille.md index 810e129c..1d51efba 100644 --- a/docs/write-braille.md +++ b/docs/write-braille.md @@ -408,4 +408,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-braille.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-braille.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-changelog.md b/docs/write-changelog.md index bab67a8c..1ecbb2cc 100644 --- a/docs/write-changelog.md +++ b/docs/write-changelog.md @@ -155,4 +155,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-changelog.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-changelog.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-chart.md b/docs/write-chart.md index ec85ec20..6f8dd139 100644 --- a/docs/write-chart.md +++ b/docs/write-chart.md @@ -25,7 +25,7 @@ Script Content .EXAMPLE PS> ./write-chart.ps1 - 2023 BOWLING RESULTS + BOWLING RESULTS 2024 β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ– 40.5% Joe β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Ž 30.9% Tom .LINK @@ -62,10 +62,10 @@ function WriteChartLine { param([string]$Text, [float]$Value, [float]$Max) } } -Write-Host "`n2023 BOWLING RESULTS" -foregroundColor green +Write-Host "`nBOWLING RESULTS 2024" -foregroundColor green WriteChartLine "Joe" 40.5 100.0 WriteChartLine "Tom" 30.9 100.0 exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-chart.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-chart.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-clock.md b/docs/write-clock.md index e4127f9f..2592f9e0 100644 --- a/docs/write-clock.md +++ b/docs/write-clock.md @@ -73,4 +73,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-clock.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-clock.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-code.md b/docs/write-code.md index dec5186e..691cd4da 100644 --- a/docs/write-code.md +++ b/docs/write-code.md @@ -118,4 +118,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-code.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-code.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-date.md b/docs/write-date.md index b4042320..4d39d5d4 100644 --- a/docs/write-date.md +++ b/docs/write-date.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-date.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-date.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-fractal.md b/docs/write-fractal.md index cdb0d0f3..0b670de1 100644 --- a/docs/write-fractal.md +++ b/docs/write-fractal.md @@ -79,4 +79,4 @@ while ($true) { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-fractal.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-fractal.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-green.md b/docs/write-green.md index 62d381b1..5f5dff93 100644 --- a/docs/write-green.md +++ b/docs/write-green.md @@ -63,4 +63,4 @@ write-host -foregroundColor green "$text" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-green.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-green.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-in-emojis.md b/docs/write-in-emojis.md index 6aab3f2b..cd6082d0 100644 --- a/docs/write-in-emojis.md +++ b/docs/write-in-emojis.md @@ -74,4 +74,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-in-emojis.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-in-emojis.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-joke.md b/docs/write-joke.md index 95a17e4c..64bf8fd1 100644 --- a/docs/write-joke.md +++ b/docs/write-joke.md @@ -61,4 +61,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-joke.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-joke.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-lowercase.md b/docs/write-lowercase.md index 01a476f4..af775f26 100644 --- a/docs/write-lowercase.md +++ b/docs/write-lowercase.md @@ -65,4 +65,4 @@ Write-Output $text.ToLower() exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-lowercase.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-lowercase.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-marquee.md b/docs/write-marquee.md index 46ec1ab0..67b70b26 100644 --- a/docs/write-marquee.md +++ b/docs/write-marquee.md @@ -89,4 +89,4 @@ StartMarquee " exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-marquee.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-marquee.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-matrix.md b/docs/write-matrix.md index 7710a261..b1706319 100644 --- a/docs/write-matrix.md +++ b/docs/write-matrix.md @@ -81,4 +81,4 @@ exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-matrix.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-matrix.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-moon.md b/docs/write-moon.md index dec5b0c2..a9403a5d 100644 --- a/docs/write-moon.md +++ b/docs/write-moon.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-moon.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-moon.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-morse-code.md b/docs/write-morse-code.md index ad87a3b1..2cf42425 100644 --- a/docs/write-morse-code.md +++ b/docs/write-morse-code.md @@ -153,4 +153,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-morse-code.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-morse-code.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-motd.md b/docs/write-motd.md index 11a3dc7a..03c0267a 100644 --- a/docs/write-motd.md +++ b/docs/write-motd.md @@ -140,4 +140,4 @@ Write-Host " 'VEzjt:;;z>*`` " -ForegroundColor Yellow exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-motd.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-motd.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-powershell-profile.md b/docs/write-powershell-profile.md index 07014d83..10608eef 100644 --- a/docs/write-powershell-profile.md +++ b/docs/write-powershell-profile.md @@ -6,7 +6,16 @@ This PowerShell script writes the PowerShell profile for the current user. Parameters ---------- ```powershell -PS> ./write-powershell-profile.ps1 [] +PS> ./write-powershell-profile.ps1 [[-path] ] [] + +-path + Specifies the path to the new profile ($PSScriptRoot/my-profile.ps1 by default) + + Required? false + Position? 1 + Default value "$PSScriptRoot/my-profile.ps1" + Accept pipeline input? false + Accept wildcard characters? false [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, @@ -17,6 +26,10 @@ Example ------- ```powershell PS> ./write-powershell-profile.ps1 +⏳ (1/2) Querying path to profile 'CurrentUserCurrentHost'... + C:\Users\Markus\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 +⏳ (2/2) Copying file 'my-profile.ps1'... +βœ”οΈ New PowerShell profile written - it gets active on next login ``` @@ -33,28 +46,36 @@ Script Content ```powershell <# .SYNOPSIS - Writes the user's PowerShell profile + Writes the PowerShell profile .DESCRIPTION This PowerShell script writes the PowerShell profile for the current user. +.PARAMETER path + Specifies the path to the new profile ($PSScriptRoot/my-profile.ps1 by default) .EXAMPLE PS> ./write-powershell-profile.ps1 + ⏳ (1/2) Querying path to profile 'CurrentUserCurrentHost'... + C:\Users\Markus\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 + ⏳ (2/2) Copying file 'my-profile.ps1'... + βœ”οΈ New PowerShell profile written - it gets active on next login .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> +param([string]$path = "$PSScriptRoot/my-profile.ps1") + try { - "⏳ (1/3) Querying path to PowerShell profile 'CurrentUserCurrentHost'..." + "⏳ (1/2) Querying path to profile 'CurrentUserCurrentHost'..." $pathToProfile = $PROFILE.CurrentUserCurrentHost + " $pathToProfile" - "⏳ (2/3) Creating the profile (if non-existent)..." + $filename = (Get-Item "$path").Name + "⏳ (2/2) Copying file '$filename'..." $null = New-Item -Path $pathToProfile -ItemType "file" -Force + Copy-Item "$path" "$pathToProfile" -force - "⏳ (3/3) Updating the profile by my-profile.ps1..." - Copy-Item "$PSScriptRoot/my-profile.ps1" "$pathToProfile" -force - - "βœ”οΈ Updated your PowerShell profile - it gets active on next login" + "βœ”οΈ New PowerShell profile written - it gets active on next login" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -62,4 +83,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-powershell-profile.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-powershell-profile.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-qr-code.md b/docs/write-qr-code.md index c8f285cb..61d25e74 100644 --- a/docs/write-qr-code.md +++ b/docs/write-qr-code.md @@ -61,4 +61,4 @@ Write-Host " " -foregroundColor black -backgroundColor w exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-qr-code.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-qr-code.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-quote.md b/docs/write-quote.md index fd7bd37e..318be362 100644 --- a/docs/write-quote.md +++ b/docs/write-quote.md @@ -66,4 +66,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-quote.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-quote.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-red.md b/docs/write-red.md index 7727a19c..2ce46c51 100644 --- a/docs/write-red.md +++ b/docs/write-red.md @@ -63,4 +63,4 @@ write-host -foregroundcolor red "$text" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-red.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-red.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-rot13.md b/docs/write-rot13.md index d5f7a5ba..610bd782 100644 --- a/docs/write-rot13.md +++ b/docs/write-rot13.md @@ -82,4 +82,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-rot13.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-rot13.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-shit.md b/docs/write-shit.md index d6224961..a5fe8d03 100644 --- a/docs/write-shit.md +++ b/docs/write-shit.md @@ -50,4 +50,4 @@ Write-Output "πŸ’©" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-shit.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-shit.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-sine-curves.md b/docs/write-sine-curves.md index bca26730..33830d9c 100644 --- a/docs/write-sine-curves.md +++ b/docs/write-sine-curves.md @@ -56,4 +56,4 @@ Script Content } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-sine-curves.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-sine-curves.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-time.md b/docs/write-time.md index 4b9d42e9..338edd77 100644 --- a/docs/write-time.md +++ b/docs/write-time.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-time.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-time.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-typewriter.md b/docs/write-typewriter.md index 8882a8dc..83f9cb01 100644 --- a/docs/write-typewriter.md +++ b/docs/write-typewriter.md @@ -91,4 +91,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-typewriter.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-typewriter.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-uppercase.md b/docs/write-uppercase.md index 103ab810..2604d313 100644 --- a/docs/write-uppercase.md +++ b/docs/write-uppercase.md @@ -65,4 +65,4 @@ Write-Output $text.ToUpper() exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-uppercase.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-uppercase.ps1 as of 03/27/2024 17:36:33)* diff --git a/docs/write-vertical.md b/docs/write-vertical.md index 87aee7c7..49f336e1 100644 --- a/docs/write-vertical.md +++ b/docs/write-vertical.md @@ -71,4 +71,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-vertical.ps1 as of 01/25/2024 13:58:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-vertical.ps1 as of 03/27/2024 17:36:33)*