From 46dae1445a1ecd3e7ec3718b9f12d03f177498c2 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Sat, 29 Jul 2023 09:45:37 +0200 Subject: [PATCH] Update the manual pages --- Docs/add-firewall-rules.md | 2 +- Docs/add-memo.md | 2 +- Docs/alert.md | 2 +- Docs/build-repo.md | 2 +- 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 | 61 ++++++++++++++++ Docs/cd-fonts.md | 2 +- Docs/cd-home.md | 2 +- Docs/cd-logs.md | 48 +++++++++++++ Docs/cd-music.md | 2 +- Docs/cd-onedrive.md | 2 +- Docs/cd-pics.md | 2 +- Docs/cd-public.md | 2 +- Docs/cd-repos.md | 2 +- Docs/cd-root.md | 2 +- Docs/cd-scripts.md | 2 +- Docs/cd-ssh.md | 2 +- Docs/cd-templates.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-apps.md | 5 +- Docs/check-battery.md | 2 +- Docs/check-bios.md | 12 ++-- Docs/check-cpu.md | 4 +- Docs/check-day.md | 2 +- Docs/check-dns.md | 2 +- Docs/check-drive-space.md | 2 +- Docs/check-drives.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-hardware.md | 60 ++++++++++++++++ Docs/check-health.md | 39 +++------- 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-month.md | 2 +- Docs/check-moon-phase.md | 2 +- Docs/check-network.md | 60 ++++++++++++++++ Docs/check-new-year.md | 2 +- Docs/check-os.md | 2 +- Docs/check-outlook.md | 2 +- Docs/check-password.md | 2 +- Docs/check-pending-reboot.md | 22 +++--- Docs/check-ping.md | 53 +++++++------- Docs/check-powershell.md | 2 +- Docs/check-ps1-file.md | 12 ++-- Docs/check-repo.md | 34 ++++++--- Docs/check-santa.md | 2 +- Docs/check-software.md | 64 +++++++++++++++++ Docs/check-subnet-mask.md | 2 +- Docs/check-swap-space.md | 2 +- Docs/check-symlinks.md | 2 +- Docs/check-time-zone.md | 16 +++-- Docs/check-uptime.md | 2 +- Docs/check-vpn.md | 18 ++--- Docs/check-weather.md | 2 +- Docs/check-week.md | 2 +- Docs/check-wind.md | 2 +- Docs/check-windows-system-files.md | 2 +- Docs/check-xml-file.md | 2 +- Docs/clean-repo.md | 10 +-- 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-md2html.md | 2 +- Docs/convert-mysql2csv.md | 2 +- Docs/convert-ps2bat.md | 2 +- Docs/convert-ps2md.md | 4 +- Docs/convert-sql2csv.md | 2 +- Docs/convert-txt2wav.md | 2 +- Docs/count-lines-of-code.md | 2 +- Docs/decrypt-file.md | 2 +- Docs/disconnect-vpn.md | 2 +- Docs/download-dir.md | 2 +- Docs/download-file.md | 2 +- Docs/edit.md | 2 +- Docs/enable-crash-dumps.md | 2 +- Docs/enable-god-mode.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/get-md5.md | 2 +- Docs/get-sha1.md | 2 +- Docs/get-sha256.md | 2 +- Docs/hibernate.md | 17 +++-- Docs/inspect-exe.md | 2 +- Docs/install-audacity.md | 2 +- Docs/install-basic-apps.md | 21 +++--- Docs/install-basic-snaps.md | 7 +- Docs/install-calibre-server.md | 2 +- Docs/install-chocolatey.md | 2 +- Docs/install-chrome-browser.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-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 | 8 +-- 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 | 14 ++-- 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 | 103 +++++++++++++++++++++++++++ Docs/list-battery-status.md | 2 +- Docs/list-bios.md | 2 +- Docs/list-bluetooth-devices.md | 2 +- Docs/list-branches.md | 2 +- Docs/list-calendar.md | 2 +- Docs/list-cheat-sheet.md | 2 +- Docs/list-city-weather.md | 2 +- Docs/list-cli-tools.md | 17 +++-- Docs/list-clipboard.md | 2 +- Docs/list-cmdlets.md | 2 +- Docs/list-coffee-prices.md | 21 +++--- Docs/list-commit-statistics.md | 2 +- Docs/list-commits.md | 2 +- Docs/list-console-colors.md | 2 +- Docs/list-cpu.md | 2 +- Docs/list-credits.md | 2 +- Docs/list-dir-tree.md | 2 +- Docs/list-drives.md | 2 +- Docs/list-earthquakes.md | 2 +- Docs/list-emojis.md | 2 +- Docs/list-empty-dirs.md | 2 +- Docs/list-empty-files.md | 2 +- Docs/list-environment-variables.md | 2 +- Docs/list-exchange-rates.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-scripts.md | 2 +- Docs/list-installed-software.md | 2 +- Docs/list-latest-tag.md | 2 +- Docs/list-latest-tags.md | 2 +- Docs/list-memos.md | 2 +- Docs/list-modules.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 | 2 +- Docs/list-news.md | 15 ++-- Docs/list-nic.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-print-jobs.md | 2 +- Docs/list-printers.md | 2 +- Docs/list-processes.md | 2 +- Docs/list-ram.md | 2 +- Docs/list-recycle-bin.md | 2 +- Docs/list-repos.md | 12 ++-- Docs/list-services.md | 2 +- Docs/list-sql-tables.md | 2 +- Docs/list-submodules.md | 2 +- Docs/list-suggestions.md | 2 +- Docs/list-system-info.md | 2 +- Docs/list-tags.md | 2 +- Docs/list-timezone.md | 2 +- Docs/list-timezones.md | 2 +- Docs/list-unused-files.md | 2 +- Docs/list-updates.md | 34 ++++++--- Docs/list-user-accounts.md | 2 +- Docs/list-user-groups.md | 22 +++--- Docs/list-verbs.md | 2 +- Docs/list-voices.md | 2 +- Docs/list-weather.md | 5 +- Docs/list-wifi.md | 2 +- Docs/list-window-titles.md | 2 +- Docs/list-workdir.md | 2 +- Docs/locate-city.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/merry-christmas.md | 2 +- Docs/minimize-all-windows.md | 2 +- Docs/moon.md | 2 +- Docs/new-branch.md | 44 ++++++------ Docs/new-email.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-zipfile.md | 2 +- Docs/on-desktop-login.md | 52 ++++++++++++++ Docs/open-air-b-n-b.md | 2 +- 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 | 39 +++++----- 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-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-office-365.md | 2 +- Docs/open-one-drive-folder.md | 2 +- Docs/open-paint-three-d.md | 2 +- Docs/open-pictures-folder.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-three-d-viewer.md | 2 +- Docs/open-videos-folders.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-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-rattlesnake-sound.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 | 2 +- Docs/query-smart-data.md | 2 +- Docs/reboot-fritzbox.md | 2 +- Docs/reboot.md | 2 +- Docs/remind-me.md | 2 +- Docs/remove-empty-dirs.md | 2 +- Docs/remove-old-dirs.md | 35 +++++---- Docs/remove-print-jobs.md | 2 +- Docs/remove-tag.md | 2 +- Docs/replace-in-files.md | 2 +- Docs/restart-network-adapters.md | 2 +- Docs/roll-a-dice.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-profile.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-danish.md | 2 +- Docs/speak-dutch.md | 2 +- Docs/speak-english.md | 2 +- Docs/speak-epub.md | 2 +- Docs/speak-file.md | 2 +- Docs/speak-french.md | 2 +- Docs/speak-german.md | 2 +- Docs/speak-greek.md | 2 +- Docs/speak-hindi.md | 2 +- Docs/speak-italian.md | 2 +- Docs/speak-japanese.md | 2 +- Docs/speak-latin.md | 2 +- Docs/speak-mandarin.md | 2 +- Docs/speak-polish.md | 2 +- Docs/speak-portuguese.md | 2 +- Docs/speak-spanish.md | 2 +- Docs/speak-swedish.md | 2 +- Docs/speak-text.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 | 2 +- Docs/switch-shelly1.md | 2 +- Docs/switch-tabs.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 | 32 ++++----- Docs/translate-files.md | 46 +++++++----- Docs/translate-text.md | 25 +++---- 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 | 70 ++++++++++++++++++ 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-irfanview.md | 2 +- Docs/uninstall-microsoft-teams.md | 2 +- Docs/uninstall-netflix.md | 2 +- Docs/uninstall-nine-zip.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 | 13 ++-- Docs/weather-report.md | 2 +- Docs/weather.md | 2 +- Docs/what-is.md | 4 +- Docs/write-animated.md | 60 ++++++++-------- Docs/write-ascii-image.md | 61 ++++++++++++++++ Docs/write-big.md | 2 +- Docs/write-blue.md | 2 +- Docs/write-braille.md | 2 +- Docs/write-clock.md | 74 +++++++++++++++++++ Docs/write-code.md | 2 +- Docs/write-date.md | 2 +- Docs/write-green.md | 2 +- Docs/write-joke.md | 2 +- Docs/write-lowercase.md | 12 ++-- Docs/write-marquee.md | 2 +- Docs/write-morse-code.md | 2 +- Docs/write-motd.md | 28 ++++---- Docs/write-qr-code.md | 58 +++++++++++++++ Docs/write-quote.md | 2 +- Docs/write-red.md | 2 +- Docs/write-rot13.md | 2 +- Docs/write-shit.md | 20 ++++++ Docs/write-sine-curves.md | 2 +- Docs/write-time.md | 2 +- Docs/write-typewriter.md | 2 +- Docs/write-uppercase.md | 12 ++-- Docs/write-vertical.md | 2 +- Scripts/convert-ps2md.ps1 | 2 +- 513 files changed, 1611 insertions(+), 822 deletions(-) create mode 100644 Docs/cd-etc.md create mode 100644 Docs/cd-logs.md create mode 100644 Docs/check-hardware.md create mode 100644 Docs/check-network.md create mode 100644 Docs/check-software.md create mode 100644 Docs/list-ascii-table.md create mode 100644 Docs/on-desktop-login.md create mode 100644 Docs/uninstall-bloatware.md create mode 100644 Docs/write-ascii-image.md create mode 100644 Docs/write-clock.md create mode 100644 Docs/write-qr-code.md create mode 100644 Docs/write-shit.md diff --git a/Docs/add-firewall-rules.md b/Docs/add-firewall-rules.md index 36dbbab3..4b99591c 100644 --- a/Docs/add-firewall-rules.md +++ b/Docs/add-firewall-rules.md @@ -4,7 +4,7 @@ This PowerShell script adds firewall rules for the given executable. Administrat ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/add-firewall-rules.ps1 [[-PathToExecutables] ] [] +add-firewall-rules.ps1 [[-PathToExecutables] ] [] -PathToExecutables Specifies the path to the executables diff --git a/Docs/add-memo.md b/Docs/add-memo.md index 551bb428..d0aee953 100644 --- a/Docs/add-memo.md +++ b/Docs/add-memo.md @@ -4,7 +4,7 @@ This PowerShell script saves the given memo text to Memos.csv in your home folde ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/add-memo.ps1 [[-text] ] [] +add-memo.ps1 [[-text] ] [] -text Specifies the text to memorize diff --git a/Docs/alert.md b/Docs/alert.md index d00c3817..7099c5f3 100644 --- a/Docs/alert.md +++ b/Docs/alert.md @@ -4,7 +4,7 @@ This PowerShell script handles and escalates the given alert message. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/alert.ps1 [[-Message] ] [] +alert.ps1 [[-Message] ] [] -Message Specifies the alert message diff --git a/Docs/build-repo.md b/Docs/build-repo.md index 2a070858..bbfcbfe0 100644 --- a/Docs/build-repo.md +++ b/Docs/build-repo.md @@ -4,7 +4,7 @@ This PowerShell script builds a repository by supporting: cmake, configure, auto ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/build-repo.ps1 [[-RepoDir] ] [] +build-repo.ps1 [[-RepoDir] ] [] -RepoDir Specifies the path to the Git repository diff --git a/Docs/build-repos.md b/Docs/build-repos.md index a6f31d1d..74a6b43b 100644 --- a/Docs/build-repos.md +++ b/Docs/build-repos.md @@ -4,7 +4,7 @@ This PowerShell script builds all Git repositories in a folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/build-repos.ps1 [[-ParentDir] ] [] +build-repos.ps1 [[-ParentDir] ] [] -ParentDir Specifies the path to the parent folder diff --git a/Docs/cd-autostart.md b/Docs/cd-autostart.md index 416870a4..b4dbc7f2 100644 --- a/Docs/cd-autostart.md +++ b/Docs/cd-autostart.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the user's autostart fol ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-autostart.ps1 [] +cd-autostart.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/cd-crashdumps.md b/Docs/cd-crashdumps.md index abf71a72..5fc6c2cf 100644 --- a/Docs/cd-crashdumps.md +++ b/Docs/cd-crashdumps.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the crash dumps director ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-crashdumps.ps1 [] +cd-crashdumps.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/cd-desktop.md b/Docs/cd-desktop.md index c38f911f..d21ce98d 100644 --- a/Docs/cd-desktop.md +++ b/Docs/cd-desktop.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the user's desktop folde ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-desktop.ps1 [] +cd-desktop.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/cd-docs.md b/Docs/cd-docs.md index 91130059..20d1b825 100644 --- a/Docs/cd-docs.md +++ b/Docs/cd-docs.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the documents folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-docs.ps1 [] +cd-docs.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/cd-downloads.md b/Docs/cd-downloads.md index ee42584e..2f811eba 100644 --- a/Docs/cd-downloads.md +++ b/Docs/cd-downloads.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the user's downloads fol ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-downloads.ps1 [] +cd-downloads.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/cd-dropbox.md b/Docs/cd-dropbox.md index ecd29b2b..8e376792 100644 --- a/Docs/cd-dropbox.md +++ b/Docs/cd-dropbox.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the user's Dropbox folde ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-dropbox.ps1 [] +cd-dropbox.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/cd-etc.md b/Docs/cd-etc.md new file mode 100644 index 00000000..43f6f789 --- /dev/null +++ b/Docs/cd-etc.md @@ -0,0 +1,61 @@ +## The *cd-etc.ps1* Script + +This PowerShell script changes the working directory to the /etc directory. + +## Parameters +```powershell +cd-etc.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +## Example +```powershell +PS> ./cd-etc +πŸ“‚C:\Windows\System32\drivers\etc + +``` + +## Notes +Author: Markus Fleschutz | License: CC0 + +## Related Links +https://github.com/fleschutz/PowerShell + +## Source Code +```powershell +<# +.SYNOPSIS + Changes to the /etc directory +.DESCRIPTION + This PowerShell script changes the working directory to the /etc directory. +.EXAMPLE + PS> ./cd-etc + πŸ“‚C:\Windows\System32\drivers\etc +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +try { + if ($IsLinx) { + $Path = "/etc" + } else { + $Path = Resolve-Path "$env:WINDIR\System32\drivers\etc" + } + if (-not(Test-Path "$Path" -pathType container)) { + throw "/etc directory at πŸ“‚$Path doesn't exist (yet)" + } + Set-Location "$Path" + "πŸ“‚$Path" + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*Generated by convert-ps2md.ps1 using the comment-based help of cd-etc.ps1* diff --git a/Docs/cd-fonts.md b/Docs/cd-fonts.md index a93a94df..9dbcb589 100644 --- a/Docs/cd-fonts.md +++ b/Docs/cd-fonts.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the fonts folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-fonts.ps1 [] +cd-fonts.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/cd-home.md b/Docs/cd-home.md index 5c1fdc64..245e2d27 100644 --- a/Docs/cd-home.md +++ b/Docs/cd-home.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the user's home director ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-home.ps1 [] +cd-home.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/cd-logs.md b/Docs/cd-logs.md new file mode 100644 index 00000000..bee1520b --- /dev/null +++ b/Docs/cd-logs.md @@ -0,0 +1,48 @@ +## The *cd-logs.ps1* Script + +cd-logs.ps1 + + +## Parameters +```powershell + + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +## Source Code +```powershell +<# +.SYNOPSIS + Sets the working directory to the logs folder +.DESCRIPTION + This PowerShell script changes the current working directory to the logs directory. +.EXAMPLE + PS> ./cd-logs + πŸ“‚/var/logs +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +function GetLogsDir { + if ($IsLinux) { return "/var/logs" } + $WinDir = [System.Environment]::GetFolderPath('Windows') + return "$WinDir\Logs" +} + +try { + $Path = GetLogsDir + Set-Location "$Path" + "πŸ“‚$Path" + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*Generated by convert-ps2md.ps1 using the comment-based help of cd-logs.ps1* diff --git a/Docs/cd-music.md b/Docs/cd-music.md index 1e916373..b1211fd9 100644 --- a/Docs/cd-music.md +++ b/Docs/cd-music.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the user's music folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-music.ps1 [] +cd-music.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/cd-onedrive.md b/Docs/cd-onedrive.md index 2900c153..29f7f5e4 100644 --- a/Docs/cd-onedrive.md +++ b/Docs/cd-onedrive.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the user's OneDrive fold ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-onedrive.ps1 [] +cd-onedrive.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/cd-pics.md b/Docs/cd-pics.md index e914da9d..7a64d103 100644 --- a/Docs/cd-pics.md +++ b/Docs/cd-pics.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the user's pictures fold ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-pics.ps1 [] +cd-pics.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/cd-public.md b/Docs/cd-public.md index 995539cb..5e4f8532 100644 --- a/Docs/cd-public.md +++ b/Docs/cd-public.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the Public folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-public.ps1 [] +cd-public.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/cd-repos.md b/Docs/cd-repos.md index a215603f..4471c819 100644 --- a/Docs/cd-repos.md +++ b/Docs/cd-repos.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the user's Git repositor ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-repos.ps1 [[-Subpath] ] [] +cd-repos.ps1 [[-Subpath] ] [] -Subpath Specifies an additional relative subpath (optional) diff --git a/Docs/cd-root.md b/Docs/cd-root.md index 24ee7e16..0b843ef0 100644 --- a/Docs/cd-root.md +++ b/Docs/cd-root.md @@ -4,7 +4,7 @@ This PowerShell script changes the current working directory to the root directo ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-root.ps1 [] +cd-root.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/cd-scripts.md b/Docs/cd-scripts.md index 4685ba26..34ee0a61 100644 --- a/Docs/cd-scripts.md +++ b/Docs/cd-scripts.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the PowerShell scripts f ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-scripts.ps1 [] +cd-scripts.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/cd-ssh.md b/Docs/cd-ssh.md index ffcbd131..4d32ba20 100644 --- a/Docs/cd-ssh.md +++ b/Docs/cd-ssh.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the user's SSH folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-ssh.ps1 [] +cd-ssh.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/cd-templates.md b/Docs/cd-templates.md index 131cb0be..17e6199a 100644 --- a/Docs/cd-templates.md +++ b/Docs/cd-templates.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the templates folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-templates.ps1 [] +cd-templates.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/cd-up.md b/Docs/cd-up.md index 6dc5b5c6..21f50c31 100644 --- a/Docs/cd-up.md +++ b/Docs/cd-up.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to one directory level up. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-up.ps1 [] +cd-up.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/cd-up2.md b/Docs/cd-up2.md index 8867c834..72acad12 100644 --- a/Docs/cd-up2.md +++ b/Docs/cd-up2.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to two directory level up. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-up2.ps1 [] +cd-up2.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/cd-up3.md b/Docs/cd-up3.md index 054ab4d4..0d089a67 100644 --- a/Docs/cd-up3.md +++ b/Docs/cd-up3.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to three directory levels u ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-up3.ps1 [] +cd-up3.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/cd-up4.md b/Docs/cd-up4.md index 57eeffce..ecb61bd3 100644 --- a/Docs/cd-up4.md +++ b/Docs/cd-up4.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to four directory levels up ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-up4.ps1 [] +cd-up4.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/cd-users.md b/Docs/cd-users.md index 869a9909..8e6fa732 100644 --- a/Docs/cd-users.md +++ b/Docs/cd-users.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the users directory. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-users.ps1 [] +cd-users.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/cd-videos.md b/Docs/cd-videos.md index 80c93738..a14b5731 100644 --- a/Docs/cd-videos.md +++ b/Docs/cd-videos.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the user's videos folder ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-videos.ps1 [] +cd-videos.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/cd-windows.md b/Docs/cd-windows.md index d50de669..e9b6fb7a 100644 --- a/Docs/cd-windows.md +++ b/Docs/cd-windows.md @@ -4,7 +4,7 @@ This PowerShell script changes the working directory to the Windows directory. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/cd-windows.ps1 [] +cd-windows.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/change-wallpaper.md b/Docs/change-wallpaper.md index 8214d95c..f512515a 100644 --- a/Docs/change-wallpaper.md +++ b/Docs/change-wallpaper.md @@ -4,7 +4,7 @@ This PowerShell script downloads a random photo from Unsplash and sets it as des ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/change-wallpaper.ps1 [[-Category] ] [] +change-wallpaper.ps1 [[-Category] ] [] -Category Specifies the photo category (beach, city, ...) diff --git a/Docs/check-apps.md b/Docs/check-apps.md index 84e26f43..d419acb8 100644 --- a/Docs/check-apps.md +++ b/Docs/check-apps.md @@ -4,7 +4,7 @@ This PowerShell script queries the application status and prints it. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-apps.ps1 [] +check-apps.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, @@ -42,7 +42,8 @@ https://github.com/fleschutz/PowerShell try { if ($IsLinux) { - # TODO + $NumSnaps = (snap list).Count - 1 + Write-Host "βœ… $($NumSnaps) snaps installed" } else { Write-Progress "⏳ Querying installed apps and updates..." $Apps = Get-AppxPackage diff --git a/Docs/check-battery.md b/Docs/check-battery.md index 50529651..9087daf9 100644 --- a/Docs/check-battery.md +++ b/Docs/check-battery.md @@ -4,7 +4,7 @@ This PowerShell script queries the status of the system battery and prints it. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-battery.ps1 [] +check-battery.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/check-bios.md b/Docs/check-bios.md index 9b3f4e6d..fa60c624 100644 --- a/Docs/check-bios.md +++ b/Docs/check-bios.md @@ -4,7 +4,7 @@ This PowerShell script queries the BIOS status and prints it. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-bios.ps1 [] +check-bios.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, @@ -14,7 +14,7 @@ This PowerShell script queries the BIOS status and prints it. ## Example ```powershell PS> ./check-bios -βœ… BIOS F6 by American Megatrends Inc. (version ALASKA - 1072009, S/N NXA82EV0EBB0760) +βœ… BIOS 'F6', release ALASKA - 1072009, S/N NXA82EV0EBB0760 by American Megatrends Inc. ``` @@ -33,7 +33,7 @@ https://github.com/fleschutz/PowerShell This PowerShell script queries the BIOS status and prints it. .EXAMPLE PS> ./check-bios - βœ… BIOS F6 by American Megatrends Inc. (version ALASKA - 1072009, S/N NXA82EV0EBB0760) + βœ… BIOS 'F6', release ALASKA - 1072009, S/N NXA82EV0EBB0760 by American Megatrends Inc. .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -52,14 +52,14 @@ try { } Write-Progress -completed "." } else { - Write-Progress "⏳ Querying BIOS..." + # Write-Progress "⏳ Querying BIOS..." $BIOS = Get-CimInstance -ClassName Win32_BIOS $Model = $BIOS.Name.Trim() $Manufacturer = $BIOS.Manufacturer.Trim() $Serial = $BIOS.SerialNumber.Trim() $Version = $BIOS.Version.Trim() - Write-Progress -completed "." - Write-Host "βœ… BIOS $Model by $Manufacturer (version $Version, S/N $Serial)" + # Write-Progress -completed "." + Write-Host "βœ… BIOS '$Model', release $Version, S/N $Serial by $Manufacturer" } exit 0 # success } catch { diff --git a/Docs/check-cpu.md b/Docs/check-cpu.md index 806fb605..613562be 100644 --- a/Docs/check-cpu.md +++ b/Docs/check-cpu.md @@ -67,10 +67,10 @@ try { $Temp = "no temp" } elseif ($Celsius -gt 50) { $Temp = "$($Celsius)Β°C" - $Status = "⚠" + $Status = "⚠️" } elseif ($Celsius -lt 0) { $Temp = "$($Celsius)Β°C" - $Status = "⚠" + $Status = "⚠️" } else { $Temp = "$($Celsius)Β°C" } diff --git a/Docs/check-day.md b/Docs/check-day.md index a6c278a6..bd543dec 100644 --- a/Docs/check-day.md +++ b/Docs/check-day.md @@ -4,7 +4,7 @@ This PowerShell script determines and speaks the current day by text-to-speech ( ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-day.ps1 [] +check-day.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/check-dns.md b/Docs/check-dns.md index a0ae895f..1daff7b0 100644 --- a/Docs/check-dns.md +++ b/Docs/check-dns.md @@ -4,7 +4,7 @@ This PowerShell script measures and prints the DNS resolution speed by using 200 ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-dns.ps1 [] +check-dns.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/check-drive-space.md b/Docs/check-drive-space.md index b74de6b6..0367bbbf 100644 --- a/Docs/check-drive-space.md +++ b/Docs/check-drive-space.md @@ -4,7 +4,7 @@ This PowerShell script checks a drive for free space left (20 GB by default). ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-drive-space.ps1 [[-Drive] ] [[-MinLevel] ] [] +check-drive-space.ps1 [[-Drive] ] [[-MinLevel] ] [] -Drive Specifies the drive to check diff --git a/Docs/check-drives.md b/Docs/check-drives.md index c03f6847..8b00b337 100644 --- a/Docs/check-drives.md +++ b/Docs/check-drives.md @@ -4,7 +4,7 @@ This PowerShell script checks all drives for free space left. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-drives.ps1 [[-MinLevel] ] [] +check-drives.ps1 [[-MinLevel] ] [] -MinLevel Specifies the minimum warning level (10 GB by default) diff --git a/Docs/check-easter-sunday.md b/Docs/check-easter-sunday.md index bdef20dc..7bfec2ce 100644 --- a/Docs/check-easter-sunday.md +++ b/Docs/check-easter-sunday.md @@ -4,7 +4,7 @@ This PowerShell script checks the time until Easter Sunday and replies by text-t ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-easter-sunday.ps1 [] +check-easter-sunday.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/check-file-system.md b/Docs/check-file-system.md index d28510d1..cb51a03f 100644 --- a/Docs/check-file-system.md +++ b/Docs/check-file-system.md @@ -4,7 +4,7 @@ This PowerShell script checks the file system of a drive. It needs admin rights. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-file-system.ps1 [[-Drive] ] [] +check-file-system.ps1 [[-Drive] ] [] -Drive Specifies the drive to check diff --git a/Docs/check-file.md b/Docs/check-file.md index 338134c4..f17ef421 100644 --- a/Docs/check-file.md +++ b/Docs/check-file.md @@ -4,7 +4,7 @@ This PowerShell script determines and prints the file type of the given file. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-file.ps1 [[-Path] ] [] +check-file.ps1 [[-Path] ] [] -Path Specifies the path to the file diff --git a/Docs/check-firewall.md b/Docs/check-firewall.md index 1b96c96d..5a28b6a6 100644 --- a/Docs/check-firewall.md +++ b/Docs/check-firewall.md @@ -4,7 +4,7 @@ This PowerShell script queries the status of the firewall and prints it. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-firewall.ps1 [] +check-firewall.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/check-hardware.md b/Docs/check-hardware.md new file mode 100644 index 00000000..d916c021 --- /dev/null +++ b/Docs/check-hardware.md @@ -0,0 +1,60 @@ +## The *check-hardware.ps1* Script + +This PowerShell script queries the hardware details of the local computer and prints it. + +## Parameters +```powershell +check-hardware.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +## Example +```powershell +PS> ./check-hardware.ps1 + +H A R D W A R E +βœ… Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz (CPU0, 2701MHz, socket U3E1, 30.1Β°C) +... + +``` + +## Notes +Author: Markus Fleschutz | License: CC0 + +## Related Links +https://github.com/fleschutz/PowerShell + +## Source Code +```powershell +<# +.SYNOPSIS + Checks the hardware +.DESCRIPTION + This PowerShell script queries the hardware details of the local computer and prints it. +.EXAMPLE + PS> ./check-hardware.ps1 + + H A R D W A R E + βœ… Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz (CPU0, 2701MHz, socket U3E1, 30.1Β°C) + ... +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +" " +& "$PSScriptRoot/write-green.ps1" " H A R D W A R E" +& "$PSScriptRoot/check-cpu.ps1" +& "$PSScriptRoot/check-ram.ps1" +& "$PSScriptRoot/check-gpu.ps1" +& "$PSScriptRoot/check-smart-devices.ps1" +& "$PSScriptRoot/check-drives.ps1" +& "$PSScriptRoot/check-battery.ps1" +exit 0 # success +``` + +*Generated by convert-ps2md.ps1 using the comment-based help of check-hardware.ps1* diff --git a/Docs/check-health.md b/Docs/check-health.md index 8c58aeee..5ff7c0de 100644 --- a/Docs/check-health.md +++ b/Docs/check-health.md @@ -1,10 +1,10 @@ ## The *check-health.ps1* Script -This PowerShell script checks and prints the system health of the local computer. +This PowerShell script queries the system health of the local computer (hardware, software, and network) and prints it. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-health.ps1 [] +check-health.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, @@ -13,7 +13,8 @@ This PowerShell script checks and prints the system health of the local computer ## Example ```powershell -PS> ./check-health +PS> ./check-health.ps1 + H A R D W A R E βœ… Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz (CPU0, 2701MHz, socket U3E1, 30.1Β°C) ... @@ -32,9 +33,10 @@ https://github.com/fleschutz/PowerShell .SYNOPSIS Checks the system health .DESCRIPTION - This PowerShell script checks and prints the system health of the local computer. + This PowerShell script queries the system health of the local computer (hardware, software, and network) and prints it. .EXAMPLE - PS> ./check-health + PS> ./check-health.ps1 + H A R D W A R E βœ… Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz (CPU0, 2701MHz, socket U3E1, 30.1Β°C) ... @@ -44,30 +46,9 @@ https://github.com/fleschutz/PowerShell Author: Markus Fleschutz | License: CC0 #> -" " -& "$PSScriptRoot/write-green.ps1" " H A R D W A R E" -& "$PSScriptRoot/check-cpu.ps1" -& "$PSScriptRoot/check-ram.ps1" -& "$PSScriptRoot/check-gpu.ps1" -& "$PSScriptRoot/check-smart-devices.ps1" -& "$PSScriptRoot/check-drives.ps1" -& "$PSScriptRoot/check-battery.ps1" -" " -& "$PSScriptRoot/write-green.ps1" " S O F T W A R E" -& "$PSScriptRoot/check-bios.ps1" -& "$PSScriptRoot/check-os.ps1" -& "$PSScriptRoot/check-powershell.ps1" -& "$PSScriptRoot/check-apps.ps1" -& "$PSScriptRoot/check-uptime.ps1" -& "$PSScriptRoot/check-time-zone.ps1" -& "$PSScriptRoot/check-swap-space.ps1" -& "$PSScriptRoot/check-pending-reboot.ps1" -" " -& "$PSScriptRoot/write-green.ps1" " N E T W O R K" -& "$PSScriptRoot/check-firewall" -& "$PSScriptRoot/check-ping.ps1" -& "$PSScriptRoot/check-dns.ps1" -& "$PSScriptRoot/check-vpn.ps1" +& "$PSScriptRoot/check-hardware.ps1" +& "$PSScriptRoot/check-software.ps1" +& "$PSScriptRoot/check-network.ps1" exit 0 # success ``` diff --git a/Docs/check-independence-day.md b/Docs/check-independence-day.md index b54813ab..af59753d 100644 --- a/Docs/check-independence-day.md +++ b/Docs/check-independence-day.md @@ -4,7 +4,7 @@ This PowerShell script checks the time until Indepence Day and replies by text-t ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-independence-day.ps1 [] +check-independence-day.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/check-ipv4-address.md b/Docs/check-ipv4-address.md index 8ef8208f..a9b3f9c3 100644 --- a/Docs/check-ipv4-address.md +++ b/Docs/check-ipv4-address.md @@ -4,7 +4,7 @@ This PowerShell script checks the given IPv4 address for validity. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-ipv4-address.ps1 [[-Address] ] [] +check-ipv4-address.ps1 [[-Address] ] [] -Address Specifies the IPv4 address to check diff --git a/Docs/check-ipv6-address.md b/Docs/check-ipv6-address.md index ee08266b..22aa0260 100644 --- a/Docs/check-ipv6-address.md +++ b/Docs/check-ipv6-address.md @@ -4,7 +4,7 @@ This PowerShell script checks the given IPv6 address for validity ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-ipv6-address.ps1 [[-Address] ] [] +check-ipv6-address.ps1 [[-Address] ] [] -Address Specifies the IPv6 address to check diff --git a/Docs/check-iss-position.md b/Docs/check-iss-position.md index 64aed06b..080344c1 100644 --- a/Docs/check-iss-position.md +++ b/Docs/check-iss-position.md @@ -4,7 +4,7 @@ This PowerShell script queries the position of the International Space Station ( ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-iss-position.ps1 [] +check-iss-position.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/check-mac-address.md b/Docs/check-mac-address.md index d91c5bff..2e84f2ff 100644 --- a/Docs/check-mac-address.md +++ b/Docs/check-mac-address.md @@ -5,7 +5,7 @@ Supported MAC address formats are: 00:00:00:00:00:00 or 00-00-00-00-00-00 or 000 ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-mac-address.ps1 [[-MAC] ] [] +check-mac-address.ps1 [[-MAC] ] [] -MAC Specifies the MAC address to check diff --git a/Docs/check-month.md b/Docs/check-month.md index 3b1a14f6..2ef14195 100644 --- a/Docs/check-month.md +++ b/Docs/check-month.md @@ -4,7 +4,7 @@ This PowerShell script determines and speaks the current month name by text-to-s ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-month.ps1 [] +check-month.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/check-moon-phase.md b/Docs/check-moon-phase.md index 41995974..3611100c 100644 --- a/Docs/check-moon-phase.md +++ b/Docs/check-moon-phase.md @@ -4,7 +4,7 @@ This PowerShell script determines the Moon phase and answers by text-to-speech ( ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-moon-phase.ps1 [] +check-moon-phase.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/check-network.md b/Docs/check-network.md new file mode 100644 index 00000000..57a006af --- /dev/null +++ b/Docs/check-network.md @@ -0,0 +1,60 @@ +## The *check-network.ps1* Script + +This PowerShell script queries the network details of the local computer and prints it. + +## Parameters +```powershell +check-network.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +## Example +```powershell +PS> ./check-network.ps1 + + + +N E T W O R K +βœ… Firewall enabled +... + +``` + +## Notes +Author: Markus Fleschutz | License: CC0 + +## Related Links +https://github.com/fleschutz/PowerShell + +## Source Code +```powershell +<# +.SYNOPSIS + Checks the network details +.DESCRIPTION + This PowerShell script queries the network details of the local computer and prints it. +.EXAMPLE + PS> ./check-network.ps1 + + N E T W O R K + βœ… Firewall enabled + ... +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +" " +& "$PSScriptRoot/write-green.ps1" " N E T W O R K" +& "$PSScriptRoot/check-firewall" +& "$PSScriptRoot/check-ping.ps1" +& "$PSScriptRoot/check-dns.ps1" +& "$PSScriptRoot/check-vpn.ps1" +exit 0 # success +``` + +*Generated by convert-ps2md.ps1 using the comment-based help of check-network.ps1* diff --git a/Docs/check-new-year.md b/Docs/check-new-year.md index f024ad94..f9dd8e17 100644 --- a/Docs/check-new-year.md +++ b/Docs/check-new-year.md @@ -4,7 +4,7 @@ This PowerShell script checks the time until New Year and replies by text-to-spe ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-new-year.ps1 [] +check-new-year.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/check-os.md b/Docs/check-os.md index cf7302a9..092787a6 100644 --- a/Docs/check-os.md +++ b/Docs/check-os.md @@ -4,7 +4,7 @@ This PowerShell script queries the operating system status and prints it. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-os.ps1 [] +check-os.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/check-outlook.md b/Docs/check-outlook.md index dd094e32..bf076501 100644 --- a/Docs/check-outlook.md +++ b/Docs/check-outlook.md @@ -4,7 +4,7 @@ This PowerShell script checks the inbox of Outlook for new/unread mails. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-outlook.ps1 [] +check-outlook.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/check-password.md b/Docs/check-password.md index b24a07c1..b37ef901 100644 --- a/Docs/check-password.md +++ b/Docs/check-password.md @@ -4,7 +4,7 @@ This PowerShell script checks the security status of the given password by havei ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-password.ps1 [[-password] ] [] +check-password.ps1 [[-password] ] [] -password diff --git a/Docs/check-pending-reboot.md b/Docs/check-pending-reboot.md index 551d1089..5b7d1a7d 100644 --- a/Docs/check-pending-reboot.md +++ b/Docs/check-pending-reboot.md @@ -18,7 +18,7 @@ check-pending-reboot.ps1 .SYNOPSIS Check for pending reboots .DESCRIPTION - This PowerShell script queries pending reboots and prints it. + This PowerShell script queries pending operating system reboots and prints it. .EXAMPLE ./check-pending-reboot.ps1 .LINK @@ -40,23 +40,24 @@ try { $Reason = "" if ($IsLinux) { if (Test-Path "/var/run/reboot-required") { - $Reason = "found /var/run/reboot-required" + $Reason = "found: /var/run/reboot-required" + Write-Host "⚠️ Pending reboot ($Reason)" } } else { if (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired") { - $Reason += ", '...\WindowsUpdate\Auto Update\RebootRequired'" + $Reason += ", ...\Auto Update\RebootRequired" } if (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\PostRebootReporting") { - $Reason += ", '...\WindowsUpdate\Auto Update\PostRebootReporting'" + $Reason += ", ...\Auto Update\PostRebootReporting" } if (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending") { - $Reason += ", '...\Component Based Servicing\RebootPending'" + $Reason += ", ...\Component Based Servicing\RebootPending" } if (Test-Path -Path "HKLM:\SOFTWARE\Microsoft\ServerManager\CurrentRebootAttempts") { - $Reason += ", '...\ServerManager\CurrentRebootAttempts'" + $Reason += ", ...\ServerManager\CurrentRebootAttempts" } if (Test-RegistryValue -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing" -Value "RebootInProgress") { - $Reason += ", '...\CurrentVersion\Component Based Servicing' with 'RebootInProgress'" + $Reason += ", ...\CurrentVersion\Component Based Servicing with 'RebootInProgress'" } if (Test-RegistryValue -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing" -Value "PackagesPending") { $Reason += ", '...\CurrentVersion\Component Based Servicing' with 'PackagesPending'" @@ -73,10 +74,11 @@ try { if (Test-RegistryValue -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon" -Value "AvoidSpnSet") { $Reason += ", '...\CurrentControlSet\Services\Netlogon' with 'AvoidSpnSet'" } + if ($Reason -ne "") { + Write-Host "⚠️ Pending reboot (registry contains $($Reason.substring(2)))" + } } - if ($Reason -ne "") { - Write-Host "⚠️ Pending reboot (found $($Reason.substring(2)) in registry)" - } else { + if ($Reason -eq "") { Write-Host "βœ… No pending reboot" } exit 0 # success diff --git a/Docs/check-ping.md b/Docs/check-ping.md index 7b9d6171..7c50962c 100644 --- a/Docs/check-ping.md +++ b/Docs/check-ping.md @@ -1,17 +1,17 @@ ## The *check-ping.ps1* Script -This PowerShell script checks the ping latency from the local computer to 9 popular hosts. +This PowerShell script measures the ping roundtrip times from the local computer to 10 Internet servers. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-ping.ps1 [[-hosts] ] [] +check-ping.ps1 [[-hosts] ] [] -hosts - Specifies the hosts to check, seperated by commata (default is: amazon.com,bing.com,cnn.com,dropbox.com,facebook.com,google.com,live.com,twitter.com,youtube.com) + Specifies the hosts to check, seperated by commata (default is: amazon.com,bing.com,cnn.com,dropbox.com,facebook.com,github.com,google.com,live.com,twitter.com,youtube.com) Required? false Position? 1 - Default value amazon.com,bing.com,cnn.com,dropbox.com,facebook.com,google.com,live.com,twitter.com,youtube.com + Default value amazon.com,bing.com,cnn.com,dropbox.com,facebook.com,github.com,google.com,live.com,twitter.com,youtube.com Accept pipeline input? false Accept wildcard characters? false @@ -23,7 +23,7 @@ This PowerShell script checks the ping latency from the local computer to 9 popu ## Example ```powershell PS> ./check-ping -βœ… Ping latency is 13ms...109ms with 25ms average. +βœ… Ping latency is 29ms average (13ms...109ms, 0 loss) ``` @@ -39,37 +39,42 @@ https://github.com/fleschutz/PowerShell .SYNOPSIS Checks the ping latency .DESCRIPTION - This PowerShell script checks the ping latency from the local computer to 9 popular hosts. + This PowerShell script measures the ping roundtrip times from the local computer to 10 Internet servers. .PARAMETER hosts - Specifies the hosts to check, seperated by commata (default is: amazon.com,bing.com,cnn.com,dropbox.com,facebook.com,google.com,live.com,twitter.com,youtube.com) + Specifies the hosts to check, seperated by commata (default is: amazon.com,bing.com,cnn.com,dropbox.com,facebook.com,github.com,google.com,live.com,twitter.com,youtube.com) .EXAMPLE PS> ./check-ping - βœ… Ping latency is 13ms...109ms with 25ms average. + βœ… Ping latency is 29ms average (13ms...109ms, 0 loss) .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$hosts = "amazon.com,bing.com,cnn.com,dropbox.com,facebook.com,google.com,live.com,twitter.com,youtube.com") +param([string]$hosts = "amazon.com,bing.com,cnn.com,dropbox.com,facebook.com,github.com,google.com,live.com,twitter.com,youtube.com") try { - Write-Progress "⏳ Sending a ping to 9 popular hosts..." - $HostsArray = $hosts.Split(",") - $Pings = Test-Connection -computerName $HostsArray -count 1 - - [int]$Min = 9999999 - [int]$Max = [int]$Avg = 0 - foreach($Ping in $Pings) { - if ($IsLinux) { [int]$Latency = $Ping.latency } else { [int]$Latency = $Ping.ResponseTime } - if ($Latency -lt $Min) { $Min = $Latency } - if ($Latency -gt $Max) { $Max = $Latency } - $Avg += $Latency + Write-Host "βœ… Ping latency is" -noNewline + $hostsArray = $hosts.Split(",") + $t = $hostsArray | foreach { + (New-Object Net.NetworkInformation.Ping).SendPingAsync($_, 250) } - $Avg /= $Pings.count - - Write-Progress -Completed "." - Write-Host "βœ… Ping latency is $($Min)ms...$($Max)ms with $($Avg)ms average" + [Threading.Tasks.Task]::WaitAll($t) + [int]$min = 9999999 + [int]$max = [int]$avg = [int]$successCount = [int]$lossCount = 0 + foreach($ping in $t.Result) { + if ($ping.Status -eq "Success") { + [int]$latency = $ping.RoundtripTime + if ($latency -lt $min) { $min = $Latency } + if ($latency -gt $max) { $max = $Latency } + $avg += $latency + $successCount++ + } else { + $lossCount++ + } + } + $avg /= $successCount + Write-Host " $($avg)ms average ($($min)ms...$($max)ms, $lossCount loss)" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Docs/check-powershell.md b/Docs/check-powershell.md index 4ba1a68a..8424b630 100644 --- a/Docs/check-powershell.md +++ b/Docs/check-powershell.md @@ -4,7 +4,7 @@ This PowerShell script queries the PowerShell status and prints it. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-powershell.ps1 [] +check-powershell.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/check-ps1-file.md b/Docs/check-ps1-file.md index 9c8f2019..e04074ab 100644 --- a/Docs/check-ps1-file.md +++ b/Docs/check-ps1-file.md @@ -1,10 +1,10 @@ ## The *check-ps1-file.ps1* Script -This PowerShell script checks the given PowerShell file(s) for validity. +This PowerShell script checks the given PowerShell script file(s) for validity. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-ps1-file.ps1 [[-filePattern] ] [] +check-ps1-file.ps1 [[-filePattern] ] [] -filePattern Specifies the file pattern to the PowerShell file(s) @@ -39,7 +39,7 @@ https://github.com/fleschutz/PowerShell .SYNOPSIS Checks PowerShell file(s) for validity .DESCRIPTION - This PowerShell script checks the given PowerShell file(s) for validity. + This PowerShell script checks the given PowerShell script file(s) for validity. .PARAMETER filePattern Specifies the file pattern to the PowerShell file(s) .EXAMPLE @@ -55,13 +55,13 @@ param([string]$filePattern = "") try { if ($filePattern -eq "" ) { $path = Read-Host "Enter the file pattern to the PowerShell file(s)" } - $files = Get-ChildItem $filePattern + + $files = Get-ChildItem -path "$filePattern" -attributes !Directory foreach ($file in $files) { $syntaxError = @() [void][System.Management.Automation.Language.Parser]::ParseFile($file, [ref]$null, [ref]$syntaxError) if ("$syntaxError" -ne "") { throw "$syntaxError" } - $basename = (Get-Item "$file").Basename - "βœ”οΈ Valid PowerShell in $basename" + "βœ”οΈ Valid PowerShell in $($file.Name)" } exit 0 # success } catch { diff --git a/Docs/check-repo.md b/Docs/check-repo.md index 07cd6120..cd23dbc4 100644 --- a/Docs/check-repo.md +++ b/Docs/check-repo.md @@ -4,10 +4,10 @@ This PowerShell script verifies the integrity of a local Git repository. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-repo.ps1 [[-RepoDir] ] [] +check-repo.ps1 [[-RepoDir] ] [] -RepoDir - Specifies the path to the Git repository (current working dir by default) + Specifies the path to the Git repository (current working directory by default) Required? false Position? 1 @@ -22,7 +22,15 @@ This PowerShell script verifies the integrity of a local Git repository. ## Example ```powershell -PS> ./check-repo C:\MyRepo +PS> ./check-repo.ps1 C:\MyRepo +⏳ (1/10) Searching for Git executable... git version 2.41.0.windows.3 +⏳ (2/10) Checking local folder... πŸ“‚C:\MyRepo +⏳ (3/10) Querying remote URL... git@github.com:fleschutz/PowerShell.git +⏳ (4/10) Querying current branch... main +⏳ (5/10) Fetching remote updates... +⏳ (6/10) Querying latest tag... v0.8 (commit 02171a401d83b01a0cda0af426840b605e617f08) +⏳ (7/10) Verifying data integrity... +... ``` @@ -40,9 +48,17 @@ https://github.com/fleschutz/PowerShell .DESCRIPTION This PowerShell script verifies the integrity of a local Git repository. .PARAMETER RepoDir - Specifies the path to the Git repository (current working dir by default) + Specifies the path to the Git repository (current working directory by default) .EXAMPLE - PS> ./check-repo C:\MyRepo + PS> ./check-repo.ps1 C:\MyRepo + ⏳ (1/10) Searching for Git executable... git version 2.41.0.windows.3 + ⏳ (2/10) Checking local folder... πŸ“‚C:\MyRepo + ⏳ (3/10) Querying remote URL... git@github.com:fleschutz/PowerShell.git + ⏳ (4/10) Querying current branch... main + ⏳ (5/10) Fetching remote updates... + ⏳ (6/10) Querying latest tag... v0.8 (commit 02171a401d83b01a0cda0af426840b605e617f08) + ⏳ (7/10) Verifying data integrity... + ... .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -58,7 +74,7 @@ try { & git --version if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } - Write-Host "⏳ (2/10) Checking repository... " -noNewline + Write-Host "⏳ (2/10) Checking local folder... " -noNewline $FullPath = Resolve-Path "$RepoDir" if (!(Test-Path "$FullPath" -pathType Container)) { throw "Can't access folder: $FullPath" } "πŸ“‚$FullPath" @@ -71,9 +87,9 @@ try { & git -C "$FullPath" branch --show-current if ($lastExitCode -ne "0") { throw "'git branch --show-current' failed with exit code $lastExitCode" } - Write-Host "⏳ (5/10) Fetching updates..." + Write-Host "⏳ (5/10) Fetching remote updates..." & git -C "$FullPath" fetch - if ($lastExitCode -ne "0") { throw "'git branch --show-current' failed with exit code $lastExitCode" } + if ($lastExitCode -ne "0") { throw "'git fetch' failed with exit code $lastExitCode" } Write-Host "⏳ (6/10) Querying latest tag... " -noNewline $LatestTagCommitID = (git -C "$FullPath" rev-list --tags --max-count=1) @@ -98,7 +114,7 @@ try { $RepoDirName = (Get-Item "$FullPath").Name [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds - "βœ”οΈ successfully checked repo πŸ“‚$RepoDirName in $Elapsed sec" + "βœ”οΈ checked Git repository πŸ“‚$RepoDirName in $Elapsed sec" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Docs/check-santa.md b/Docs/check-santa.md index f5665eb7..292ffb9f 100644 --- a/Docs/check-santa.md +++ b/Docs/check-santa.md @@ -4,7 +4,7 @@ This PowerShell script checks the time until Saint Nicholas Day and replies by t ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-santa.ps1 [] +check-santa.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/check-software.md b/Docs/check-software.md new file mode 100644 index 00000000..78fb27e6 --- /dev/null +++ b/Docs/check-software.md @@ -0,0 +1,64 @@ +## The *check-software.ps1* Script + +This PowerShell script queries the software details of the local computer and prints it. + +## Parameters +```powershell +check-software.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +## Example +```powershell +PS> ./check-software.ps1 + + + +S O F T W A R E +βœ… BIOS 'P62 v02.67', release HPQOEM - 0, S/N CZC448B9C1 by HP +... + +``` + +## Notes +Author: Markus Fleschutz | License: CC0 + +## Related Links +https://github.com/fleschutz/PowerShell + +## Source Code +```powershell +<# +.SYNOPSIS + Checks the software +.DESCRIPTION + This PowerShell script queries the software details of the local computer and prints it. +.EXAMPLE + PS> ./check-software.ps1 + + S O F T W A R E + βœ… BIOS 'P62 v02.67', release HPQOEM - 0, S/N CZC448B9C1 by HP + ... +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +" " +& "$PSScriptRoot/write-green.ps1" " S O F T W A R E" +& "$PSScriptRoot/check-bios.ps1" +& "$PSScriptRoot/check-os.ps1" +& "$PSScriptRoot/check-powershell.ps1" +& "$PSScriptRoot/check-apps.ps1" +& "$PSScriptRoot/check-uptime.ps1" +& "$PSScriptRoot/check-time-zone.ps1" +& "$PSScriptRoot/check-swap-space.ps1" +& "$PSScriptRoot/check-pending-reboot.ps1" +exit 0 # success +``` + +*Generated by convert-ps2md.ps1 using the comment-based help of check-software.ps1* diff --git a/Docs/check-subnet-mask.md b/Docs/check-subnet-mask.md index 51ddd940..19357432 100644 --- a/Docs/check-subnet-mask.md +++ b/Docs/check-subnet-mask.md @@ -4,7 +4,7 @@ This PowerShell script checks the given subnet mask for validity. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-subnet-mask.ps1 [[-address] ] [] +check-subnet-mask.ps1 [[-address] ] [] -address Specifies the subnet mask to check diff --git a/Docs/check-swap-space.md b/Docs/check-swap-space.md index 25b27d56..b8ad9dde 100644 --- a/Docs/check-swap-space.md +++ b/Docs/check-swap-space.md @@ -4,7 +4,7 @@ This PowerShell script queries the status of the swap space and prints it. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-swap-space.ps1 [[-MinLevel] ] [] +check-swap-space.ps1 [[-MinLevel] ] [] -MinLevel Specifies the minimum level (10 GB by default) diff --git a/Docs/check-symlinks.md b/Docs/check-symlinks.md index 763f7f22..5beb7f43 100644 --- a/Docs/check-symlinks.md +++ b/Docs/check-symlinks.md @@ -5,7 +5,7 @@ It returns the number of broken symlinks as exit value. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-symlinks.ps1 [[-Folder] ] [] +check-symlinks.ps1 [[-Folder] ] [] -Folder Specifies the path to the folder diff --git a/Docs/check-time-zone.md b/Docs/check-time-zone.md index 5187a962..4f006552 100644 --- a/Docs/check-time-zone.md +++ b/Docs/check-time-zone.md @@ -4,7 +4,7 @@ This PowerShell script queries the time zone and prints it. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-time-zone.ps1 [] +check-time-zone.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, @@ -14,7 +14,7 @@ This PowerShell script queries the time zone and prints it. ## Example ```powershell PS> ./check-time-zone -βœ… 11:13 AM (UTC + 01:00:00 W. Europe Standard Time + 01:00:00 daylight saving time) +βœ… 11:13 AM W. Europe Summer Time (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna (+01:00 DST) ``` @@ -33,7 +33,7 @@ https://github.com/fleschutz/PowerShell This PowerShell script queries the time zone and prints it. .EXAMPLE PS> ./check-time-zone - βœ… 11:13 AM (UTC + 01:00:00 W. Europe Standard Time + 01:00:00 daylight saving time) + βœ… 11:13 AM W. Europe Summer Time (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna (+01:00 DST) .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -44,8 +44,14 @@ try { [system.threading.thread]::currentThread.currentCulture = [system.globalization.cultureInfo]"en-US" $Time = $((Get-Date).ToShortTimeString()) $TZ = (Get-Timezone) - if ($TZ.SupportsDaylightSavingTime) { $DST="+ 01:00:00 daylight saving time" } else { $DST="" } - Write-Host "βœ… $Time (UTC + $($TZ.BaseUtcOffset) $($TZ.Id) $DST)" + if ($TZ.SupportsDaylightSavingTime) { + $TZName = $TZ.DaylightName + $DST=" (+01:00 DST)" + } else { + $TZName = $TZ.StandardName + $DST="" + } + Write-Host "βœ… $Time $TZName $($TZ.DisplayName)$($DST)" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Docs/check-uptime.md b/Docs/check-uptime.md index 767d0276..cc9259a5 100644 --- a/Docs/check-uptime.md +++ b/Docs/check-uptime.md @@ -4,7 +4,7 @@ This PowerShell script queries the computer's uptime and prints it. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-uptime.ps1 [] +check-uptime.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/check-vpn.md b/Docs/check-vpn.md index dde4682b..c4469a29 100644 --- a/Docs/check-vpn.md +++ b/Docs/check-vpn.md @@ -1,10 +1,10 @@ ## The *check-vpn.ps1* Script -This PowerShell script queries the status of the VPN connections and prints it. +This PowerShell script queries and prints the status of the VPN connection(s). ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-vpn.ps1 [] +check-vpn.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, @@ -13,8 +13,8 @@ This PowerShell script queries the status of the VPN connections and prints it. ## Example ```powershell -PS> ./check-vpn -βœ… Disconnected VPN 'NASA L2TP' +PS> ./check-vpn.ps1 +βœ… VPN to NASA L2TP is disconnected ``` @@ -30,10 +30,10 @@ https://github.com/fleschutz/PowerShell .SYNOPSIS Checks the VPN status .DESCRIPTION - This PowerShell script queries the status of the VPN connections and prints it. + This PowerShell script queries and prints the status of the VPN connection(s). .EXAMPLE - PS> ./check-vpn - βœ… Disconnected VPN 'NASA L2TP' + PS> ./check-vpn.ps1 + βœ… VPN to NASA L2TP is disconnected .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -47,11 +47,11 @@ try { } else { $Connections = Get-VPNConnection foreach($Connection in $Connections) { - "βœ… $($Connection.ConnectionStatus) VPN '$($Connection.Name)'" + Write-Host "βœ… VPN to $($Connection.Name) is $($Connection.ConnectionStatus.ToLower())" $NoVPN = $false } } - if ($NoVPN) { "⚠️ No VPN" } + if ($NoVPN) { Write-Host "⚠️ No VPN configured" } exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Docs/check-weather.md b/Docs/check-weather.md index 0ce0fb56..5b47a3c9 100644 --- a/Docs/check-weather.md +++ b/Docs/check-weather.md @@ -4,7 +4,7 @@ This PowerShell script checks the current weather report. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-weather.ps1 [[-location] ] [] +check-weather.ps1 [[-location] ] [] -location Specifies the location to use (determined automatically per default) diff --git a/Docs/check-week.md b/Docs/check-week.md index d373d421..42a3a752 100644 --- a/Docs/check-week.md +++ b/Docs/check-week.md @@ -4,7 +4,7 @@ This PowerShell script determines and speaks the current week number by text-to- ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-week.ps1 [] +check-week.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/check-wind.md b/Docs/check-wind.md index 8cf128b0..25f40976 100644 --- a/Docs/check-wind.md +++ b/Docs/check-wind.md @@ -4,7 +4,7 @@ This PowerShell script determines the current wind conditions and replies by tex ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-wind.ps1 [[-location] ] [] +check-wind.ps1 [[-location] ] [] -location Specifies the location to use (determined automatically per default) diff --git a/Docs/check-windows-system-files.md b/Docs/check-windows-system-files.md index f2af123f..d40bb0f9 100644 --- a/Docs/check-windows-system-files.md +++ b/Docs/check-windows-system-files.md @@ -4,7 +4,7 @@ This PowerShell script checks the validity of the Windows system files. It requi ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-windows-system-files.ps1 [] +check-windows-system-files.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/check-xml-file.md b/Docs/check-xml-file.md index 70b85911..7624352d 100644 --- a/Docs/check-xml-file.md +++ b/Docs/check-xml-file.md @@ -4,7 +4,7 @@ This PowerShell script checks the given XML file for validity. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/check-xml-file.ps1 [[-file] ] [] +check-xml-file.ps1 [[-file] ] [] -file Specifies the path to the XML file to check diff --git a/Docs/clean-repo.md b/Docs/clean-repo.md index f1ad4f41..cd0eb82c 100644 --- a/Docs/clean-repo.md +++ b/Docs/clean-repo.md @@ -5,7 +5,7 @@ NOTE: To be used with care! This cannot be undone! ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/clean-repo.ps1 [[-RepoDir] ] [] +clean-repo.ps1 [[-RepoDir] ] [] -RepoDir Specifies the file path to the local Git repository @@ -56,15 +56,15 @@ param([string]$RepoDir = "$PWD") try { $StopWatch = [system.diagnostics.stopwatch]::startNew() - Write-Host "⏳ (1/4) Searching for Git executable... " -noNewline + 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 repository... πŸ“‚$RepoDir" + "⏳ (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 - "⏳ (3/4) Removing repo's untracked files..." + "⏳ (3/4) Removing untracked files in repository..." & git -C "$RepoDir" 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..." @@ -72,7 +72,7 @@ try { if ($lastExitCode -ne "0") { throw "'git clean' failed with exit code $lastExitCode" } } - "⏳ (4/4) Removing submodules' untracked files..." + "⏳ (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 if ($lastExitCode -ne "0") { throw "'git clean' in the submodules failed with exit code $lastExitCode" } diff --git a/Docs/clean-repos.md b/Docs/clean-repos.md index c60ef379..140e02d6 100644 --- a/Docs/clean-repos.md +++ b/Docs/clean-repos.md @@ -4,7 +4,7 @@ This PowerShell script cleans all Git repositories in a folder from untracked fi ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/clean-repos.ps1 [[-ParentDir] ] [] +clean-repos.ps1 [[-ParentDir] ] [] -ParentDir Specifies the path to the parent folder diff --git a/Docs/clear-dns-cache.md b/Docs/clear-dns-cache.md index a77df6a1..3239f7c8 100644 --- a/Docs/clear-dns-cache.md +++ b/Docs/clear-dns-cache.md @@ -4,7 +4,7 @@ This PowerShell script clears the DNS client cache of the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/clear-dns-cache.ps1 [] +clear-dns-cache.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/clear-recycle-bin.md b/Docs/clear-recycle-bin.md index 75baebae..f36d0ebb 100644 --- a/Docs/clear-recycle-bin.md +++ b/Docs/clear-recycle-bin.md @@ -5,7 +5,7 @@ IMPORTANT NOTE: this cannot be undo! ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/clear-recycle-bin.ps1 [] +clear-recycle-bin.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/clone-repos.md b/Docs/clone-repos.md index 51f47a85..dbb4fdad 100644 --- a/Docs/clone-repos.md +++ b/Docs/clone-repos.md @@ -4,7 +4,7 @@ This PowerShell script clones popular Git repositories into a target directory. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/clone-repos.ps1 [[-TargetDir] ] [] +clone-repos.ps1 [[-TargetDir] ] [] -TargetDir Specifies the file path to the target directory (current working directory by default) diff --git a/Docs/close-calculator.md b/Docs/close-calculator.md index 1da15ab5..240c53b0 100644 --- a/Docs/close-calculator.md +++ b/Docs/close-calculator.md @@ -4,7 +4,7 @@ This PowerShell script closes the calculator application gracefully. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-calculator.ps1 [] +close-calculator.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-chrome.md b/Docs/close-chrome.md index 63338d19..a17b482b 100644 --- a/Docs/close-chrome.md +++ b/Docs/close-chrome.md @@ -4,7 +4,7 @@ This PowerShell script closes the Google Chrome Web browser gracefully. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-chrome.ps1 [] +close-chrome.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-cortana.md b/Docs/close-cortana.md index 58653075..88ca6079 100644 --- a/Docs/close-cortana.md +++ b/Docs/close-cortana.md @@ -4,7 +4,7 @@ This PowerShell script closes Microsoft's Cortana application gracefully. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-cortana.ps1 [] +close-cortana.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-edge.md b/Docs/close-edge.md index ec9fdce5..e0d0a923 100644 --- a/Docs/close-edge.md +++ b/Docs/close-edge.md @@ -4,7 +4,7 @@ This PowerShell script closes the Microsoft Edge Web browser gracefully. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-edge.ps1 [] +close-edge.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-file-explorer.md b/Docs/close-file-explorer.md index 54922018..3eb565cd 100644 --- a/Docs/close-file-explorer.md +++ b/Docs/close-file-explorer.md @@ -4,7 +4,7 @@ This PowerShell script closes the Microsoft File Explorer application gracefully ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-file-explorer.ps1 [] +close-file-explorer.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-firefox.md b/Docs/close-firefox.md index 80f351d4..faebb330 100644 --- a/Docs/close-firefox.md +++ b/Docs/close-firefox.md @@ -4,7 +4,7 @@ This PowerShell script closes the Mozilla Firefox Web browser gracefully. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-firefox.ps1 [] +close-firefox.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-git-extensions.md b/Docs/close-git-extensions.md index 2593c0cb..4a472aca 100644 --- a/Docs/close-git-extensions.md +++ b/Docs/close-git-extensions.md @@ -4,7 +4,7 @@ This PowerShell script closes the Git Extensions application gracefully. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-git-extensions.ps1 [] +close-git-extensions.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-magnifier.md b/Docs/close-magnifier.md index 043f5fde..3a69c459 100644 --- a/Docs/close-magnifier.md +++ b/Docs/close-magnifier.md @@ -4,7 +4,7 @@ This PowerShell script closes the Windows Screen Magnifier application gracefull ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-magnifier.ps1 [] +close-magnifier.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-microsoft-paint.md b/Docs/close-microsoft-paint.md index 93adf469..c6fe5c78 100644 --- a/Docs/close-microsoft-paint.md +++ b/Docs/close-microsoft-paint.md @@ -4,7 +4,7 @@ This PowerShell script closes the Microsoft Paint application gracefully. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-microsoft-paint.ps1 [] +close-microsoft-paint.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-microsoft-store.md b/Docs/close-microsoft-store.md index a1ef354c..1c5acd28 100644 --- a/Docs/close-microsoft-store.md +++ b/Docs/close-microsoft-store.md @@ -4,7 +4,7 @@ This PowerShell script closes the Microsoft Store application gracefully. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-microsoft-store.ps1 [] +close-microsoft-store.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-netflix.md b/Docs/close-netflix.md index 9e9af3a6..e3d90552 100644 --- a/Docs/close-netflix.md +++ b/Docs/close-netflix.md @@ -4,7 +4,7 @@ This PowerShell script closes the Netflix application gracefully. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-netflix.ps1 [] +close-netflix.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-note-pad.md b/Docs/close-note-pad.md index 94a00c61..4ebc463b 100644 --- a/Docs/close-note-pad.md +++ b/Docs/close-note-pad.md @@ -4,7 +4,7 @@ This PowerShell script closes the Notepad application gracefully. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-note-pad.ps1 [] +close-note-pad.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-obs-studio.md b/Docs/close-obs-studio.md index 96e2832f..c43702a2 100644 --- a/Docs/close-obs-studio.md +++ b/Docs/close-obs-studio.md @@ -4,7 +4,7 @@ This PowerShell script closes the OBS Studio application gracefully. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-obs-studio.ps1 [] +close-obs-studio.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-one-calendar.md b/Docs/close-one-calendar.md index d15cceb2..83d2c255 100644 --- a/Docs/close-one-calendar.md +++ b/Docs/close-one-calendar.md @@ -4,7 +4,7 @@ This PowerShell script closes the OneCalendar application gracefully. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-one-calendar.ps1 [] +close-one-calendar.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-outlook.md b/Docs/close-outlook.md index 4cb4affc..8c4e32f1 100644 --- a/Docs/close-outlook.md +++ b/Docs/close-outlook.md @@ -4,7 +4,7 @@ This PowerShell script closes the Microsoft Outlook email application gracefully ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-outlook.ps1 [] +close-outlook.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-paint-three-d.md b/Docs/close-paint-three-d.md index 885b4845..e63bfc11 100644 --- a/Docs/close-paint-three-d.md +++ b/Docs/close-paint-three-d.md @@ -4,7 +4,7 @@ This PowerShell script closes the Paint 3D application gracefully. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-paint-three-d.ps1 [] +close-paint-three-d.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-program.md b/Docs/close-program.md index dc648a5f..b5297413 100644 --- a/Docs/close-program.md +++ b/Docs/close-program.md @@ -4,7 +4,7 @@ This PowerShell script closes a program's processes gracefully. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-program.ps1 [[-FullProgramName] ] [[-ProgramName] ] [[-ProgramAliasName] ] [] +close-program.ps1 [[-FullProgramName] ] [[-ProgramName] ] [[-ProgramAliasName] ] [] -FullProgramName Specifies the full program name diff --git a/Docs/close-serenade.md b/Docs/close-serenade.md index 19b9456c..bacfaec1 100644 --- a/Docs/close-serenade.md +++ b/Docs/close-serenade.md @@ -4,7 +4,7 @@ This PowerShell script closes the Serenade.ai application gracefully. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-serenade.ps1 [] +close-serenade.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-snipping-tool.md b/Docs/close-snipping-tool.md index af208205..01f126cb 100644 --- a/Docs/close-snipping-tool.md +++ b/Docs/close-snipping-tool.md @@ -4,7 +4,7 @@ This PowerShell script closes the Snipping Tool application gracefully. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-snipping-tool.ps1 [] +close-snipping-tool.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-spotify.md b/Docs/close-spotify.md index dcbdb23f..094487fe 100644 --- a/Docs/close-spotify.md +++ b/Docs/close-spotify.md @@ -4,7 +4,7 @@ This PowerShell script closes the Spotify application gracefully. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-spotify.ps1 [] +close-spotify.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-task-manager.md b/Docs/close-task-manager.md index 42c031a8..4523b406 100644 --- a/Docs/close-task-manager.md +++ b/Docs/close-task-manager.md @@ -4,7 +4,7 @@ This PowerShell script closes the Task Manager application gracefully. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-task-manager.ps1 [] +close-task-manager.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-three-d-viewer.md b/Docs/close-three-d-viewer.md index 92e0a8fd..c91c07a3 100644 --- a/Docs/close-three-d-viewer.md +++ b/Docs/close-three-d-viewer.md @@ -4,7 +4,7 @@ This PowerShell script closes the 3D-Viewer application gracefully. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-three-d-viewer.ps1 [] +close-three-d-viewer.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-thunderbird.md b/Docs/close-thunderbird.md index 7c5efcb0..d1712b8f 100644 --- a/Docs/close-thunderbird.md +++ b/Docs/close-thunderbird.md @@ -4,7 +4,7 @@ This PowerShell script closes the Mozilla Thunderbird email application graceful ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-thunderbird.ps1 [] +close-thunderbird.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-visual-studio.md b/Docs/close-visual-studio.md index 2c6a41f9..4d76acdf 100644 --- a/Docs/close-visual-studio.md +++ b/Docs/close-visual-studio.md @@ -4,7 +4,7 @@ This PowerShell script closes the Microsoft Visual Studio application gracefully ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-visual-studio.ps1 [] +close-visual-studio.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-vlc.md b/Docs/close-vlc.md index b0daed42..93a44af0 100644 --- a/Docs/close-vlc.md +++ b/Docs/close-vlc.md @@ -4,7 +4,7 @@ This PowerShell script closes the VLC media player application gracefully. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-vlc.ps1 [] +close-vlc.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/close-windows-terminal.md b/Docs/close-windows-terminal.md index 89f58894..c3c44b6c 100644 --- a/Docs/close-windows-terminal.md +++ b/Docs/close-windows-terminal.md @@ -4,7 +4,7 @@ This PowerShell script closes the Windows Terminal application gracefully. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/close-windows-terminal.ps1 [] +close-windows-terminal.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/configure-git.md b/Docs/configure-git.md index 74a082f0..bc0ac77d 100644 --- a/Docs/configure-git.md +++ b/Docs/configure-git.md @@ -4,7 +4,7 @@ This PowerShell script configures the user settings for Git. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/configure-git.ps1 [[-FullName] ] [[-EmailAddress] ] [[-FavoriteEditor] ] [] +configure-git.ps1 [[-FullName] ] [[-EmailAddress] ] [[-FavoriteEditor] ] [] -FullName Specifies the user's full name diff --git a/Docs/connect-vpn.md b/Docs/connect-vpn.md index 30dce706..28ec2530 100644 --- a/Docs/connect-vpn.md +++ b/Docs/connect-vpn.md @@ -4,7 +4,7 @@ This PowerShell script tries to connect to the VPN. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/connect-vpn.ps1 [] +connect-vpn.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/convert-csv2txt.md b/Docs/convert-csv2txt.md index 497ac46c..8f0b428f 100644 --- a/Docs/convert-csv2txt.md +++ b/Docs/convert-csv2txt.md @@ -4,7 +4,7 @@ This PowerShell script converts a .CSV file into a text file and prints it. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/convert-csv2txt.ps1 [[-Path] ] [] +convert-csv2txt.ps1 [[-Path] ] [] -Path Specifies the path to the .CSV file diff --git a/Docs/convert-docx2md.md b/Docs/convert-docx2md.md index 71565c34..abffe2ff 100644 --- a/Docs/convert-docx2md.md +++ b/Docs/convert-docx2md.md @@ -4,7 +4,7 @@ This PowerShell script converts .DOCX file(s) into Markdown. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/convert-docx2md.ps1 [[-FilePattern] ] [] +convert-docx2md.ps1 [[-FilePattern] ] [] -FilePattern Specifies the file pattern to the .DOCX file(s) diff --git a/Docs/convert-md2html.md b/Docs/convert-md2html.md index c3c900f7..1d94a732 100644 --- a/Docs/convert-md2html.md +++ b/Docs/convert-md2html.md @@ -4,7 +4,7 @@ This PowerShell script converts Markdown file(s) into HTML. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/convert-md2html.ps1 [[-FilePattern] ] [] +convert-md2html.ps1 [[-FilePattern] ] [] -FilePattern Specifies the file pattern to the Markdown file(s) diff --git a/Docs/convert-mysql2csv.md b/Docs/convert-mysql2csv.md index 1e3712e1..a9ab128d 100644 --- a/Docs/convert-mysql2csv.md +++ b/Docs/convert-mysql2csv.md @@ -4,7 +4,7 @@ This PowerShell script converts a MySQL database table to a .CSV file. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/convert-mysql2csv.ps1 [[-server] ] [[-database] ] [[-username] ] [[-password] ] [[-query] ] [] +convert-mysql2csv.ps1 [[-server] ] [[-database] ] [[-username] ] [[-password] ] [[-query] ] [] -server Specifies the server's hostname or IP address diff --git a/Docs/convert-ps2bat.md b/Docs/convert-ps2bat.md index 97c7e59a..f8b60d5f 100644 --- a/Docs/convert-ps2bat.md +++ b/Docs/convert-ps2bat.md @@ -4,7 +4,7 @@ This PowerShell script converts one or more PowerShell scripts to .bat batch fil ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/convert-ps2bat.ps1 [[-Filepattern] ] [] +convert-ps2bat.ps1 [[-Filepattern] ] [] -Filepattern Specifies the file pattern diff --git a/Docs/convert-ps2md.md b/Docs/convert-ps2md.md index 912e53ef..f3d8aaa7 100644 --- a/Docs/convert-ps2md.md +++ b/Docs/convert-ps2md.md @@ -4,7 +4,7 @@ This PowerShell script converts the comment-based help of a PowerShell script to ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/convert-ps2md.ps1 [[-filename] ] [] +convert-ps2md.ps1 [[-filename] ] [] -filename Specifies the path to the PowerShell script @@ -106,7 +106,7 @@ try { "## Parameters" "``````powershell" $Syntax = (($full.syntax | Out-String) -replace "`r`n", "`r`n").Trim() - $Syntax = (($Syntax | Out-String) -replace "/home/mf/PowerShell/Scripts/", "") + $Syntax = (($Syntax | Out-String) -replace "/home/mf/Repos/PowerShell/Scripts/", "") if ($Syntax -ne "") { "$Syntax" } diff --git a/Docs/convert-sql2csv.md b/Docs/convert-sql2csv.md index 09a662b3..1c91ccd7 100644 --- a/Docs/convert-sql2csv.md +++ b/Docs/convert-sql2csv.md @@ -4,7 +4,7 @@ This PowerShell script converts a SQL database table to a .CSV file. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/convert-sql2csv.ps1 [[-server] ] [[-database] ] [[-username] ] [[-password] ] [[-query] ] [] +convert-sql2csv.ps1 [[-server] ] [[-database] ] [[-username] ] [[-password] ] [[-query] ] [] -server Specifies the server's hostname or IP address diff --git a/Docs/convert-txt2wav.md b/Docs/convert-txt2wav.md index 172583dd..d6e6856d 100644 --- a/Docs/convert-txt2wav.md +++ b/Docs/convert-txt2wav.md @@ -4,7 +4,7 @@ This PowerShell script converts text to a .WAV audio file. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/convert-txt2wav.ps1 [[-Text] ] [[-WavFile] ] [] +convert-txt2wav.ps1 [[-Text] ] [[-WavFile] ] [] -Text Specifies the text to use diff --git a/Docs/count-lines-of-code.md b/Docs/count-lines-of-code.md index c3cb0248..eb3d4e1c 100644 --- a/Docs/count-lines-of-code.md +++ b/Docs/count-lines-of-code.md @@ -4,7 +4,7 @@ This PowerShell script counts the number of code lines in a folder (including su ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/count-lines-of-code.ps1 [[-Folder] ] [] +count-lines-of-code.ps1 [[-Folder] ] [] -Folder Specifies the path to the folder diff --git a/Docs/decrypt-file.md b/Docs/decrypt-file.md index 320fe50e..06013c62 100644 --- a/Docs/decrypt-file.md +++ b/Docs/decrypt-file.md @@ -4,7 +4,7 @@ This PowerShell script decrypts a file using the given password and AES encrypti ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/decrypt-file.ps1 [[-Path] ] [[-Password] ] [] +decrypt-file.ps1 [[-Path] ] [[-Password] ] [] -Path Specifies the path to the file to decrypt diff --git a/Docs/disconnect-vpn.md b/Docs/disconnect-vpn.md index afb4bd40..7d4acdaa 100644 --- a/Docs/disconnect-vpn.md +++ b/Docs/disconnect-vpn.md @@ -4,7 +4,7 @@ This PowerShell script disconnects the active VPN connection. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/disconnect-vpn.ps1 [] +disconnect-vpn.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/download-dir.md b/Docs/download-dir.md index b0a1fcca..965b6f25 100644 --- a/Docs/download-dir.md +++ b/Docs/download-dir.md @@ -4,7 +4,7 @@ This PowerShell script downloads a folder (including subfolders) from the given ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/download-dir.ps1 [[-URL] ] [] +download-dir.ps1 [[-URL] ] [] -URL Specifies the URL where to download from diff --git a/Docs/download-file.md b/Docs/download-file.md index adde54a2..775de67d 100644 --- a/Docs/download-file.md +++ b/Docs/download-file.md @@ -4,7 +4,7 @@ This PowerShell script downloads a file from the given URL ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/download-file.ps1 [[-URL] ] [] +download-file.ps1 [[-URL] ] [] -URL Specifies the URL where to download from diff --git a/Docs/edit.md b/Docs/edit.md index 7dca27c4..2955df79 100644 --- a/Docs/edit.md +++ b/Docs/edit.md @@ -4,7 +4,7 @@ This PowerShell script opens a text editor to edit the given file. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/edit.ps1 [[-Filename] ] [] +edit.ps1 [[-Filename] ] [] -Filename Specifies the path to the filename diff --git a/Docs/enable-crash-dumps.md b/Docs/enable-crash-dumps.md index 838281a5..bf76a14d 100644 --- a/Docs/enable-crash-dumps.md +++ b/Docs/enable-crash-dumps.md @@ -4,7 +4,7 @@ This PowerShell script enables the writing of crash dumps. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/enable-crash-dumps.ps1 [] +enable-crash-dumps.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/enable-god-mode.md b/Docs/enable-god-mode.md index 0cc44fb8..0bf145d9 100644 --- a/Docs/enable-god-mode.md +++ b/Docs/enable-god-mode.md @@ -4,7 +4,7 @@ This PowerShell script enables the god mode. It adds a new icon to the desktop. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/enable-god-mode.ps1 [] +enable-god-mode.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/encrypt-file.md b/Docs/encrypt-file.md index 65d04e68..2e989cc1 100644 --- a/Docs/encrypt-file.md +++ b/Docs/encrypt-file.md @@ -4,7 +4,7 @@ This PowerShell script encrypts a file using the given password and AES encrypti ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/encrypt-file.ps1 [[-Path] ] [[-Password] ] [] +encrypt-file.ps1 [[-Path] ] [[-Password] ] [] -Path Specifies the path to the file to encrypt diff --git a/Docs/enter-chat.md b/Docs/enter-chat.md index 00987486..f580916d 100644 --- a/Docs/enter-chat.md +++ b/Docs/enter-chat.md @@ -4,7 +4,7 @@ This PowerShell script enters a chat using a common network shared file. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/enter-chat.ps1 [] +enter-chat.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/export-to-manuals.md b/Docs/export-to-manuals.md index 3f091c0a..9fee7da5 100644 --- a/Docs/export-to-manuals.md +++ b/Docs/export-to-manuals.md @@ -4,7 +4,7 @@ This PowerShell script exports the comment based help of all PowerShell scripts ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/export-to-manuals.ps1 [[-FilePattern] ] [[-TargetDir] ] [] +export-to-manuals.ps1 [[-FilePattern] ] [[-TargetDir] ] [] -FilePattern diff --git a/Docs/fetch-repo.md b/Docs/fetch-repo.md index 85f0b0f8..e3ac4d52 100644 --- a/Docs/fetch-repo.md +++ b/Docs/fetch-repo.md @@ -4,7 +4,7 @@ This PowerShell script fetches the latest updates into a local Git repository (i ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/fetch-repo.ps1 [[-RepoDir] ] [] +fetch-repo.ps1 [[-RepoDir] ] [] -RepoDir Specifies the file path to the local Git repository (default is working directory). diff --git a/Docs/fetch-repos.md b/Docs/fetch-repos.md index 20f3a88b..17cca687 100644 --- a/Docs/fetch-repos.md +++ b/Docs/fetch-repos.md @@ -4,7 +4,7 @@ This PowerShell script fetches updates for all Git repositories in a folder (inc ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/fetch-repos.ps1 [[-ParentDir] ] [] +fetch-repos.ps1 [[-ParentDir] ] [] -ParentDir Specifies the path to the parent folder diff --git a/Docs/get-md5.md b/Docs/get-md5.md index 5b4edb20..6839f4d4 100644 --- a/Docs/get-md5.md +++ b/Docs/get-md5.md @@ -4,7 +4,7 @@ This PowerShell script calculates and prints the MD5 checksum of the given file. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/get-md5.ps1 [[-file] ] [] +get-md5.ps1 [[-file] ] [] -file Specifies the path to the file diff --git a/Docs/get-sha1.md b/Docs/get-sha1.md index 27f6f770..75a3b320 100644 --- a/Docs/get-sha1.md +++ b/Docs/get-sha1.md @@ -4,7 +4,7 @@ This PowerShell script calculates and prints the SHA1 checksum of the given file ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/get-sha1.ps1 [[-file] ] [] +get-sha1.ps1 [[-file] ] [] -file Specifies the path to the file diff --git a/Docs/get-sha256.md b/Docs/get-sha256.md index 755fa0a2..e6d5433f 100644 --- a/Docs/get-sha256.md +++ b/Docs/get-sha256.md @@ -4,7 +4,7 @@ This PowerShell script calculates and prints the SHA256 checksum of the given fi ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/get-sha256.ps1 [[-file] ] [] +get-sha256.ps1 [[-file] ] [] -file Specifies the path to the file diff --git a/Docs/hibernate.md b/Docs/hibernate.md index a66b287c..3a79358c 100644 --- a/Docs/hibernate.md +++ b/Docs/hibernate.md @@ -1,10 +1,10 @@ ## The *hibernate.ps1* Script -This PowerShell script enables hibernate mode for the local computer immediately. +This PowerShell script hibernates the local computer immediately. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/hibernate.ps1 [] +hibernate.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, @@ -13,7 +13,8 @@ This PowerShell script enables hibernate mode for the local computer immediately ## Example ```powershell -PS> ./hibernate +PS> ./hibernate.ps1 +It's 5:04 PM, going to sleep now... πŸ˜΄πŸ’€ ``` @@ -29,9 +30,10 @@ https://github.com/fleschutz/PowerShell .SYNOPSIS Hibernates the computer .DESCRIPTION - This PowerShell script enables hibernate mode for the local computer immediately. + This PowerShell script hibernates the local computer immediately. .EXAMPLE - PS> ./hibernate + PS> ./hibernate.ps1 + It's 5:04 PM, going to sleep now... πŸ˜΄πŸ’€ .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -39,7 +41,10 @@ https://github.com/fleschutz/PowerShell #> try { - "Bye bye." + [system.threading.thread]::currentThread.currentCulture = [system.globalization.cultureInfo]"en-US" + $CurrentTime = $((Get-Date).ToShortTimeString()) + Write-Host "It's $CurrentTime, going to sleep now... πŸ˜΄πŸ’€p" + Start-Sleep -milliseconds 500 & rundll32.exe powrprof.dll,SetSuspendState 1,1,0 # bHibernate,bForce,bWakeupEventsDisabled exit 0 # success } catch { diff --git a/Docs/inspect-exe.md b/Docs/inspect-exe.md index ab91807e..36d64d58 100644 --- a/Docs/inspect-exe.md +++ b/Docs/inspect-exe.md @@ -4,7 +4,7 @@ This PowerShell script prints basic information of an executable file. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/inspect-exe.ps1 [[-PathToExe] ] [] +inspect-exe.ps1 [[-PathToExe] ] [] -PathToExe Specifies the path to the executable file diff --git a/Docs/install-audacity.md b/Docs/install-audacity.md index 4da5f04e..371eb18d 100644 --- a/Docs/install-audacity.md +++ b/Docs/install-audacity.md @@ -4,7 +4,7 @@ This PowerShell script installs Audacity. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-audacity.ps1 [] +install-audacity.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-basic-apps.md b/Docs/install-basic-apps.md index 568083e2..06b5755a 100644 --- a/Docs/install-basic-apps.md +++ b/Docs/install-basic-apps.md @@ -1,11 +1,11 @@ ## The *install-basic-apps.ps1* Script This PowerShell script installs basic Windows apps such as browser, e-mail client, etc. -Apps from Microsoft Store are preferred (due to security and automatic updates). +NOTE: Apps from Microsoft Store are preferred (due to security and automatic updates). ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-basic-apps.ps1 [] +install-basic-apps.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, @@ -15,6 +15,8 @@ Apps from Microsoft Store are preferred (due to security and automatic updates). ## Example ```powershell PS> ./install-basic-apps +⏳ (1/37) Loading Data/basic-apps.csv... 35 apps +⏳ (2/37) These apps will be installed or upgraded: 7-Zip Β· Aquile Reader ... ``` @@ -31,9 +33,11 @@ https://github.com/fleschutz/PowerShell Installs basic apps .DESCRIPTION This PowerShell script installs basic Windows apps such as browser, e-mail client, etc. - Apps from Microsoft Store are preferred (due to security and automatic updates). + NOTE: Apps from Microsoft Store are preferred (due to security and automatic updates). .EXAMPLE PS> ./install-basic-apps + ⏳ (1/37) Loading Data/basic-apps.csv... 35 apps + ⏳ (2/37) These apps will be installed or upgraded: 7-Zip Β· Aquile Reader ... .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -43,19 +47,18 @@ https://github.com/fleschutz/PowerShell try { $StopWatch = [system.diagnostics.stopwatch]::startNew() - Write-Host "⏳ (1/34) Loading Data/basic-apps.csv... " -noNewline + Write-Host "⏳ (1/37) Loading Data/basic-apps.csv... " -noNewline $Table = Import-CSV "$PSScriptRoot/../Data/basic-apps.csv" $NumEntries = $Table.count "$NumEntries apps" - "⏳ (2/34) About to install or upgrade:" - "" + Write-Host "⏳ (2/37) These apps will be installed or upgraded: " -noNewline foreach($Row in $Table) { [string]$AppName = $Row.APPLICATION - Write-Host " Β· $AppName" -NoNewline + Write-Host "$AppName Β· " -noNewline } "" "" - "Press to abort, otherwise the installation will start in 15 seconds..." + "Installation will start in 15 seconds... (otherwise press to abort)" Start-Sleep -seconds 15 [int]$Step = 3 @@ -72,7 +75,7 @@ try { } [int]$Installed = ($NumEntries - $Failed) [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds - "βœ”οΈ installed $Installed of $NumEntries applications in $Elapsed sec" + "βœ”οΈ installed $Installed of $NumEntries basic apps in $Elapsed sec" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Docs/install-basic-snaps.md b/Docs/install-basic-snaps.md index 66712726..82361fc4 100644 --- a/Docs/install-basic-snaps.md +++ b/Docs/install-basic-snaps.md @@ -4,7 +4,7 @@ This PowerShell script installs 18 basic Linux snaps. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-basic-snaps.ps1 [] +install-basic-snaps.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, @@ -42,7 +42,7 @@ try { $StopWatch = [system.diagnostics.stopwatch]::startNew() if (!$IsLinux) { throw "Only Linux currently support snaps" } - "⏳ Installing 18 basic snaps (sorted alphabetically)..." + "⏳ Installing 19 Snaps (sorted alphabetically)..." sudo snap install ant sudo snap install audacity sudo snap install bashtop @@ -54,6 +54,7 @@ try { sudo snap install firefox sudo snap install gimp sudo snap install go + sudo snap install gradle --classic sudo snap install groovy --classic sudo snap install hugo sudo snap install jenkins --edge --classic @@ -63,7 +64,7 @@ try { sudo snap install plexmediaserver [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds - "βœ”οΈ Basic Linux snaps installed in $Elapsed sec" + "βœ”οΈ installed 19 Snaps in $Elapsed sec" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Docs/install-calibre-server.md b/Docs/install-calibre-server.md index d906c5d3..7cf0354f 100644 --- a/Docs/install-calibre-server.md +++ b/Docs/install-calibre-server.md @@ -4,7 +4,7 @@ This PowerShell script installs and starts a local Calibre server as background ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-calibre-server.ps1 [[-Port] ] [[-UserDB] ] [[-Logfile] ] [] +install-calibre-server.ps1 [[-Port] ] [[-UserDB] ] [[-Logfile] ] [] -Port Specifies the Web port number (8099 by default) diff --git a/Docs/install-chocolatey.md b/Docs/install-chocolatey.md index 1cef096f..0769ded0 100644 --- a/Docs/install-chocolatey.md +++ b/Docs/install-chocolatey.md @@ -4,7 +4,7 @@ This PowerShell script installs Chocolatey onto the local computer (needs admin ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-chocolatey.ps1 [] +install-chocolatey.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-chrome-browser.md b/Docs/install-chrome-browser.md index 581ade7c..30311883 100644 --- a/Docs/install-chrome-browser.md +++ b/Docs/install-chrome-browser.md @@ -4,7 +4,7 @@ This PowerShell script installs the latest Google Chrome Web browser. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-chrome-browser.ps1 [] +install-chrome-browser.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-chrome.md b/Docs/install-chrome.md index 475e399f..e1a658d7 100644 --- a/Docs/install-chrome.md +++ b/Docs/install-chrome.md @@ -4,7 +4,7 @@ This PowerShell script installs the Google Chrome browser. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-chrome.ps1 [] +install-chrome.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-crystal-disk-info.md b/Docs/install-crystal-disk-info.md index 4c56084c..58a37af5 100644 --- a/Docs/install-crystal-disk-info.md +++ b/Docs/install-crystal-disk-info.md @@ -4,7 +4,7 @@ This PowerShell script installs CrystalDiskInfo from the Microsoft Store. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-crystal-disk-info.ps1 [] +install-crystal-disk-info.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-crystal-disk-mark.md b/Docs/install-crystal-disk-mark.md index b4b9c966..7c3ff75c 100644 --- a/Docs/install-crystal-disk-mark.md +++ b/Docs/install-crystal-disk-mark.md @@ -4,7 +4,7 @@ This PowerShell script installs CrystalDiskMark from the Microsoft Store. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-crystal-disk-mark.ps1 [] +install-crystal-disk-mark.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-discord.md b/Docs/install-discord.md index af7563e9..e9d6f45e 100644 --- a/Docs/install-discord.md +++ b/Docs/install-discord.md @@ -4,7 +4,7 @@ This PowerShell script installs Discord from the Microsoft Store. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-discord.ps1 [] +install-discord.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-edge.md b/Docs/install-edge.md index 645808e4..393c1fb8 100644 --- a/Docs/install-edge.md +++ b/Docs/install-edge.md @@ -4,7 +4,7 @@ This PowerShell script installs the Microsoft Edge Browser from the Microsoft St ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-edge.ps1 [] +install-edge.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-evcc.md b/Docs/install-evcc.md index a6ea82ba..ce0e8043 100644 --- a/Docs/install-evcc.md +++ b/Docs/install-evcc.md @@ -4,7 +4,7 @@ This PowerShell script installs evcc. Sevcc is an extensible EV Charge Controlle ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-evcc.ps1 [] +install-evcc.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-firefox.md b/Docs/install-firefox.md index 58b70f7f..c26a4114 100644 --- a/Docs/install-firefox.md +++ b/Docs/install-firefox.md @@ -4,7 +4,7 @@ This PowerShell script installs Mozilla Firefox from the Microsoft Store. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-firefox.ps1 [] +install-firefox.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-git-extensions.md b/Docs/install-git-extensions.md index 04f8a8ad..fe5a336b 100644 --- a/Docs/install-git-extensions.md +++ b/Docs/install-git-extensions.md @@ -4,7 +4,7 @@ This PowerShell script installs Git Extensions. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-git-extensions.ps1 [] +install-git-extensions.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-git-for-windows.md b/Docs/install-git-for-windows.md index d815cf94..a94b75e3 100644 --- a/Docs/install-git-for-windows.md +++ b/Docs/install-git-for-windows.md @@ -4,7 +4,7 @@ This PowerShell script installs Git for Windows. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-git-for-windows.ps1 [] +install-git-for-windows.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-github-cli.md b/Docs/install-github-cli.md index 35e1804f..558a8d25 100644 --- a/Docs/install-github-cli.md +++ b/Docs/install-github-cli.md @@ -4,7 +4,7 @@ This PowerShell script installs GitHub command-line interface (CLI). ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-github-cli.ps1 [] +install-github-cli.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-irfanview.md b/Docs/install-irfanview.md index fdc94bae..8840bf78 100644 --- a/Docs/install-irfanview.md +++ b/Docs/install-irfanview.md @@ -4,7 +4,7 @@ This PowerShell script installs IrfanView from the Microsoft Store. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-irfanview.ps1 [] +install-irfanview.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-knot-resolver.md b/Docs/install-knot-resolver.md index 5dd370fb..031337a5 100644 --- a/Docs/install-knot-resolver.md +++ b/Docs/install-knot-resolver.md @@ -4,7 +4,7 @@ This PowerShell script installs Knot Resolver. Knot Resolver is a DNS resolver d ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-knot-resolver.ps1 [] +install-knot-resolver.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-microsoft-teams.md b/Docs/install-microsoft-teams.md index 737e7942..ea9609d8 100644 --- a/Docs/install-microsoft-teams.md +++ b/Docs/install-microsoft-teams.md @@ -4,7 +4,7 @@ This PowerShell script installs Microsoft Teams from the Microsoft Store. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-microsoft-teams.ps1 [] +install-microsoft-teams.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-netflix.md b/Docs/install-netflix.md index a85433f3..0ef360c9 100644 --- a/Docs/install-netflix.md +++ b/Docs/install-netflix.md @@ -4,7 +4,7 @@ This PowerShell script installs Netflix from the Microsoft Store. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-netflix.ps1 [] +install-netflix.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-nine-zip.md b/Docs/install-nine-zip.md index 490444db..b5e730db 100644 --- a/Docs/install-nine-zip.md +++ b/Docs/install-nine-zip.md @@ -4,7 +4,7 @@ This PowerShell script installs 9 ZIP from the Microsoft Store. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-nine-zip.ps1 [] +install-nine-zip.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-obs-studio.md b/Docs/install-obs-studio.md index 41b7f533..5f7f0ab4 100644 --- a/Docs/install-obs-studio.md +++ b/Docs/install-obs-studio.md @@ -4,7 +4,7 @@ This PowerShell script installs OBS Studio (admin rights are needed). ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-obs-studio.ps1 [] +install-obs-studio.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-one-calendar.md b/Docs/install-one-calendar.md index 33b826a5..51516f13 100644 --- a/Docs/install-one-calendar.md +++ b/Docs/install-one-calendar.md @@ -4,7 +4,7 @@ This PowerShell script installs One Calendar from the Microsoft Store. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-one-calendar.ps1 [] +install-one-calendar.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-opera-browser.md b/Docs/install-opera-browser.md index fbc6a232..665778b2 100644 --- a/Docs/install-opera-browser.md +++ b/Docs/install-opera-browser.md @@ -4,7 +4,7 @@ This PowerShell script installs Opera Browser from Microsoft Store. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-opera-browser.ps1 [] +install-opera-browser.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-opera-gx.md b/Docs/install-opera-gx.md index 54d0a8ed..0ef74a58 100644 --- a/Docs/install-opera-gx.md +++ b/Docs/install-opera-gx.md @@ -4,7 +4,7 @@ This PowerShell script installs Opera GX from Microsoft Store. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-opera-gx.ps1 [] +install-opera-gx.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-paint-3d.md b/Docs/install-paint-3d.md index b4ec4fd4..445968fb 100644 --- a/Docs/install-paint-3d.md +++ b/Docs/install-paint-3d.md @@ -4,7 +4,7 @@ This PowerShell script installs Paint 3D from the Microsoft Store. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-paint-3d.ps1 [] +install-paint-3d.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-power-toys.md b/Docs/install-power-toys.md index e283e76b..3c25dfaa 100644 --- a/Docs/install-power-toys.md +++ b/Docs/install-power-toys.md @@ -4,7 +4,7 @@ This PowerShell script installs the Microsoft Powertoys. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-power-toys.ps1 [] +install-power-toys.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-powershell.md b/Docs/install-powershell.md index ca48e144..f391772e 100644 --- a/Docs/install-powershell.md +++ b/Docs/install-powershell.md @@ -5,9 +5,9 @@ If '-Daily' is specified, then the latest PowerShell daily package will be insta ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-powershell.ps1 [-Destination ] [-Daily] [-DoNotOverwrite] [-AddToPath] [-Preview] [] +install-powershell.ps1 [-Destination ] [-Daily] [-DoNotOverwrite] [-AddToPath] [-Preview] [] -/home/mf/Repos/PowerShell/Scripts/install-powershell.ps1 [-UseMSI] [-Quiet] [-AddExplorerContextMenu] [-EnablePSRemoting] [-Preview] [] +install-powershell.ps1 [-UseMSI] [-Quiet] [-AddExplorerContextMenu] [-EnablePSRemoting] [-Preview] [] -Destination The destination path to install PowerShell to. @@ -185,7 +185,7 @@ if (-not $Destination) { $Destination = $PSCmdlet.SessionState.Path.GetUnresolvedProviderPathFromPSPath($Destination) if (-not $UseMSI) { - Write-Verbose "Destination: $Destination" -Verbose + Write-Host "Installation destination path: $Destination" } else { if (-not $IsWinEnv) { throw "-UseMSI is only supported on Windows" @@ -492,7 +492,7 @@ try { } $downloadURL = "https://github.com/PowerShell/PowerShell/releases/download/v${release}/${packageName}" - Write-Host "Downloading from: $downloadURL" + Write-Host "Downloading: $downloadURL" $packagePath = Join-Path -Path $tempDir -ChildPath $packageName if (!$PSVersionTable.ContainsKey('PSEdition') -or $PSVersionTable.PSEdition -eq "Desktop") { diff --git a/Docs/install-rufus.md b/Docs/install-rufus.md index 9cfc4423..eaa1872a 100644 --- a/Docs/install-rufus.md +++ b/Docs/install-rufus.md @@ -4,7 +4,7 @@ This PowerShell script installs Rufus from the Microsoft Store. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-rufus.ps1 [] +install-rufus.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-signal-cli.md b/Docs/install-signal-cli.md index fb048ade..8f7d16b5 100644 --- a/Docs/install-signal-cli.md +++ b/Docs/install-signal-cli.md @@ -5,7 +5,7 @@ See the Web page for the correct version number. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-signal-cli.ps1 [[-Version] ] [] +install-signal-cli.ps1 [[-Version] ] [] -Version Specifies the version to install diff --git a/Docs/install-skype.md b/Docs/install-skype.md index 4726ef02..271a0f20 100644 --- a/Docs/install-skype.md +++ b/Docs/install-skype.md @@ -4,7 +4,7 @@ This PowerShell script installs Skype from the Microsoft Store. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-skype.ps1 [] +install-skype.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-spotify.md b/Docs/install-spotify.md index 27b454e9..6fb1c7ab 100644 --- a/Docs/install-spotify.md +++ b/Docs/install-spotify.md @@ -4,7 +4,7 @@ This PowerShell script installs Spotify from the Microsoft Store. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-spotify.ps1 [] +install-spotify.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-ssh-client.md b/Docs/install-ssh-client.md index 46cfce9b..9c4be2ee 100644 --- a/Docs/install-ssh-client.md +++ b/Docs/install-ssh-client.md @@ -4,7 +4,7 @@ This PowerShell script installs a SSH client (needs admin rights). ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-ssh-client.ps1 [] +install-ssh-client.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-ssh-server.md b/Docs/install-ssh-server.md index 99985135..1ae21ac8 100644 --- a/Docs/install-ssh-server.md +++ b/Docs/install-ssh-server.md @@ -4,7 +4,7 @@ This PowerShell script installs a SSH server (needs admin rights). ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-ssh-server.ps1 [] +install-ssh-server.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-thunderbird.md b/Docs/install-thunderbird.md index 9bf264e6..0e15cd4c 100644 --- a/Docs/install-thunderbird.md +++ b/Docs/install-thunderbird.md @@ -4,7 +4,7 @@ This PowerShell script installs Mozilla Thunderbird. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-thunderbird.ps1 [] +install-thunderbird.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-twitter.md b/Docs/install-twitter.md index ed77c708..942a3579 100644 --- a/Docs/install-twitter.md +++ b/Docs/install-twitter.md @@ -4,7 +4,7 @@ This PowerShell script installs Twitter from the Microsoft Store. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-twitter.ps1 [] +install-twitter.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-unbound-server.md b/Docs/install-unbound-server.md index cdd79335..cfa5413b 100644 --- a/Docs/install-unbound-server.md +++ b/Docs/install-unbound-server.md @@ -4,7 +4,7 @@ This PowerShell script installs Unbound, a validating, recursive, caching DNS re ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-unbound-server.ps1 [] +install-unbound-server.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-updates.md b/Docs/install-updates.md index 908b4531..57ced37f 100644 --- a/Docs/install-updates.md +++ b/Docs/install-updates.md @@ -1,11 +1,11 @@ ## The *install-updates.ps1* Script -This PowerShell script installs updates for the local machine (needs admin rights). -Use "list-updates.ps1" to list available updates. +This PowerShell script installs software updates for the local machine (needs admin rights). +Use the script 'list-updates.ps1' to list available updates. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-updates.ps1 [] +install-updates.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, @@ -28,10 +28,10 @@ https://github.com/fleschutz/PowerShell ```powershell <# .SYNOPSIS - Installs software updates + Installs updates .DESCRIPTION - This PowerShell script installs updates for the local machine (needs admin rights). - Use "list-updates.ps1" to list available updates. + This PowerShell script installs software updates for the local machine (needs admin rights). + Use the script 'list-updates.ps1' to list available updates. .EXAMPLE PS> ./install-updates .LINK @@ -62,7 +62,7 @@ try { Write-Progress -completed " " } [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds - "βœ… updates installed in $Elapsed sec" + "βœ… installed the updates in $Elapsed sec" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Docs/install-visual-studio-code.md b/Docs/install-visual-studio-code.md index 06654dec..52c128c3 100644 --- a/Docs/install-visual-studio-code.md +++ b/Docs/install-visual-studio-code.md @@ -4,7 +4,7 @@ This PowerShell script installs Visual Studio Code. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-visual-studio-code.ps1 [] +install-visual-studio-code.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-vivaldi.md b/Docs/install-vivaldi.md index ceccf063..23dac137 100644 --- a/Docs/install-vivaldi.md +++ b/Docs/install-vivaldi.md @@ -4,7 +4,7 @@ This PowerShell script installs the Vivaldi browser. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-vivaldi.ps1 [] +install-vivaldi.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-vlc.md b/Docs/install-vlc.md index fc386aca..c657dd89 100644 --- a/Docs/install-vlc.md +++ b/Docs/install-vlc.md @@ -4,7 +4,7 @@ This PowerShell script installs the VLC media player. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-vlc.ps1 [] +install-vlc.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-windows-terminal.md b/Docs/install-windows-terminal.md index fef326df..b7dbac83 100644 --- a/Docs/install-windows-terminal.md +++ b/Docs/install-windows-terminal.md @@ -4,7 +4,7 @@ This PowerShell script installs Windows Terminal from the Microsoft Store. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-windows-terminal.ps1 [] +install-windows-terminal.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-wsl.md b/Docs/install-wsl.md index d62a4feb..701462c6 100644 --- a/Docs/install-wsl.md +++ b/Docs/install-wsl.md @@ -4,7 +4,7 @@ This PowerShell script installs Windows Subsystem for Linux. It needs admin righ ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-wsl.ps1 [] +install-wsl.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/install-zoom.md b/Docs/install-zoom.md index e0865b0d..c304c0a7 100644 --- a/Docs/install-zoom.md +++ b/Docs/install-zoom.md @@ -4,7 +4,7 @@ This PowerShell script installs Zoom. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/install-zoom.ps1 [] +install-zoom.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/introduce-powershell.md b/Docs/introduce-powershell.md index f0ac057e..c9c91e7a 100644 --- a/Docs/introduce-powershell.md +++ b/Docs/introduce-powershell.md @@ -4,7 +4,7 @@ This PowerShell script introduces PowerShell to new users. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/introduce-powershell.ps1 [] +introduce-powershell.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-aliases.md b/Docs/list-aliases.md index d49ced3b..adf07d38 100644 --- a/Docs/list-aliases.md +++ b/Docs/list-aliases.md @@ -4,7 +4,7 @@ This PowerShell scripts lists all PowerShell aliases. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-aliases.ps1 [] +list-aliases.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-anagrams.md b/Docs/list-anagrams.md index b5894677..601dfedb 100644 --- a/Docs/list-anagrams.md +++ b/Docs/list-anagrams.md @@ -4,7 +4,7 @@ This PowerShell script lists all anagrams of the given word. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-anagrams.ps1 [[-Word] ] [[-Columns] ] [] +list-anagrams.ps1 [[-Word] ] [[-Columns] ] [] -Word Specifies the word to use diff --git a/Docs/list-apps.md b/Docs/list-apps.md index e68018b4..ce900fc3 100644 --- a/Docs/list-apps.md +++ b/Docs/list-apps.md @@ -4,7 +4,7 @@ This PowerShell script lists the installed applications (from Windows Store, or ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-apps.ps1 [] +list-apps.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-ascii-table.md b/Docs/list-ascii-table.md new file mode 100644 index 00000000..27cf428e --- /dev/null +++ b/Docs/list-ascii-table.md @@ -0,0 +1,103 @@ +## The *list-ascii-table.ps1* Script + +This PowerShell script lists the ASCII table on the console. + +## Parameters +```powershell +list-ascii-table.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +## Example +```powershell +PS> ./list-ascii-table.ps1 + + + +ASCII TABLE +Dec Oct Hex HTML Symbol Description +--- --- --- ---- ------ ----------- +0 000 00 � NUL Null character +... + +``` + +## Notes +Author: Markus Fleschutz | License: CC0 + +## Related Links +https://github.com/fleschutz/PowerShell + +## Source Code +```powershell +<# +.SYNOPSIS + Lists the ASCII table +.DESCRIPTION + This PowerShell script lists the ASCII table on the console. +.EXAMPLE + PS> ./list-ascii-table.ps1 + + ASCII TABLE + Dec Oct Hex HTML Symbol Description + --- --- --- ---- ------ ----------- + 0 000 00 � NUL Null character + ... +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +"" +Write-Host "ASCII TABLE" -foregroundColor green +"" +"Dec Oct Hex Binary HTML Symbol Description" +"--- --- --- ------ ---- ------ -----------" +" 0 000 00 00000000 � NUL Null character" +" 1 001 01 00000001  SOH Start of Header" +" 2 002 02 00000010  STX Start of Text" +" 3 003 03 00000011  ETX End of Text" +" 4 004 04 00000100  EOT End of Transmission" +" 5 005 05 00000101  ENQ Enquiry" +" 6 006 06 00000110  ACK Acknowledge" +" 7 007 07 00000111  BEL Bell" +" 8 010 08 00001000  BS Backspace" +" 9 011 09 00001001 HT Horizontal Tab" +" 10 012 0A 00001010 LF Line Feed" +" 11 013 0B 00001011 VT Vertical Tab" +" 12 014 0C 00001100 FF Form Feed" +" 13 015 0D 00001101 CR Carriage Return" +" 14 016 0E 00001110  SO Shift Out" +" 15 017 0F 00001111  SI Shift In" +" 16 020 10 00010000  DLE Data Link Escape" +" 17 021 11 00010001  DC1 Device Control 1 (XON)" +" 18 022 12 00010010  DC2 Device Control 2" +" 19 023 13 00010011  DC3 Device Control 3 (XOFF)" +" 20 024 14 00010100  DC4 Device Control 4" +" 21 025 15 00010101  NAK Negative Acknowledge" +" 22 026 16 00010110  SYN Synchronize" +" 23 027 17 00010111  ETB End of Transmission Block" +" 24 030 18 00011000  CAN Cancel" +" 25 031 19 00011001  EM End of Medium" +" 26 032 1A 00011010  SUB Substitute" +" 27 033 1B 00011011  ESC Escape" +" 28 034 1C 00011100  FS File Separator" +" 29 035 1D 00011101  GS Group Separator" +" 30 036 1E 00011110  RS Record Separator" +" 31 037 1F 00011111  US Unit Separator" +" 32 040 20 00100000 space Space" +" 33 041 21 00100001 ! ! Exclamation mark" +" 34 042 22 00100010 " `" Double quote" +" 35 043 23 00100011 # # Number" +" 36 044 24 00100100 $ $ Dollar sign" +" 37 045 25 00100101 % % Percent" +" 38 046 26 00100110 & & Ampersand" +" 39 047 27 00100111 ' ' Single quote" +exit 0 # success +``` + +*Generated by convert-ps2md.ps1 using the comment-based help of list-ascii-table.ps1* diff --git a/Docs/list-battery-status.md b/Docs/list-battery-status.md index 26dd3764..f3944c54 100644 --- a/Docs/list-battery-status.md +++ b/Docs/list-battery-status.md @@ -4,7 +4,7 @@ This PowerShell script lists the battery status. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-battery-status.ps1 [] +list-battery-status.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-bios.md b/Docs/list-bios.md index de8f7730..1c43f427 100644 --- a/Docs/list-bios.md +++ b/Docs/list-bios.md @@ -4,7 +4,7 @@ This PowerShell script lists the BIOS details. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-bios.ps1 [] +list-bios.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-bluetooth-devices.md b/Docs/list-bluetooth-devices.md index 43726426..34c2cdc6 100644 --- a/Docs/list-bluetooth-devices.md +++ b/Docs/list-bluetooth-devices.md @@ -4,7 +4,7 @@ This PowerShell script lists all Bluetooth devices connected to the computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-bluetooth-devices.ps1 [] +list-bluetooth-devices.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-branches.md b/Docs/list-branches.md index 015c9d1b..24d1fe15 100644 --- a/Docs/list-branches.md +++ b/Docs/list-branches.md @@ -4,7 +4,7 @@ This PowerShell script lists all branches in a Git repository. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-branches.ps1 [[-RepoDir] ] [[-SearchPattern] ] [] +list-branches.ps1 [[-RepoDir] ] [[-SearchPattern] ] [] -RepoDir Specifies the path to the Git repository (current working directory by default) diff --git a/Docs/list-calendar.md b/Docs/list-calendar.md index e1d30eac..b915ef48 100644 --- a/Docs/list-calendar.md +++ b/Docs/list-calendar.md @@ -4,7 +4,7 @@ Lists calendar elements, either a single month or an entire year. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-calendar.ps1 [[-Month] ] [[-Year] ] [] +list-calendar.ps1 [[-Month] ] [[-Year] ] [] -Month If specified, will limit output to a single month with this numeral value. diff --git a/Docs/list-cheat-sheet.md b/Docs/list-cheat-sheet.md index 6459539d..cae57288 100644 --- a/Docs/list-cheat-sheet.md +++ b/Docs/list-cheat-sheet.md @@ -4,7 +4,7 @@ This PowerShell script lists the PowerShell cheat sheet. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-cheat-sheet.ps1 [] +list-cheat-sheet.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-city-weather.md b/Docs/list-city-weather.md index 8fbea71c..3908d8cc 100644 --- a/Docs/list-city-weather.md +++ b/Docs/list-city-weather.md @@ -4,7 +4,7 @@ This PowerShell script lists the current weather of cities world-wide (west to e ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-city-weather.ps1 [] +list-city-weather.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-cli-tools.md b/Docs/list-cli-tools.md index b45dcf07..cdc3c0d3 100644 --- a/Docs/list-cli-tools.md +++ b/Docs/list-cli-tools.md @@ -32,9 +32,9 @@ list-cli-tools.ps1 Author: Markus Fleschutz | License: CC0 #> -function ListTool { param([string]$Cmd, [string]$VersionArg) +function ListTool { param([string]$Name, [string]$VersionArg) try { - $Info = Get-Command $Cmd -ErrorAction Stop + $Info = Get-Command $Name -ErrorAction Stop $Path = $Info.Source if ("$($Info.Version)" -eq "0.0.0.0") { if ("$VersionArg" -ne "") { @@ -53,11 +53,11 @@ function ListTool { param([string]$Cmd, [string]$VersionArg) $Version = $Info.Version } if (Test-Path "$Path" -pathType leaf) { - $FileSize = (Get-Item "$Path").Length + $Size = (Get-Item "$Path").Length } else { - $FileSize = "0" + $Size = 0 } - New-Object PSObject -Property @{ Tool=$Cmd; Version=$Version; Path=$Path; FileSize=$FileSize } + New-Object PSObject -Property @{ Tool=$Name; Version=$Version; Path=$Path; FileSize=$Size } } catch { return } @@ -138,6 +138,7 @@ function ListTools { ListTool dism "" ListTool dmidecode "--version" ListTool dos2unix "--version" + ListTool dotnet "--info" ListTool driverquery "" ListTool du "--version" ListTool echo "--version" @@ -177,6 +178,7 @@ function ListTools { ListTool gpg-error "--version" ListTool gpgsplit "--version" ListTool gpgtar "--version" + ListTool gradle "--version" ListTool grep "--version" ListTool groups "--version" ListTool gzip "--version" @@ -277,17 +279,18 @@ function ListTools { ListTool tee "--version" ListTool time "" ListTool timeout "" - ListTool top "-v" + ListTool top "--version" ListTool tskill "" ListTool typeperf "" ListTool tzsync "--version" + ListTool unbound "-V" ListTool uniq "--version" ListTool vi "--version" ListTool vim "--version" ListTool vulkaninfo "--version" ListTool w32tm "/?" ListTool waitfor "--version" - ListTool wakeonlan "" + ListTool wakeonlan "-v" ListTool wget "--version" ListTool where "--version" ListTool whatis "--version" diff --git a/Docs/list-clipboard.md b/Docs/list-clipboard.md index 563dafd9..c3b669af 100644 --- a/Docs/list-clipboard.md +++ b/Docs/list-clipboard.md @@ -4,7 +4,7 @@ This PowerShell script lists the contents of the clipboard. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-clipboard.ps1 [] +list-clipboard.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-cmdlets.md b/Docs/list-cmdlets.md index 461404fa..86e904d4 100644 --- a/Docs/list-cmdlets.md +++ b/Docs/list-cmdlets.md @@ -4,7 +4,7 @@ This PowerShell script lists all PowerShell cmdlets. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-cmdlets.ps1 [] +list-cmdlets.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-coffee-prices.md b/Docs/list-coffee-prices.md index cc1ba641..8d8276a6 100644 --- a/Docs/list-coffee-prices.md +++ b/Docs/list-coffee-prices.md @@ -27,24 +27,23 @@ list-coffee-prices.ps1 Author: Markus Fleschutz | License: CC0 #> -function WriteBar { param([string]$Text, [float]$Value, [float]$Max) - Write-Host "$Text " -noNewline +function WriteHorizontalBar { param([float]$Value, [float]$Max) $Num = ($Value * 100.0) / $Max while ($Num -ge 1.0) { Write-Host "β–ˆ" -noNewline; $Num -= 1.0 } if ($Num -ge 0.875) { - Write-Host -noNewLine "β–‰" + Write-Host "β–‰" -noNewline } elseif ($Num -ge 0.75) { - Write-Host -noNewLine "β–Š" + Write-Host "β–Š" -noNewline } elseif ($Num -ge 0.625) { - Write-Host -noNewLine "β–‹" + Write-Host "β–‹" -noNewline } elseif ($Num -ge 0.5) { - Write-Host -noNewLine "β–Œ" + Write-Host "β–Œ" -noNewline } elseif ($Num -ge 0.375) { - Write-Host -noNewLine "▍" + Write-Host "▍" -noNewline } elseif ($Num -ge 0.25) { - Write-Host -noNewLine "β–Ž" + Write-Host "β–Ž" -noNewline } elseif ($Num -ge 0.125) { - Write-Host -noNewLine "▏" + Write-Host "▏" -noNewline } Write-Host " $Value" } @@ -56,9 +55,9 @@ try { "---------------------------------------------------------------" foreach($item in $prices.data) { if ($Item.value -eq ".") { continue } - [string]$date = $item.date + Write-Host "$($item.date) " -noNewline [int]$value = $Item.value - WriteBar $date $value 300.0 + WriteHorizontalBar $value 350.0 } exit 0 # success } catch { diff --git a/Docs/list-commit-statistics.md b/Docs/list-commit-statistics.md index add301cf..06b66127 100644 --- a/Docs/list-commit-statistics.md +++ b/Docs/list-commit-statistics.md @@ -4,7 +4,7 @@ This PowerShell script lists the commit statistics of a Git repository. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-commit-statistics.ps1 [[-RepoDir] ] [] +list-commit-statistics.ps1 [[-RepoDir] ] [] -RepoDir Specifies the path to the Git repository. diff --git a/Docs/list-commits.md b/Docs/list-commits.md index 54e8a91f..b97f8d74 100644 --- a/Docs/list-commits.md +++ b/Docs/list-commits.md @@ -4,7 +4,7 @@ This PowerShell script lists all commits in a Git repository. Supported output f ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-commits.ps1 [[-RepoDir] ] [[-Format] ] [] +list-commits.ps1 [[-RepoDir] ] [[-Format] ] [] -RepoDir Specifies the path to the Git repository. diff --git a/Docs/list-console-colors.md b/Docs/list-console-colors.md index 689119cd..6f45b952 100644 --- a/Docs/list-console-colors.md +++ b/Docs/list-console-colors.md @@ -4,7 +4,7 @@ This PowerShell script lists all available console colors. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-console-colors.ps1 [] +list-console-colors.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-cpu.md b/Docs/list-cpu.md index 98d91c9a..b4745cf4 100644 --- a/Docs/list-cpu.md +++ b/Docs/list-cpu.md @@ -4,7 +4,7 @@ This PowerShell script lists the CPU details. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-cpu.ps1 [] +list-cpu.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-credits.md b/Docs/list-credits.md index 6d9c8104..63f681e4 100644 --- a/Docs/list-credits.md +++ b/Docs/list-credits.md @@ -4,7 +4,7 @@ This PowerShell script shows the credits for the PowerShell Scripts. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-credits.ps1 [] +list-credits.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-dir-tree.md b/Docs/list-dir-tree.md index 3bd8d4b5..e9bb31ce 100644 --- a/Docs/list-dir-tree.md +++ b/Docs/list-dir-tree.md @@ -4,7 +4,7 @@ This PowerShell script lists all files and folders in a directory tree. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-dir-tree.ps1 [[-DirTree] ] [] +list-dir-tree.ps1 [[-DirTree] ] [] -DirTree Specifies the path to the directory tree diff --git a/Docs/list-drives.md b/Docs/list-drives.md index 50f1ddde..177a697f 100644 --- a/Docs/list-drives.md +++ b/Docs/list-drives.md @@ -4,7 +4,7 @@ This PowerShell script lists all local drives as a table. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-drives.ps1 [] +list-drives.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-earthquakes.md b/Docs/list-earthquakes.md index 90c4f9bb..5730635b 100644 --- a/Docs/list-earthquakes.md +++ b/Docs/list-earthquakes.md @@ -4,7 +4,7 @@ This PowerShell script lists major earthquakes with magnitude >= 6.0 for the las ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-earthquakes.ps1 [] +list-earthquakes.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-emojis.md b/Docs/list-emojis.md index 1e345d9e..fdc7e0af 100644 --- a/Docs/list-emojis.md +++ b/Docs/list-emojis.md @@ -4,7 +4,7 @@ This PowerShell script lists the emojis of Unicode 13.0 sorted by category. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-emojis.ps1 [] +list-emojis.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-empty-dirs.md b/Docs/list-empty-dirs.md index 37f13940..4074f2d6 100644 --- a/Docs/list-empty-dirs.md +++ b/Docs/list-empty-dirs.md @@ -4,7 +4,7 @@ This PowerShell script scans and lists all empty subfolders within the given dir ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-empty-dirs.ps1 [[-DirTree] ] [] +list-empty-dirs.ps1 [[-DirTree] ] [] -DirTree Specifies the path to the directory tree (current working directory by default) diff --git a/Docs/list-empty-files.md b/Docs/list-empty-files.md index 28bca9df..d2fdfe35 100644 --- a/Docs/list-empty-files.md +++ b/Docs/list-empty-files.md @@ -4,7 +4,7 @@ This PowerShell script scans and lists all empty files within the given director ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-empty-files.ps1 [[-DirTree] ] [] +list-empty-files.ps1 [[-DirTree] ] [] -DirTree Specifies the path to the directory tree diff --git a/Docs/list-environment-variables.md b/Docs/list-environment-variables.md index bd78ccf0..d6976197 100644 --- a/Docs/list-environment-variables.md +++ b/Docs/list-environment-variables.md @@ -4,7 +4,7 @@ This PowerShell script lists all environment variables. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-environment-variables.ps1 [] +list-environment-variables.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-exchange-rates.md b/Docs/list-exchange-rates.md index 33cf3ddd..57e4d0d1 100644 --- a/Docs/list-exchange-rates.md +++ b/Docs/list-exchange-rates.md @@ -4,7 +4,7 @@ This PowerShell script lists the current exchange rates for the given currency ( ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-exchange-rates.ps1 [[-currency] ] [] +list-exchange-rates.ps1 [[-currency] ] [] -currency Specifies the base currency diff --git a/Docs/list-files.md b/Docs/list-files.md index 44cb2c73..f7e9e3c6 100644 --- a/Docs/list-files.md +++ b/Docs/list-files.md @@ -4,7 +4,7 @@ This PowerShell script lists all files within the given directory tree. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-files.ps1 [[-DirTree] ] [] +list-files.ps1 [[-DirTree] ] [] -DirTree Specifies the path to the directory tree diff --git a/Docs/list-folder.md b/Docs/list-folder.md index 7a0e48f4..1d35e5d2 100644 --- a/Docs/list-folder.md +++ b/Docs/list-folder.md @@ -4,7 +4,7 @@ This PowerShell script lists the content of a directory (alphabetically formatte ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-folder.ps1 [[-searchPattern] ] [] +list-folder.ps1 [[-searchPattern] ] [] -searchPattern Specifies the search pattern ("*" by default which means anything) diff --git a/Docs/list-fritzbox-calls.md b/Docs/list-fritzbox-calls.md index 3ec09775..f36ece15 100644 --- a/Docs/list-fritzbox-calls.md +++ b/Docs/list-fritzbox-calls.md @@ -4,7 +4,7 @@ This PowerShell script lists the phone calls of the FRITZ!Box device. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-fritzbox-calls.ps1 [[-Username] ] [[-Password] ] [] +list-fritzbox-calls.ps1 [[-Username] ] [[-Password] ] [] -Username Specifies the user name for FRITZ!Box diff --git a/Docs/list-fritzbox-devices.md b/Docs/list-fritzbox-devices.md index b099e436..e4c3412a 100644 --- a/Docs/list-fritzbox-devices.md +++ b/Docs/list-fritzbox-devices.md @@ -4,7 +4,7 @@ This PowerShell script lists FRITZ!Box's known devices. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-fritzbox-devices.ps1 [[-Username] ] [[-Password] ] [] +list-fritzbox-devices.ps1 [[-Username] ] [[-Password] ] [] -Username Specifies the user name to FRITZ!Box diff --git a/Docs/list-headlines.md b/Docs/list-headlines.md index 047bd659..532cd8f1 100644 --- a/Docs/list-headlines.md +++ b/Docs/list-headlines.md @@ -4,7 +4,7 @@ This PowerShell script lists the latest RSS feed news. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-headlines.ps1 [[-RSS_URL] ] [[-MaxCount] ] [] +list-headlines.ps1 [[-RSS_URL] ] [[-MaxCount] ] [] -RSS_URL Specifies the URL to the RSS feed diff --git a/Docs/list-hidden-files.md b/Docs/list-hidden-files.md index 5e5a7719..916321c4 100644 --- a/Docs/list-hidden-files.md +++ b/Docs/list-hidden-files.md @@ -4,7 +4,7 @@ This PowerShell script scans and lists all hidden files in a directory tree. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-hidden-files.ps1 [[-DirTree] ] [] +list-hidden-files.ps1 [[-DirTree] ] [] -DirTree Specifies the path to the directory tree diff --git a/Docs/list-installed-scripts.md b/Docs/list-installed-scripts.md index 957f219f..c1a53d67 100644 --- a/Docs/list-installed-scripts.md +++ b/Docs/list-installed-scripts.md @@ -4,7 +4,7 @@ This PowerShell script lists all installed PowerShell scripts. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-installed-scripts.ps1 [] +list-installed-scripts.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-installed-software.md b/Docs/list-installed-software.md index 47499895..ff56449c 100644 --- a/Docs/list-installed-software.md +++ b/Docs/list-installed-software.md @@ -4,7 +4,7 @@ This PowerShell script lists the installed software (except Windows Store apps). ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-installed-software.ps1 [] +list-installed-software.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-latest-tag.md b/Docs/list-latest-tag.md index 91211907..34b6e7ea 100644 --- a/Docs/list-latest-tag.md +++ b/Docs/list-latest-tag.md @@ -4,7 +4,7 @@ This PowerShell script lists the latest tag on the current branch in a Git repos ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-latest-tag.ps1 [[-RepoDir] ] [] +list-latest-tag.ps1 [[-RepoDir] ] [] -RepoDir Specifies the path to the repository diff --git a/Docs/list-latest-tags.md b/Docs/list-latest-tags.md index 43f5c639..b874e84d 100644 --- a/Docs/list-latest-tags.md +++ b/Docs/list-latest-tags.md @@ -4,7 +4,7 @@ This PowerShell script lists the latest tags in all Git repositories in the spec ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-latest-tags.ps1 [[-ParentDir] ] [] +list-latest-tags.ps1 [[-ParentDir] ] [] -ParentDir Specifies the path to the parent folder diff --git a/Docs/list-memos.md b/Docs/list-memos.md index 915b9767..44a9529b 100644 --- a/Docs/list-memos.md +++ b/Docs/list-memos.md @@ -4,7 +4,7 @@ This PowerShell script lists all memo entries in Memos.csv in your home folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-memos.ps1 [] +list-memos.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-modules.md b/Docs/list-modules.md index 15dd55bf..1cf27da3 100644 --- a/Docs/list-modules.md +++ b/Docs/list-modules.md @@ -4,7 +4,7 @@ This PowerShell script lists the installed PowerShell modules. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-modules.ps1 [] +list-modules.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-motherboard.md b/Docs/list-motherboard.md index 42233fc0..6ac231fe 100644 --- a/Docs/list-motherboard.md +++ b/Docs/list-motherboard.md @@ -4,7 +4,7 @@ This PowerShell script lists the motherboard details. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-motherboard.ps1 [] +list-motherboard.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-mysql-tables.md b/Docs/list-mysql-tables.md index a085b090..b36486f7 100644 --- a/Docs/list-mysql-tables.md +++ b/Docs/list-mysql-tables.md @@ -4,7 +4,7 @@ This PowerShell script lists all tables of the given MySQL database. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-mysql-tables.ps1 [-server] [-database] [-dbuser] [-dbpass] [] +list-mysql-tables.ps1 [-server] [-database] [-dbuser] [-dbpass] [] -server diff --git a/Docs/list-network-connections.md b/Docs/list-network-connections.md index 7a1455a2..e3f5f262 100644 --- a/Docs/list-network-connections.md +++ b/Docs/list-network-connections.md @@ -4,7 +4,7 @@ This PowerShell script lists all active network connections on the local compute ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-network-connections.ps1 [] +list-network-connections.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-network-routes.md b/Docs/list-network-routes.md index e2fc7609..c9f4c16d 100644 --- a/Docs/list-network-routes.md +++ b/Docs/list-network-routes.md @@ -4,7 +4,7 @@ This PowerShell script lists the network routes on the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-network-routes.ps1 [] +list-network-routes.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-network-shares.md b/Docs/list-network-shares.md index 33c58812..2dac66db 100644 --- a/Docs/list-network-shares.md +++ b/Docs/list-network-shares.md @@ -4,7 +4,7 @@ This PowerShell script lists all network shares of the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-network-shares.ps1 [] +list-network-shares.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-news.md b/Docs/list-news.md index 5ac3354f..33b17cfa 100644 --- a/Docs/list-news.md +++ b/Docs/list-news.md @@ -4,7 +4,7 @@ This PowerShell script lists the latest news by using RSS (Really Simple Syndica ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-news.ps1 [[-RSS_URL] ] [[-MaxLines] ] [[-Speed] ] [] +list-news.ps1 [[-RSS_URL] ] [[-MaxLines] ] [[-Speed] ] [] -RSS_URL Specifies the URL to the RSS feed (Yahoo News by default) @@ -40,7 +40,9 @@ This PowerShell script lists the latest news by using RSS (Really Simple Syndica ## Example ```powershell -PS> ./list-news +PS> ./list-news.ps1 +❇️ Deadly Mediterranean wildfires kill more than 40 +... ``` @@ -54,7 +56,7 @@ https://github.com/fleschutz/PowerShell ```powershell <# .SYNOPSIS - List news + List the latest news .DESCRIPTION This PowerShell script lists the latest news by using RSS (Really Simple Syndication) feeds. .PARAMETER RSS_URL @@ -64,7 +66,9 @@ https://github.com/fleschutz/PowerShell .PARAMETER Speed Specifies the speed to write the text (10 ms by default) .EXAMPLE - PS> ./list-news + PS> ./list-news.ps1 + ❇️ Deadly Mediterranean wildfires kill more than 40 + ... .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -89,8 +93,7 @@ try { $Date = $Date -Replace "Fri, ","" $Date = $Date -Replace "Sat, ","" $Date = $Date -Replace "Sun, ","" - $Copyright = $Content.rss.channel.copyright - "($Source|$Date|$Copyright)" + "(by $Source as of $Date)" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Docs/list-nic.md b/Docs/list-nic.md index 367dd47b..1757d7a5 100644 --- a/Docs/list-nic.md +++ b/Docs/list-nic.md @@ -4,7 +4,7 @@ This PowerShell script lists the details of the installed network interfaces. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-nic.ps1 [] +list-nic.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-os-releases.md b/Docs/list-os-releases.md index ee8bc4f4..8dddb958 100644 --- a/Docs/list-os-releases.md +++ b/Docs/list-os-releases.md @@ -4,7 +4,7 @@ This PowerShell script lists OS releases and download URL. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-os-releases.ps1 [] +list-os-releases.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-os-updates.md b/Docs/list-os-updates.md index ba610879..f3937ccd 100644 --- a/Docs/list-os-updates.md +++ b/Docs/list-os-updates.md @@ -4,7 +4,7 @@ This PowerShell script lists the latest updates for operating systems. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-os-updates.ps1 [[-RSS_URL] ] [[-MaxCount] ] [] +list-os-updates.ps1 [[-RSS_URL] ] [[-MaxCount] ] [] -RSS_URL Specifies the URL to the RSS feed diff --git a/Docs/list-os.md b/Docs/list-os.md index 9ac12267..cee3a567 100644 --- a/Docs/list-os.md +++ b/Docs/list-os.md @@ -4,7 +4,7 @@ This PowerShell script lists the exact operating system version. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-os.ps1 [] +list-os.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-outlook-inbox.md b/Docs/list-outlook-inbox.md index d8221293..a3d9a51e 100644 --- a/Docs/list-outlook-inbox.md +++ b/Docs/list-outlook-inbox.md @@ -4,7 +4,7 @@ This PowerShell script lists the emails in the inbox of Outlook. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-outlook-inbox.ps1 [] +list-outlook-inbox.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-outlook-sent.md b/Docs/list-outlook-sent.md index a2b14c3a..0ae64d30 100644 --- a/Docs/list-outlook-sent.md +++ b/Docs/list-outlook-sent.md @@ -4,7 +4,7 @@ This PowerShell script lists the mails in the Sent Mail folder of Outlook. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-outlook-sent.ps1 [] +list-outlook-sent.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-passwords.md b/Docs/list-passwords.md index afcceb80..d3d0b5ed 100644 --- a/Docs/list-passwords.md +++ b/Docs/list-passwords.md @@ -4,7 +4,7 @@ This PowerShell script lists random passwords. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-passwords.ps1 [[-PasswordLength] ] [[-Columns] ] [[-Rows] ] [] +list-passwords.ps1 [[-PasswordLength] ] [[-Columns] ] [[-Rows] ] [] -PasswordLength Specifies the length of the password diff --git a/Docs/list-pi.md b/Docs/list-pi.md index 86d35633..dd2b14e4 100644 --- a/Docs/list-pi.md +++ b/Docs/list-pi.md @@ -4,7 +4,7 @@ This PowerShell script calculates and lists the digits of the mathematical const ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-pi.ps1 [[-Digits] ] [] +list-pi.ps1 [[-Digits] ] [] -Digits Specifies the number of digits to list (1000 by default) diff --git a/Docs/list-pins.md b/Docs/list-pins.md index 766304b0..1da56a50 100644 --- a/Docs/list-pins.md +++ b/Docs/list-pins.md @@ -4,7 +4,7 @@ This PowerShell script lists random PIN's. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-pins.ps1 [[-PinLength] ] [[-Columns] ] [[-Rows] ] [] +list-pins.ps1 [[-PinLength] ] [[-Columns] ] [[-Rows] ] [] -PinLength Specifies the PIN length diff --git a/Docs/list-print-jobs.md b/Docs/list-print-jobs.md index 87773ba1..387e4c96 100644 --- a/Docs/list-print-jobs.md +++ b/Docs/list-print-jobs.md @@ -4,7 +4,7 @@ This PowerShell script lists all print jobs of all printer devices. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-print-jobs.ps1 [] +list-print-jobs.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-printers.md b/Docs/list-printers.md index 3d6a3881..64c1d661 100644 --- a/Docs/list-printers.md +++ b/Docs/list-printers.md @@ -4,7 +4,7 @@ This PowerShell script lists all printers known to the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-printers.ps1 [] +list-printers.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-processes.md b/Docs/list-processes.md index 8fb06724..8423217e 100644 --- a/Docs/list-processes.md +++ b/Docs/list-processes.md @@ -4,7 +4,7 @@ This PowerShell script lists all local computer processes. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-processes.ps1 [] +list-processes.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-ram.md b/Docs/list-ram.md index 7197a1a2..1d9b4a96 100644 --- a/Docs/list-ram.md +++ b/Docs/list-ram.md @@ -4,7 +4,7 @@ This PowerShell script lists the details of the installed RAM. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-ram.ps1 [] +list-ram.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-recycle-bin.md b/Docs/list-recycle-bin.md index bae5ad99..b714edfa 100644 --- a/Docs/list-recycle-bin.md +++ b/Docs/list-recycle-bin.md @@ -4,7 +4,7 @@ This PowerShell script lists the content of the recycle bin folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-recycle-bin.ps1 [] +list-recycle-bin.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-repos.md b/Docs/list-repos.md index a7c6f69a..5ff7cab7 100644 --- a/Docs/list-repos.md +++ b/Docs/list-repos.md @@ -4,7 +4,7 @@ This PowerShell script lists the details of all Git repositories in a folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-repos.ps1 [[-ParentDir] ] [] +list-repos.ps1 [[-ParentDir] ] [] -ParentDir Specifies the path to the parent directory. @@ -68,16 +68,16 @@ param([string]$ParentDir = "$PWD") function ListRepos { [int]$No = 1 $Folders = (Get-ChildItem "$ParentDir" -attributes Directory) - foreach ($Folder in $Folders) { + foreach($Folder in $Folders) { $FolderName = (Get-Item "$Folder").Name $Branch = (git -C "$Folder" branch --show-current) $LatestTagCommitID = (git -C "$Folder" rev-list --tags --max-count=1) $LatestTag = (git -C "$Folder" describe --tags $LatestTagCommitID) $Status = (git -C "$Folder" status --short) if ("$Status" -eq "") { $Status = "clean" } - if ("$Status" -like " M *") { $Status = "modified" } - - New-Object PSObject -property @{ 'No'="$No"; 'Repository'="$FolderName"; 'Branch'="$Branch"; 'LatestTag'="$LatestTag"; 'Status'="$Status"; } + elseif ("$Status" -like " M *") { $Status = "MODIFIED" } + $NumCommits = (git -C "$Folder" rev-list HEAD...origin/$Branch --count) + New-Object PSObject -property @{ 'No'="$No"; 'Repository'="$FolderName"; 'Branch'="$Branch"; 'Latest_Tag'="$LatestTag"; 'Status'="$Status ↓$NumCommits"; } $No++ } } @@ -88,7 +88,7 @@ try { $Null = (git --version) if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } - ListRepos | Format-Table -property @{e='No';width=3},@{e='Repository';width=25},@{e='Branch';width=20},LatestTag,Status + ListRepos | Format-Table -property @{e='No';width=3},@{e='Repository';width=22},@{e='Branch';width=20},Latest_Tag,Status exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Docs/list-services.md b/Docs/list-services.md index e87798fe..2ecf608a 100644 --- a/Docs/list-services.md +++ b/Docs/list-services.md @@ -4,7 +4,7 @@ This PowerShell script lists all services installed on the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-services.ps1 [] +list-services.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-sql-tables.md b/Docs/list-sql-tables.md index b28dcb1a..2ddc107d 100644 --- a/Docs/list-sql-tables.md +++ b/Docs/list-sql-tables.md @@ -6,7 +6,7 @@ Run the above command if you do not have this module. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-sql-tables.ps1 [-server] [-database] [-username] [-password] [] +list-sql-tables.ps1 [-server] [-database] [-username] [-password] [] -server diff --git a/Docs/list-submodules.md b/Docs/list-submodules.md index 732d1547..1d32c5ca 100644 --- a/Docs/list-submodules.md +++ b/Docs/list-submodules.md @@ -4,7 +4,7 @@ This PowerShell script lists the submodules in the given Git repository. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-submodules.ps1 [[-RepoDir] ] [] +list-submodules.ps1 [[-RepoDir] ] [] -RepoDir Specifies the path to the repository (current working directory by default) diff --git a/Docs/list-suggestions.md b/Docs/list-suggestions.md index 26deb3cf..8a33a3df 100644 --- a/Docs/list-suggestions.md +++ b/Docs/list-suggestions.md @@ -4,7 +4,7 @@ This PowerShell script lists "Did you mean?" suggestions from Google. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-suggestions.ps1 [[-text] ] [] +list-suggestions.ps1 [[-text] ] [] -text Specifies the word or sentence to get suggestions for. diff --git a/Docs/list-system-info.md b/Docs/list-system-info.md index 669a9128..fdf673bc 100644 --- a/Docs/list-system-info.md +++ b/Docs/list-system-info.md @@ -4,7 +4,7 @@ This PowerShell script lists system information of the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-system-info.ps1 [] +list-system-info.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-tags.md b/Docs/list-tags.md index bd06910b..b4c3e437 100644 --- a/Docs/list-tags.md +++ b/Docs/list-tags.md @@ -4,7 +4,7 @@ This PowerShell script lists all tags in a Git repository. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-tags.ps1 [[-RepoDir] ] [[-SearchPattern] ] [] +list-tags.ps1 [[-RepoDir] ] [[-SearchPattern] ] [] -RepoDir Specifies the path to the Git repository (current working directory by default) diff --git a/Docs/list-timezone.md b/Docs/list-timezone.md index 74a26af0..0471855a 100644 --- a/Docs/list-timezone.md +++ b/Docs/list-timezone.md @@ -4,7 +4,7 @@ This PowerShell script lists the details of the current time zone. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-timezone.ps1 [] +list-timezone.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-timezones.md b/Docs/list-timezones.md index 53bebb2c..3191de3e 100644 --- a/Docs/list-timezones.md +++ b/Docs/list-timezones.md @@ -4,7 +4,7 @@ This PowerShell script lists all available time zones. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-timezones.ps1 [] +list-timezones.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-unused-files.md b/Docs/list-unused-files.md index d6ed2117..2ecb4585 100644 --- a/Docs/list-unused-files.md +++ b/Docs/list-unused-files.md @@ -4,7 +4,7 @@ This PowerShell script scans and lists files in a folder with last access time o ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-unused-files.ps1 [[-DirTree] ] [[-Days] ] [] +list-unused-files.ps1 [[-DirTree] ] [[-Days] ] [] -DirTree Specifies the path to the directory tree diff --git a/Docs/list-updates.md b/Docs/list-updates.md index ef63b500..40d10a74 100644 --- a/Docs/list-updates.md +++ b/Docs/list-updates.md @@ -1,11 +1,11 @@ ## The *list-updates.ps1* Script -This PowerShell script lists available software updates for the local machine. -Use "install-updates.ps1" to install the listed updates. +This PowerShell script queries and lists available software updates for the local machine. +Use 'install-updates.ps1' to install the listed updates. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-updates.ps1 [] +list-updates.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, @@ -16,6 +16,13 @@ Use "install-updates.ps1" to install the listed updates. ```powershell PS> ./list-updates + + +Name Id Version Available Source +----------------------------------------------------------------------------------------------------------------------- +Git Git.Git 2.41.0 2.41.0.2 winget + ... + ``` ## Notes @@ -28,12 +35,17 @@ https://github.com/fleschutz/PowerShell ```powershell <# .SYNOPSIS - Lists updates + Lists new software updates .DESCRIPTION - This PowerShell script lists available software updates for the local machine. - Use "install-updates.ps1" to install the listed updates. + This PowerShell script queries and lists available software updates for the local machine. + Use 'install-updates.ps1' to install the listed updates. .EXAMPLE PS> ./list-updates + + Name Id Version Available Source + ----------------------------------------------------------------------------------------------------------------------- + Git Git.Git 2.41.0 2.41.0.2 winget + ... .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -42,18 +54,18 @@ https://github.com/fleschutz/PowerShell try { if ($IsLinux) { - "⏳ (1/2) Querying package updates... (use install-updates.ps1 to install them)" + "⏳ (1/2) Querying package updates..." & sudo apt update & sudo apt list --upgradable - "⏳ (2/2) Querying Snap updates... (use install-updates.ps1 to install them)" - sudo snap refresh --list + "⏳ (2/2) Querying Snap updates..." + & sudo snap refresh --list } else { - Write-Progress "⏳ Querying available software updates..." " " + Write-Progress "⏳ Querying new software updates..." & winget upgrade Write-Progress -completed "." - Write-Host "(use install-updates.ps1 to install these updates)" } + "(use 'install-updates.ps1' to install the listed updates)" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Docs/list-user-accounts.md b/Docs/list-user-accounts.md index 3aad7797..0c8e4e4d 100644 --- a/Docs/list-user-accounts.md +++ b/Docs/list-user-accounts.md @@ -4,7 +4,7 @@ This PowerShell script lists the user accounts on the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-user-accounts.ps1 [] +list-user-accounts.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-user-groups.md b/Docs/list-user-groups.md index 8735bc40..87914b06 100644 --- a/Docs/list-user-groups.md +++ b/Docs/list-user-groups.md @@ -1,10 +1,10 @@ ## The *list-user-groups.ps1* Script -This PowerShell script lists the user groups on the local computer. +This PowerShell script lists the user groups of the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-user-groups.ps1 [] +list-user-groups.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, @@ -17,10 +17,9 @@ PS> ./list-user-groups -Name Description ----- ----------- -HomeUsers HomeUsers Security Group -Ssh Users Members of this group can remotely access this computer over SSH protocol. +Name Description +---- ----------- +Administrators Administrators have complete and unrestricted access to the computer/domain ... ``` @@ -35,16 +34,15 @@ https://github.com/fleschutz/PowerShell ```powershell <# .SYNOPSIS - Lists the user groups on the local computer + Lists the user groups .DESCRIPTION - This PowerShell script lists the user groups on the local computer. + This PowerShell script lists the user groups of the local computer. .EXAMPLE PS> ./list-user-groups - Name Description - ---- ----------- - HomeUsers HomeUsers Security Group - Ssh Users Members of this group can remotely access this computer over SSH protocol. + Name Description + ---- ----------- + Administrators Administrators have complete and unrestricted access to the computer/domain ... .LINK https://github.com/fleschutz/PowerShell diff --git a/Docs/list-verbs.md b/Docs/list-verbs.md index a6dd3289..31e22b72 100644 --- a/Docs/list-verbs.md +++ b/Docs/list-verbs.md @@ -4,7 +4,7 @@ This PowerShell script lists all allowed verbs. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-verbs.ps1 [] +list-verbs.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-voices.md b/Docs/list-voices.md index 5c69c23b..753d4b02 100644 --- a/Docs/list-voices.md +++ b/Docs/list-voices.md @@ -4,7 +4,7 @@ This PowerShell script lists the installed text-to-speech (TTS) voices. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-voices.ps1 [] +list-voices.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-weather.md b/Docs/list-weather.md index 0e822ac1..2fbb8308 100644 --- a/Docs/list-weather.md +++ b/Docs/list-weather.md @@ -4,7 +4,7 @@ This PowerShell script lists the hourly weather report in a nice table. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-weather.ps1 [[-Location] ] [] +list-weather.ps1 [[-Location] ] [] -Location Specifies the location to use (determined automatically per default) @@ -77,6 +77,7 @@ function GetDescription { param([string]$Text) "Moderate or heavy snow showers"{ return "❄️ moderate or heavy snow showers ⚠️" } "Moderate or heavy freezing rain"{ return "πŸ’§ moderate or heavy freezing rain ⚠️" } "Moderate rain" { return "πŸ’§ moderate rain" } + "Moderate rain at times" { return "πŸ’§ moderate rain at times" } "Moderate snow" { return "❄️ moderate snow" } "Mist" { return "🌫 misty" } "Overcast" { return "☁️ overcast" } @@ -118,7 +119,7 @@ function GetWindDir { param([string]$Text) } try { - Write-Progress "⏳ Loading data from http://wttr.in ..." + Write-Progress "⏳ Loading weather data from http://wttr.in ..." $Weather = (Invoke-WebRequest -URI http://wttr.in/${Location}?format=j1 -userAgent "curl" -useBasicParsing).Content | ConvertFrom-Json Write-Progress -completed "." $Area = $Weather.nearest_area.areaName.value diff --git a/Docs/list-wifi.md b/Docs/list-wifi.md index 2a0e879e..5107a8d5 100644 --- a/Docs/list-wifi.md +++ b/Docs/list-wifi.md @@ -4,7 +4,7 @@ This PowerShell script lists the WIFI networks. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-wifi.ps1 [] +list-wifi.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-window-titles.md b/Docs/list-window-titles.md index e139818b..2d4350be 100644 --- a/Docs/list-window-titles.md +++ b/Docs/list-window-titles.md @@ -4,7 +4,7 @@ This PowerShell script list all main window titles and displays them in a table. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-window-titles.ps1 [] +list-window-titles.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/list-workdir.md b/Docs/list-workdir.md index de6d6714..2a452bbd 100644 --- a/Docs/list-workdir.md +++ b/Docs/list-workdir.md @@ -4,7 +4,7 @@ This PowerShell script lists the path to current working directory (but not the ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/list-workdir.ps1 [] +list-workdir.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/locate-city.md b/Docs/locate-city.md index b20388e9..991704db 100644 --- a/Docs/locate-city.md +++ b/Docs/locate-city.md @@ -4,7 +4,7 @@ This PowerShell script prints the geographic location of the given city. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/locate-city.ps1 [[-City] ] [] +locate-city.ps1 [[-City] ] [] -City Specifies the city to look for diff --git a/Docs/locate-my-phone.md b/Docs/locate-my-phone.md index 4e72cae3..82285760 100644 --- a/Docs/locate-my-phone.md +++ b/Docs/locate-my-phone.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser with the Google Find My Device w ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/locate-my-phone.ps1 [] +locate-my-phone.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/locate-zip-code.md b/Docs/locate-zip-code.md index 8fdb4e54..89f82e6a 100644 --- a/Docs/locate-zip-code.md +++ b/Docs/locate-zip-code.md @@ -4,7 +4,7 @@ This PowerShell script prints the geographic location of the given zip-code. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/locate-zip-code.ps1 [[-CountryCode] ] [[-ZipCode] ] [] +locate-zip-code.ps1 [[-CountryCode] ] [[-ZipCode] ] [] -CountryCode Specifies the country code diff --git a/Docs/lock-desktop.md b/Docs/lock-desktop.md index 57733464..efa079ee 100644 --- a/Docs/lock-desktop.md +++ b/Docs/lock-desktop.md @@ -4,7 +4,7 @@ This PowerShell script locks the local computer desktop immediately. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/lock-desktop.ps1 [] +lock-desktop.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/log-off.md b/Docs/log-off.md index 2bfeb6d6..cbfe47f9 100644 --- a/Docs/log-off.md +++ b/Docs/log-off.md @@ -4,7 +4,7 @@ This PowerShell script logs off the current Windows user. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/log-off.ps1 [] +log-off.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/make-install.md b/Docs/make-install.md index f6294306..422fea68 100644 --- a/Docs/make-install.md +++ b/Docs/make-install.md @@ -4,7 +4,7 @@ This PowerShell script copies newer EXE's + DLL's from the build directory to th ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/make-install.ps1 [] +make-install.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/merry-christmas.md b/Docs/merry-christmas.md index acaa1f96..4687d2df 100644 --- a/Docs/merry-christmas.md +++ b/Docs/merry-christmas.md @@ -4,7 +4,7 @@ This PowerShell script replies to 'Merry Christmas' by text-to-speech (TTS). ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/merry-christmas.ps1 [] +merry-christmas.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/minimize-all-windows.md b/Docs/minimize-all-windows.md index cbbbb91b..a7c0af2c 100644 --- a/Docs/minimize-all-windows.md +++ b/Docs/minimize-all-windows.md @@ -4,7 +4,7 @@ This PowerShell script minimizes all open windows. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/minimize-all-windows.ps1 [] +minimize-all-windows.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/moon.md b/Docs/moon.md index d97fbbe6..90f82103 100644 --- a/Docs/moon.md +++ b/Docs/moon.md @@ -4,7 +4,7 @@ This PowerShell script prints the current moon phase. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/moon.ps1 [] +moon.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/new-branch.md b/Docs/new-branch.md index 1aaee9f9..79aad122 100644 --- a/Docs/new-branch.md +++ b/Docs/new-branch.md @@ -4,9 +4,9 @@ This PowerShell script creates a new branch in a Git repository and switches to ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/new-branch.ps1 [[-NewBranchName] ] [[-RepoDir] ] [] +new-branch.ps1 [[-newBranch] ] [[-repoPath] ] [] --NewBranchName +-newBranch Specifies the new branch name Required? false @@ -15,7 +15,7 @@ This PowerShell script creates a new branch in a Git repository and switches to Accept pipeline input? false Accept wildcard characters? false --RepoDir +-repoPath Specifies the path to the Git repository (current working directory per default) Required? false @@ -31,7 +31,7 @@ This PowerShell script creates a new branch in a Git repository and switches to ## Example ```powershell -PS> ./new-branch test123 +PS> ./new-branch.ps1 test123 ``` @@ -48,54 +48,54 @@ https://github.com/fleschutz/PowerShell Creates a new Git branch .DESCRIPTION This PowerShell script creates a new branch in a Git repository and switches to it. -.PARAMETER NewBranchName +.PARAMETER newBranch Specifies the new branch name -.PARAMETER RepoDir +.PARAMETER repoPath Specifies the path to the Git repository (current working directory per default) .EXAMPLE - PS> ./new-branch test123 + PS> ./new-branch.ps1 test123 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$NewBranchName = "", [string]$RepoDir = "$PWD") +param([string]$newBranch = "", [string]$repoPath = "$PWD") try { - if ($NewBranchName -eq "") { $NewBranchName = Read-Host "Enter new branch name" } + if ($newBranch -eq "") { $newBranch = Read-Host "Enter the new branch name" } - $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 repository... πŸ“‚$RepoDir" - if (-not(Test-Path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" } - $RepoDirName = (Get-Item "$RepoDir").Name + Write-Host "⏳ (2/6) Checking local repository... πŸ“‚$repoPath" + if (-not(Test-Path "$repoPath" -pathType container)) { throw "Can't access directory: $repoPath" } + $repoPathName = (Get-Item "$repoPath").Name "⏳ (3/6) Fetching latest updates..." - & git -C "$RepoDir" fetch --all --recurse-submodules --prune --prune-tags --force + & git -C "$repoPath" fetch --all --recurse-submodules --prune --prune-tags --force if ($lastExitCode -ne "0") { throw "'git fetch' failed with exit code $lastExitCode" } - $CurrentBranchName = (git -C "$RepoDir" rev-parse --abbrev-ref HEAD) + $currentBranch = (git -C "$repoPath" rev-parse --abbrev-ref HEAD) if ($lastExitCode -ne "0") { throw "'git rev-parse' failed with exit code $lastExitCode" } "⏳ (4/6) Creating branch..." - & git -C "$RepoDir" checkout -b "$NewBranchName" - if ($lastExitCode -ne "0") { throw "'git checkout -b $NewBranchName' failed with exit code $lastExitCode" } + & git -C "$repoPath" checkout -b "$newBranch" + if ($lastExitCode -ne "0") { throw "'git checkout -b $newBranch' failed with exit code $lastExitCode" } "⏳ (5/6) Pushing updates..." - & git -C "$RepoDir" push origin "$NewBranchName" - if ($lastExitCode -ne "0") { throw "'git push origin $NewBranchName' failed with exit code $lastExitCode" } + & git -C "$repoPath" push origin "$newBranch" + if ($lastExitCode -ne "0") { throw "'git push origin $newBranch' failed with exit code $lastExitCode" } "⏳ (6/6) Updating submodules..." - & git -C "$RepoDir" submodule update --init --recursive + & git -C "$repoPath" submodule update --init --recursive if ($lastExitCode -ne "0") { throw "'git submodule update' failed with exit code $lastExitCode" } - [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds - "βœ”οΈ created branch '$NewBranchName' in repo πŸ“‚$RepoDirName (based on '$CurrentBranchName') in $Elapsed sec" + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "βœ”οΈ created branch '$newBranch' based on '$currentBranch' in repo πŸ“‚$repoPathName in $elapsed sec" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Docs/new-email.md b/Docs/new-email.md index 77941f83..d672c0cb 100644 --- a/Docs/new-email.md +++ b/Docs/new-email.md @@ -4,7 +4,7 @@ This PowerShell script opens the default email client to write a new email. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/new-email.ps1 [[-EmailAddress] ] [] +new-email.ps1 [[-EmailAddress] ] [] -EmailAddress Specifies the email address fill in diff --git a/Docs/new-qrcode.md b/Docs/new-qrcode.md index 50f38bb5..b82c982c 100644 --- a/Docs/new-qrcode.md +++ b/Docs/new-qrcode.md @@ -4,7 +4,7 @@ This PowerShell script generates a new QR code image file. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/new-qrcode.ps1 [[-Text] ] [[-ImageSize] ] [] +new-qrcode.ps1 [[-Text] ] [[-ImageSize] ] [] -Text Specifies the text to use diff --git a/Docs/new-script.md b/Docs/new-script.md index 315e800f..ec4f173d 100644 --- a/Docs/new-script.md +++ b/Docs/new-script.md @@ -4,7 +4,7 @@ This PowerShell script creates a new PowerShell script file (by using template f ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/new-script.ps1 [[-filename] ] [] +new-script.ps1 [[-filename] ] [] -filename Specifies the path to the resulting file diff --git a/Docs/new-shortcut.md b/Docs/new-shortcut.md index 371e80fa..8240bf21 100644 --- a/Docs/new-shortcut.md +++ b/Docs/new-shortcut.md @@ -4,7 +4,7 @@ This PowerShell script creates a new shortcut file. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/new-shortcut.ps1 [[-shortcut] ] [[-target] ] [[-description] ] [] +new-shortcut.ps1 [[-shortcut] ] [[-target] ] [[-description] ] [] -shortcut Specifies the shortcut filename diff --git a/Docs/new-symlink.md b/Docs/new-symlink.md index 50878742..f3512276 100644 --- a/Docs/new-symlink.md +++ b/Docs/new-symlink.md @@ -4,7 +4,7 @@ This PowerShell script creates a new symbolic link file. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/new-symlink.ps1 [[-symlink] ] [[-target] ] [] +new-symlink.ps1 [[-symlink] ] [[-target] ] [] -symlink Specifies the new symlink filename diff --git a/Docs/new-tag.md b/Docs/new-tag.md index 2f93e683..d3382ec1 100644 --- a/Docs/new-tag.md +++ b/Docs/new-tag.md @@ -4,7 +4,7 @@ This PowerShell script creates a new tag in a Git repository. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/new-tag.ps1 [[-TagName] ] [[-RepoDir] ] [] +new-tag.ps1 [[-TagName] ] [[-RepoDir] ] [] -TagName Specifies the new tag name diff --git a/Docs/new-user.md b/Docs/new-user.md index bcde379f..8d8497cf 100644 --- a/Docs/new-user.md +++ b/Docs/new-user.md @@ -4,7 +4,7 @@ This PowerShell script creates a new user account. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/new-user.ps1 [[-Username] ] [] +new-user.ps1 [[-Username] ] [] -Username diff --git a/Docs/new-zipfile.md b/Docs/new-zipfile.md index bea0da7c..acaa8882 100644 --- a/Docs/new-zipfile.md +++ b/Docs/new-zipfile.md @@ -4,7 +4,7 @@ This PowerShell script creates a new .ZIP file from a folder (including subfolde ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/new-zipfile.ps1 [[-folder] ] [] +new-zipfile.ps1 [[-folder] ] [] -folder Specifies the path to the folder diff --git a/Docs/on-desktop-login.md b/Docs/on-desktop-login.md new file mode 100644 index 00000000..b62579e1 --- /dev/null +++ b/Docs/on-desktop-login.md @@ -0,0 +1,52 @@ +## The *on-desktop-login.ps1* Script + +This PowerShell script executes tasks on every desktop login. + +## Parameters +```powershell +on-desktop-login.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +## Example +```powershell +PS> ./on-desktop-login.ps1 + +``` + +## Notes +Author: Markus Fleschutz | License: CC0 + +## Related Links +https://github.com/fleschutz/PowerShell + +## Source Code +```powershell +<# +.SYNOPSIS + Executes tasks on desktop login +.DESCRIPTION + This PowerShell script executes tasks on every desktop login. +.EXAMPLE + PS> ./on-desktop-login.ps1 +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +try { + & "$PSScriptRoot/open-dashboards.ps1" + & "$PSScriptRoot/list-news.ps1" + & "$PSScriptRoot/write-clock.ps1" + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*Generated by convert-ps2md.ps1 using the comment-based help of on-desktop-login.ps1* diff --git a/Docs/open-air-b-n-b.md b/Docs/open-air-b-n-b.md index 7b4325a0..e08b6d66 100644 --- a/Docs/open-air-b-n-b.md +++ b/Docs/open-air-b-n-b.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser with the AirBNB website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-air-b-n-b.ps1 [] +open-air-b-n-b.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-apps-folder.md b/Docs/open-apps-folder.md index 84f19b28..e6ca2fe5 100644 --- a/Docs/open-apps-folder.md +++ b/Docs/open-apps-folder.md @@ -4,7 +4,7 @@ This PowerShell script launches the File Explorer showing the UWP apps folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-apps-folder.ps1 [] +open-apps-folder.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-auto-start-folder.md b/Docs/open-auto-start-folder.md index da307d83..217e4306 100644 --- a/Docs/open-auto-start-folder.md +++ b/Docs/open-auto-start-folder.md @@ -4,7 +4,7 @@ This PowerShell script launches the File Explorer with the user's autostart fold ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-auto-start-folder.ps1 [] +open-auto-start-folder.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-bing-maps.md b/Docs/open-bing-maps.md index 663f69a1..f2f07bf2 100644 --- a/Docs/open-bing-maps.md +++ b/Docs/open-bing-maps.md @@ -4,7 +4,7 @@ This PowerShell script launches the Bing Maps application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-bing-maps.ps1 [] +open-bing-maps.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-booking-com.md b/Docs/open-booking-com.md index e1c5b6c5..e9b5027c 100644 --- a/Docs/open-booking-com.md +++ b/Docs/open-booking-com.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser with the Booking.com website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-booking-com.ps1 [] +open-booking-com.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-c-drive.md b/Docs/open-c-drive.md index 9cf96c69..c1f0d695 100644 --- a/Docs/open-c-drive.md +++ b/Docs/open-c-drive.md @@ -4,7 +4,7 @@ This PowerShell script launches the File Explorer with the C: drive folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-c-drive.ps1 [] +open-c-drive.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-calculator.md b/Docs/open-calculator.md index 79c281ca..24b001a0 100644 --- a/Docs/open-calculator.md +++ b/Docs/open-calculator.md @@ -4,7 +4,7 @@ This PowerShell script launches the calculator application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-calculator.ps1 [] +open-calculator.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-chrome.md b/Docs/open-chrome.md index d2ed4252..806926b4 100644 --- a/Docs/open-chrome.md +++ b/Docs/open-chrome.md @@ -4,7 +4,7 @@ This PowerShell script launches the Google Chrome Web browser. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-chrome.ps1 [[-URL] ] [] +open-chrome.ps1 [[-URL] ] [] -URL Specifies an optional URL diff --git a/Docs/open-clock.md b/Docs/open-clock.md index de9afe78..8eaf6771 100644 --- a/Docs/open-clock.md +++ b/Docs/open-clock.md @@ -4,7 +4,7 @@ This PowerShell script launches the Clock application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-clock.ps1 [] +open-clock.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-cortana.md b/Docs/open-cortana.md index fcc461d3..6ddacc9e 100644 --- a/Docs/open-cortana.md +++ b/Docs/open-cortana.md @@ -4,7 +4,7 @@ This PowerShell script launches the Cortana application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-cortana.ps1 [] +open-cortana.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-d-drive.md b/Docs/open-d-drive.md index 1b525efe..a923ccc1 100644 --- a/Docs/open-d-drive.md +++ b/Docs/open-d-drive.md @@ -4,7 +4,7 @@ This PowerShell script launches the File Explorer with the D: drive folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-d-drive.ps1 [] +open-d-drive.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-dashboards.md b/Docs/open-dashboards.md index 556bed33..eb7b5fdc 100644 --- a/Docs/open-dashboards.md +++ b/Docs/open-dashboards.md @@ -1,10 +1,10 @@ ## The *open-dashboards.ps1* Script -This PowerShell script launches the Web browser with some dashboard websites. +This PowerShell script launches the web browser with tabs of 18 dashboard websites. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-dashboards.ps1 [] +open-dashboards.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, @@ -13,7 +13,10 @@ This PowerShell script launches the Web browser with some dashboard websites. ## Example ```powershell -PS> ./open-dashboards +PS> ./open-dashboards.ps1 +⏳ (1/2) Loading Data/web-dashboards.csv... +⏳ (2/2) Launching web browser with tabs of Toggl Track Β· Google Calendar Β· CNN News... +... ``` @@ -27,11 +30,14 @@ https://github.com/fleschutz/PowerShell ```powershell <# .SYNOPSIS - Open dashboards + Open web dashboards .DESCRIPTION - This PowerShell script launches the Web browser with some dashboard websites. + This PowerShell script launches the web browser with tabs of 18 dashboard websites. .EXAMPLE - PS> ./open-dashboards + PS> ./open-dashboards.ps1 + ⏳ (1/2) Loading Data/web-dashboards.csv... + ⏳ (2/2) Launching web browser with tabs of Toggl Track Β· Google Calendar Β· CNN News... + ... .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -40,21 +46,18 @@ https://github.com/fleschutz/PowerShell try { $stopWatch = [system.diagnostics.stopwatch]::startNew() - Write-Host "⏳ (1/2) Loading Data/popular-dashboards.csv..." - $Table = Import-CSV "$PSScriptRoot/../Data/popular-dashboards.csv" - $NumRows = $Table.Length - Write-Host "⏳ (2/2) Launching Web browser with dashboards... " -noNewLine - foreach($Row in $Table) { - $Name = $Row.NAME - $URL = $Row.URL - Write-Host "$Name Β· " -noNewline - & "$PSScriptRoot/open-default-browser.ps1" "$URL" - Start-Sleep -milliseconds 50 + Write-Host "⏳ (1/2) Loading Data/web-dashboards.csv..." + $table = Import-CSV "$PSScriptRoot/../Data/web-dashboards.csv" + $numRows = $table.Length + Write-Host "⏳ (2/2) Launching web browser with tabs of " -noNewline + foreach($row in $table) { + Write-Host "$($row.NAME) Β· " -noNewline + & "$PSScriptRoot/open-default-browser.ps1" "$($row.URL)" + Start-Sleep -milliseconds 100 } Write-Host "" [int]$elapsed = $stopWatch.Elapsed.TotalSeconds - "Hint: use switch-tabs.ps1 to switch the browser tabs automatically" - "βœ… Opened $NumRows dashboards in $elapsed sec" + "βœ… Opened $NumRows web dashboards in $elapsed sec (Hint: use 'switch-tabs.ps1' to switch between the tabs automatically)" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Docs/open-deep-l-translator.md b/Docs/open-deep-l-translator.md index 131f30fd..0df208db 100644 --- a/Docs/open-deep-l-translator.md +++ b/Docs/open-deep-l-translator.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser with the DeepL Translator websit ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-deep-l-translator.ps1 [] +open-deep-l-translator.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-default-browser.md b/Docs/open-default-browser.md index 02021615..1ebb7ee4 100644 --- a/Docs/open-default-browser.md +++ b/Docs/open-default-browser.md @@ -4,7 +4,7 @@ This PowerShell script launches the default Web browser, optional with a given U ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-default-browser.ps1 [[-URL] ] [] +open-default-browser.ps1 [[-URL] ] [] -URL Specifies the URL diff --git a/Docs/open-desktop-folder.md b/Docs/open-desktop-folder.md index 704d16d9..5e4b5597 100644 --- a/Docs/open-desktop-folder.md +++ b/Docs/open-desktop-folder.md @@ -4,7 +4,7 @@ This PowerShell script launches the File Explorer with the user's desktop folder ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-desktop-folder.ps1 [] +open-desktop-folder.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-documents-folder.md b/Docs/open-documents-folder.md index 5b0f2f0e..c1cea776 100644 --- a/Docs/open-documents-folder.md +++ b/Docs/open-documents-folder.md @@ -4,7 +4,7 @@ This PowerShell script launches the File Explorer with the user's documents fold ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-documents-folder.ps1 [] +open-documents-folder.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-downloads-folder.md b/Docs/open-downloads-folder.md index 90b0759e..964e7aa7 100644 --- a/Docs/open-downloads-folder.md +++ b/Docs/open-downloads-folder.md @@ -4,7 +4,7 @@ This PowerShell script launches the File Explorer showing the user's downloads f ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-downloads-folder.ps1 [] +open-downloads-folder.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-dropbox-folder.md b/Docs/open-dropbox-folder.md index 84e4ae13..427492b2 100644 --- a/Docs/open-dropbox-folder.md +++ b/Docs/open-dropbox-folder.md @@ -4,7 +4,7 @@ This PowerShell script launches the File Explorer with the user's Dropbox folder ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-dropbox-folder.ps1 [] +open-dropbox-folder.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-duck-duck-go.md b/Docs/open-duck-duck-go.md index 4cc2682c..4c1927c1 100644 --- a/Docs/open-duck-duck-go.md +++ b/Docs/open-duck-duck-go.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser with the DuckDuckGo website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-duck-duck-go.ps1 [] +open-duck-duck-go.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-e-drive.md b/Docs/open-e-drive.md index 17f7ea65..2e766779 100644 --- a/Docs/open-e-drive.md +++ b/Docs/open-e-drive.md @@ -4,7 +4,7 @@ This PowerShell script launches the File Explorer with the E: drive folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-e-drive.ps1 [] +open-e-drive.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-edge.md b/Docs/open-edge.md index faa06cca..e2b9fcdd 100644 --- a/Docs/open-edge.md +++ b/Docs/open-edge.md @@ -4,7 +4,7 @@ This PowerShell script launches the Microsoft Edge Web browser. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-edge.ps1 [] +open-edge.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-egg-timer.md b/Docs/open-egg-timer.md index c0180fea..301e01c2 100644 --- a/Docs/open-egg-timer.md +++ b/Docs/open-egg-timer.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser with the eggtimer website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-egg-timer.ps1 [] +open-egg-timer.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-email-client.md b/Docs/open-email-client.md index 45e3183d..385c1985 100644 --- a/Docs/open-email-client.md +++ b/Docs/open-email-client.md @@ -4,7 +4,7 @@ This PowerShell script launches the default email client. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-email-client.ps1 [] +open-email-client.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-f-drive.md b/Docs/open-f-drive.md index 09ffb3f7..39451847 100644 --- a/Docs/open-f-drive.md +++ b/Docs/open-f-drive.md @@ -4,7 +4,7 @@ This PowerShell script launches the File Explorer with the F: drive folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-f-drive.ps1 [] +open-f-drive.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-file-explorer.md b/Docs/open-file-explorer.md index 9bd5a976..d09d1750 100644 --- a/Docs/open-file-explorer.md +++ b/Docs/open-file-explorer.md @@ -4,7 +4,7 @@ This PowerShell script launches the File Explorer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-file-explorer.ps1 [[-Path] ] [] +open-file-explorer.ps1 [[-Path] ] [] -Path Specifies the path to the folder to display diff --git a/Docs/open-fire-place.md b/Docs/open-fire-place.md index 9f7d33b5..867c63cc 100644 --- a/Docs/open-fire-place.md +++ b/Docs/open-fire-place.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser with a fire place website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-fire-place.ps1 [] +open-fire-place.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-firefox.md b/Docs/open-firefox.md index 7ee7caff..c71b4242 100644 --- a/Docs/open-firefox.md +++ b/Docs/open-firefox.md @@ -4,7 +4,7 @@ This PowerShell script launches the Mozilla Firefox Web browser. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-firefox.ps1 [[-URL] ] [] +open-firefox.ps1 [[-URL] ] [] -URL Specifies an URL diff --git a/Docs/open-flight-radar.md b/Docs/open-flight-radar.md index ce09cdc4..0cafcfa4 100644 --- a/Docs/open-flight-radar.md +++ b/Docs/open-flight-radar.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser with the FlightRadar24 website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-flight-radar.ps1 [] +open-flight-radar.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-g-drive.md b/Docs/open-g-drive.md index 2dd0282e..be2b48b2 100644 --- a/Docs/open-g-drive.md +++ b/Docs/open-g-drive.md @@ -4,7 +4,7 @@ This PowerShell script launches the File Explorer with the G: drive folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-g-drive.ps1 [] +open-g-drive.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-google-books.md b/Docs/open-google-books.md index 90e9fb09..cf61a7ea 100644 --- a/Docs/open-google-books.md +++ b/Docs/open-google-books.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser with the Google Books website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-google-books.ps1 [] +open-google-books.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-google-calendar.md b/Docs/open-google-calendar.md index cb70ef17..cd45701e 100644 --- a/Docs/open-google-calendar.md +++ b/Docs/open-google-calendar.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser with the Google Calendar website ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-google-calendar.ps1 [] +open-google-calendar.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-google-contacts.md b/Docs/open-google-contacts.md index ffae9061..3e50736c 100644 --- a/Docs/open-google-contacts.md +++ b/Docs/open-google-contacts.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser with the Google Contacts website ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-google-contacts.ps1 [] +open-google-contacts.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-google-docs.md b/Docs/open-google-docs.md index 23f6ae43..45a8ce8d 100644 --- a/Docs/open-google-docs.md +++ b/Docs/open-google-docs.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser with the Google Docs website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-google-docs.ps1 [] +open-google-docs.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-google-earth.md b/Docs/open-google-earth.md index ae800878..68a523ae 100644 --- a/Docs/open-google-earth.md +++ b/Docs/open-google-earth.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser with the Google Earth website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-google-earth.ps1 [] +open-google-earth.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-google-mail.md b/Docs/open-google-mail.md index 46e70639..4e6e9e64 100644 --- a/Docs/open-google-mail.md +++ b/Docs/open-google-mail.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser with the Google Mail website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-google-mail.ps1 [] +open-google-mail.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-google-maps.md b/Docs/open-google-maps.md index 365663c1..e9269acb 100644 --- a/Docs/open-google-maps.md +++ b/Docs/open-google-maps.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser with the Google Maps website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-google-maps.ps1 [] +open-google-maps.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-google-news.md b/Docs/open-google-news.md index 7db52a6b..548d4588 100644 --- a/Docs/open-google-news.md +++ b/Docs/open-google-news.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser with the Google News website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-google-news.ps1 [] +open-google-news.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-google-photos.md b/Docs/open-google-photos.md index fbc16929..505ab2da 100644 --- a/Docs/open-google-photos.md +++ b/Docs/open-google-photos.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser with the Google Photos website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-google-photos.ps1 [] +open-google-photos.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-google-play.md b/Docs/open-google-play.md index 382ad82b..b6e3c580 100644 --- a/Docs/open-google-play.md +++ b/Docs/open-google-play.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser with the Google Play website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-google-play.ps1 [] +open-google-play.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-google-search.md b/Docs/open-google-search.md index dea1160e..aa33512b 100644 --- a/Docs/open-google-search.md +++ b/Docs/open-google-search.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser with the Google Search website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-google-search.ps1 [] +open-google-search.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-google-stadia.md b/Docs/open-google-stadia.md index a77ade3e..7550d510 100644 --- a/Docs/open-google-stadia.md +++ b/Docs/open-google-stadia.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser with the Google Stadia website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-google-stadia.ps1 [] +open-google-stadia.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-google-translate.md b/Docs/open-google-translate.md index 12311549..81058f7e 100644 --- a/Docs/open-google-translate.md +++ b/Docs/open-google-translate.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser with the Google Translate websit ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-google-translate.ps1 [] +open-google-translate.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-home-folder.md b/Docs/open-home-folder.md index 5086a2c7..8c6dbf8a 100644 --- a/Docs/open-home-folder.md +++ b/Docs/open-home-folder.md @@ -4,7 +4,7 @@ This script launches the File Explorer with the user's home folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-home-folder.ps1 [] +open-home-folder.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-internet-archive.md b/Docs/open-internet-archive.md index ac394197..856051fa 100644 --- a/Docs/open-internet-archive.md +++ b/Docs/open-internet-archive.md @@ -4,7 +4,7 @@ This script launches the Web browser with the Internet Archive website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-internet-archive.ps1 [] +open-internet-archive.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-jitsi-meet.md b/Docs/open-jitsi-meet.md index 81227954..2f70015a 100644 --- a/Docs/open-jitsi-meet.md +++ b/Docs/open-jitsi-meet.md @@ -4,7 +4,7 @@ This script launches the Web browser with the Jitsi Meet website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-jitsi-meet.ps1 [] +open-jitsi-meet.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-m-drive.md b/Docs/open-m-drive.md index 9fd8e427..93193bb8 100644 --- a/Docs/open-m-drive.md +++ b/Docs/open-m-drive.md @@ -4,7 +4,7 @@ This script launches the File Explorer with the M: drive folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-m-drive.ps1 [] +open-m-drive.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-magnifier.md b/Docs/open-magnifier.md index b6e60761..af2a94d8 100644 --- a/Docs/open-magnifier.md +++ b/Docs/open-magnifier.md @@ -4,7 +4,7 @@ This script launches the Windows Screen Magnifier application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-magnifier.ps1 [] +open-magnifier.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-microsoft-paint.md b/Docs/open-microsoft-paint.md index 012483f0..8adcdcb7 100644 --- a/Docs/open-microsoft-paint.md +++ b/Docs/open-microsoft-paint.md @@ -4,7 +4,7 @@ This script launches the Microsoft Paint application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-microsoft-paint.ps1 [] +open-microsoft-paint.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-microsoft-solitaire.md b/Docs/open-microsoft-solitaire.md index 7e1a8576..259437f6 100644 --- a/Docs/open-microsoft-solitaire.md +++ b/Docs/open-microsoft-solitaire.md @@ -4,7 +4,7 @@ This script launches the Microsoft Solitaire application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-microsoft-solitaire.ps1 [] +open-microsoft-solitaire.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-microsoft-store.md b/Docs/open-microsoft-store.md index 31bd582e..ce750cf9 100644 --- a/Docs/open-microsoft-store.md +++ b/Docs/open-microsoft-store.md @@ -4,7 +4,7 @@ This script launches the Microsoft Store application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-microsoft-store.ps1 [] +open-microsoft-store.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-microsoft-teams.md b/Docs/open-microsoft-teams.md index aa5c13e1..798b7cdc 100644 --- a/Docs/open-microsoft-teams.md +++ b/Docs/open-microsoft-teams.md @@ -4,7 +4,7 @@ This script launches the Microsoft Teams application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-microsoft-teams.ps1 [] +open-microsoft-teams.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-music-folder.md b/Docs/open-music-folder.md index 0a9c84e8..d0559514 100644 --- a/Docs/open-music-folder.md +++ b/Docs/open-music-folder.md @@ -4,7 +4,7 @@ This script launches the File Explorer with the user's music folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-music-folder.ps1 [] +open-music-folder.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-netflix.md b/Docs/open-netflix.md index a5967f80..782effae 100644 --- a/Docs/open-netflix.md +++ b/Docs/open-netflix.md @@ -4,7 +4,7 @@ This script launches the Netflix application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-netflix.ps1 [] +open-netflix.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-note-pad.md b/Docs/open-note-pad.md index ce565e31..71c9a0e7 100644 --- a/Docs/open-note-pad.md +++ b/Docs/open-note-pad.md @@ -4,7 +4,7 @@ This script launches the Notepad application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-note-pad.ps1 [] +open-note-pad.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-office-365.md b/Docs/open-office-365.md index d2a087bd..3391ac12 100644 --- a/Docs/open-office-365.md +++ b/Docs/open-office-365.md @@ -4,7 +4,7 @@ This script launches the Web browser with the Microsoft Office 365 website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-office-365.ps1 [] +open-office-365.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-one-drive-folder.md b/Docs/open-one-drive-folder.md index bb6dd842..f1cfa14f 100644 --- a/Docs/open-one-drive-folder.md +++ b/Docs/open-one-drive-folder.md @@ -4,7 +4,7 @@ This script launches the File Explorer with the user's OneDrive folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-one-drive-folder.ps1 [] +open-one-drive-folder.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-paint-three-d.md b/Docs/open-paint-three-d.md index 5904fbcd..7958b6c7 100644 --- a/Docs/open-paint-three-d.md +++ b/Docs/open-paint-three-d.md @@ -4,7 +4,7 @@ This script launches the Paint 3D application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-paint-three-d.ps1 [] +open-paint-three-d.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-pictures-folder.md b/Docs/open-pictures-folder.md index 303288bd..27491128 100644 --- a/Docs/open-pictures-folder.md +++ b/Docs/open-pictures-folder.md @@ -4,7 +4,7 @@ This script launches the File Explorer with the user's pictures folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-pictures-folder.ps1 [] +open-pictures-folder.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-recycle-bin-folder.md b/Docs/open-recycle-bin-folder.md index aa122a35..eee81105 100644 --- a/Docs/open-recycle-bin-folder.md +++ b/Docs/open-recycle-bin-folder.md @@ -4,7 +4,7 @@ This script launches the File Explorer with the user's recycle bin folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-recycle-bin-folder.ps1 [] +open-recycle-bin-folder.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-remote-desktop.md b/Docs/open-remote-desktop.md index e78d1ae6..1f98306b 100644 --- a/Docs/open-remote-desktop.md +++ b/Docs/open-remote-desktop.md @@ -4,7 +4,7 @@ This script launches the Remote Desktop application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-remote-desktop.ps1 [] +open-remote-desktop.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-repos-folder.md b/Docs/open-repos-folder.md index 8214f962..3a152f14 100644 --- a/Docs/open-repos-folder.md +++ b/Docs/open-repos-folder.md @@ -4,7 +4,7 @@ This script launches the File Explorer with the user's Git repositories folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-repos-folder.ps1 [] +open-repos-folder.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-screen-clip.md b/Docs/open-screen-clip.md index e27ea6fa..6962d883 100644 --- a/Docs/open-screen-clip.md +++ b/Docs/open-screen-clip.md @@ -4,7 +4,7 @@ This script launches the Screen Clip application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-screen-clip.ps1 [] +open-screen-clip.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-screen-sketch.md b/Docs/open-screen-sketch.md index be16d7de..d7d12332 100644 --- a/Docs/open-screen-sketch.md +++ b/Docs/open-screen-sketch.md @@ -4,7 +4,7 @@ This script launches the Screen Sketch application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-screen-sketch.ps1 [] +open-screen-sketch.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-skype.md b/Docs/open-skype.md index 03ca201d..bcde9d3d 100644 --- a/Docs/open-skype.md +++ b/Docs/open-skype.md @@ -4,7 +4,7 @@ This script launches the Skype application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-skype.ps1 [] +open-skype.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-snipping-tool.md b/Docs/open-snipping-tool.md index f93cd1cd..8dd40632 100644 --- a/Docs/open-snipping-tool.md +++ b/Docs/open-snipping-tool.md @@ -4,7 +4,7 @@ This script launches the Snipping Tool application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-snipping-tool.ps1 [] +open-snipping-tool.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-speed-test.md b/Docs/open-speed-test.md index c2842291..87f43f2c 100644 --- a/Docs/open-speed-test.md +++ b/Docs/open-speed-test.md @@ -4,7 +4,7 @@ This script launches the Web browser with Cloudflare's speed test website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-speed-test.ps1 [] +open-speed-test.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-spotify.md b/Docs/open-spotify.md index 3b5af88e..02db12c6 100644 --- a/Docs/open-spotify.md +++ b/Docs/open-spotify.md @@ -4,7 +4,7 @@ This script launches the Spotify application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-spotify.ps1 [] +open-spotify.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-stack-overflow.md b/Docs/open-stack-overflow.md index d318114e..cc96dc11 100644 --- a/Docs/open-stack-overflow.md +++ b/Docs/open-stack-overflow.md @@ -4,7 +4,7 @@ This script launches the Web browser with the Stack Overflow website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-stack-overflow.ps1 [] +open-stack-overflow.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-start-page.md b/Docs/open-start-page.md index 2c18e8d2..103df9fd 100644 --- a/Docs/open-start-page.md +++ b/Docs/open-start-page.md @@ -4,7 +4,7 @@ This script launches the Web browser with the Startpage website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-start-page.ps1 [] +open-start-page.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-street-map.md b/Docs/open-street-map.md index 2daaff0c..67cb2e38 100644 --- a/Docs/open-street-map.md +++ b/Docs/open-street-map.md @@ -4,7 +4,7 @@ This script launches the Web browser with the OpenStreetMap website. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-street-map.ps1 [] +open-street-map.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-task-manager.md b/Docs/open-task-manager.md index a00e2383..6d67174b 100644 --- a/Docs/open-task-manager.md +++ b/Docs/open-task-manager.md @@ -4,7 +4,7 @@ This script launches the Windows Task Manager application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-task-manager.ps1 [] +open-task-manager.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-three-d-viewer.md b/Docs/open-three-d-viewer.md index b7d89664..2b71a822 100644 --- a/Docs/open-three-d-viewer.md +++ b/Docs/open-three-d-viewer.md @@ -4,7 +4,7 @@ This script launches the 3D-Viewer application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-three-d-viewer.ps1 [] +open-three-d-viewer.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-videos-folders.md b/Docs/open-videos-folders.md index 7ae357c7..25625d42 100644 --- a/Docs/open-videos-folders.md +++ b/Docs/open-videos-folders.md @@ -4,7 +4,7 @@ This script launches the File Explorer with the user's videos folder. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-videos-folders.ps1 [] +open-videos-folders.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-vpn-settings.md b/Docs/open-vpn-settings.md index 7d4bd644..98816207 100644 --- a/Docs/open-vpn-settings.md +++ b/Docs/open-vpn-settings.md @@ -4,7 +4,7 @@ This PowerShell script launches the VPN settings of Windows. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-vpn-settings.ps1 [] +open-vpn-settings.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-windows-defender.md b/Docs/open-windows-defender.md index 7de4c237..2350ea38 100644 --- a/Docs/open-windows-defender.md +++ b/Docs/open-windows-defender.md @@ -4,7 +4,7 @@ This script launches the Windows Defender application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-windows-defender.ps1 [] +open-windows-defender.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-windows-terminal.md b/Docs/open-windows-terminal.md index e8f029ba..f63ff679 100644 --- a/Docs/open-windows-terminal.md +++ b/Docs/open-windows-terminal.md @@ -4,7 +4,7 @@ This script launches the Windows Terminal application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-windows-terminal.ps1 [] +open-windows-terminal.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/open-xing.md b/Docs/open-xing.md index 01517f3f..7e067f5c 100644 --- a/Docs/open-xing.md +++ b/Docs/open-xing.md @@ -4,7 +4,7 @@ This script launches the XING application. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/open-xing.ps1 [] +open-xing.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/pick-commit.md b/Docs/pick-commit.md index 4a4b4144..066ac066 100644 --- a/Docs/pick-commit.md +++ b/Docs/pick-commit.md @@ -5,7 +5,7 @@ NOTE: in case of merge conflicts the script stops immediately! ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/pick-commit.ps1 [[-CommitID] ] [[-CommitMessage] ] [[-Branches] ] [[-RepoDir] ] [] +pick-commit.ps1 [[-CommitID] ] [[-CommitMessage] ] [[-Branches] ] [[-RepoDir] ] [] -CommitID Specifies the commit ID diff --git a/Docs/ping-weather.md b/Docs/ping-weather.md index 70ade086..82693a2e 100644 --- a/Docs/ping-weather.md +++ b/Docs/ping-weather.md @@ -4,7 +4,7 @@ This PowerShell script continuously shows the current weather conditions (simila ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/ping-weather.ps1 [[-Location] ] [[-UpdateInterval] ] [] +ping-weather.ps1 [[-Location] ] [[-UpdateInterval] ] [] -Location Specifies the location to use (determined automatically per default) diff --git a/Docs/play-bee-sound.md b/Docs/play-bee-sound.md index 67ef1c17..bc3465f0 100644 --- a/Docs/play-bee-sound.md +++ b/Docs/play-bee-sound.md @@ -4,7 +4,7 @@ This PowerShell script plays a bee sound. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-bee-sound.ps1 [] +play-bee-sound.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-beep-sound.md b/Docs/play-beep-sound.md index 823f519c..c63b1a70 100644 --- a/Docs/play-beep-sound.md +++ b/Docs/play-beep-sound.md @@ -4,7 +4,7 @@ This PowerShell script plays a short beep sound. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-beep-sound.ps1 [] +play-beep-sound.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-cat-sound.md b/Docs/play-cat-sound.md index 94c31db1..2ce5e1e9 100644 --- a/Docs/play-cat-sound.md +++ b/Docs/play-cat-sound.md @@ -4,7 +4,7 @@ This PowerShell script plays a cat sound. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-cat-sound.ps1 [] +play-cat-sound.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-cow-sound.md b/Docs/play-cow-sound.md index 883e032b..6541880b 100644 --- a/Docs/play-cow-sound.md +++ b/Docs/play-cow-sound.md @@ -4,7 +4,7 @@ This PowerShell script plays a cow sound. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-cow-sound.ps1 [] +play-cow-sound.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-dog-sound.md b/Docs/play-dog-sound.md index ef8a910e..ed964e8e 100644 --- a/Docs/play-dog-sound.md +++ b/Docs/play-dog-sound.md @@ -4,7 +4,7 @@ This PowerShell script plays a dog sound. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-dog-sound.ps1 [] +play-dog-sound.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-donkey-sound.md b/Docs/play-donkey-sound.md index 581d5b5b..98a169a2 100644 --- a/Docs/play-donkey-sound.md +++ b/Docs/play-donkey-sound.md @@ -4,7 +4,7 @@ This PowerShell script plays a donkey sound. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-donkey-sound.ps1 [] +play-donkey-sound.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-elephant-sound.md b/Docs/play-elephant-sound.md index b79bd489..726d1b07 100644 --- a/Docs/play-elephant-sound.md +++ b/Docs/play-elephant-sound.md @@ -4,7 +4,7 @@ This PowerShell script plays an elephant sound. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-elephant-sound.ps1 [] +play-elephant-sound.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-elk-sound.md b/Docs/play-elk-sound.md index 542439e0..e96952a8 100644 --- a/Docs/play-elk-sound.md +++ b/Docs/play-elk-sound.md @@ -4,7 +4,7 @@ This PowerShell script plays an elk sound. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-elk-sound.ps1 [] +play-elk-sound.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-files.md b/Docs/play-files.md index c4a2a542..f5c6164b 100644 --- a/Docs/play-files.md +++ b/Docs/play-files.md @@ -4,7 +4,7 @@ This PowerShell script plays the given audio files (supporting MP3 and WAV forma ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-files.ps1 [[-FilePattern] ] [] +play-files.ps1 [[-FilePattern] ] [] -FilePattern Specifies the file pattern diff --git a/Docs/play-frog-sound.md b/Docs/play-frog-sound.md index d2145d00..acef8234 100644 --- a/Docs/play-frog-sound.md +++ b/Docs/play-frog-sound.md @@ -4,7 +4,7 @@ This PowerShell script plays a frog sound. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-frog-sound.ps1 [] +play-frog-sound.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-goat-sound.md b/Docs/play-goat-sound.md index 36b3a3cc..7c14907c 100644 --- a/Docs/play-goat-sound.md +++ b/Docs/play-goat-sound.md @@ -4,7 +4,7 @@ This PowerShell script plays a goat sound. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-goat-sound.ps1 [] +play-goat-sound.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-gorilla-sound.md b/Docs/play-gorilla-sound.md index be870f1c..78627826 100644 --- a/Docs/play-gorilla-sound.md +++ b/Docs/play-gorilla-sound.md @@ -4,7 +4,7 @@ This PowerShell script plays a gorilla sound. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-gorilla-sound.ps1 [] +play-gorilla-sound.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-happy-birthday.md b/Docs/play-happy-birthday.md index 43aa4695..6c331e99 100644 --- a/Docs/play-happy-birthday.md +++ b/Docs/play-happy-birthday.md @@ -4,7 +4,7 @@ This PowerShell script plays the famous Happy Birthday song. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-happy-birthday.ps1 [] +play-happy-birthday.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-horse-sound.md b/Docs/play-horse-sound.md index 5f7928fc..8fde8dc7 100644 --- a/Docs/play-horse-sound.md +++ b/Docs/play-horse-sound.md @@ -4,7 +4,7 @@ This PowerShell script plays a horse sound. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-horse-sound.ps1 [] +play-horse-sound.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-imperial-march.md b/Docs/play-imperial-march.md index 92d07c1b..d1800b44 100644 --- a/Docs/play-imperial-march.md +++ b/Docs/play-imperial-march.md @@ -4,7 +4,7 @@ This PowerShell script plays the Imperial March used in the Star Wars film serie ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-imperial-march.ps1 [] +play-imperial-march.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-jingle-bells.md b/Docs/play-jingle-bells.md index ea4c5c2d..2dc73d67 100644 --- a/Docs/play-jingle-bells.md +++ b/Docs/play-jingle-bells.md @@ -4,7 +4,7 @@ This PowerShell script plays the famous Jingle Bells song. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-jingle-bells.ps1 [] +play-jingle-bells.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-lion-sound.md b/Docs/play-lion-sound.md index e1a47466..0c48f6bc 100644 --- a/Docs/play-lion-sound.md +++ b/Docs/play-lion-sound.md @@ -4,7 +4,7 @@ This PowerShell script plays a lion sound. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-lion-sound.ps1 [] +play-lion-sound.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-m3u.md b/Docs/play-m3u.md index de4a3e17..5a5b1f23 100644 --- a/Docs/play-m3u.md +++ b/Docs/play-m3u.md @@ -4,7 +4,7 @@ This PowerShell script plays the given playlist (in .M3U file format) ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-m3u.ps1 [[-filename] ] [] +play-m3u.ps1 [[-filename] ] [] -filename Specifies the path to the playlist diff --git a/Docs/play-mission-impossible.md b/Docs/play-mission-impossible.md index 66a40c72..738bdf3e 100644 --- a/Docs/play-mission-impossible.md +++ b/Docs/play-mission-impossible.md @@ -4,7 +4,7 @@ This PowerShell script plays the Mission Impossible theme. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-mission-impossible.ps1 [] +play-mission-impossible.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-mp3.md b/Docs/play-mp3.md index 522e5555..683fe2b4 100644 --- a/Docs/play-mp3.md +++ b/Docs/play-mp3.md @@ -4,7 +4,7 @@ This PowerShell script plays a sound file in .MP3 file format. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-mp3.ps1 [[-Path] ] [] +play-mp3.ps1 [[-Path] ] [] -Path Specifies the path to the .MP3 file diff --git a/Docs/play-parrot-sound.md b/Docs/play-parrot-sound.md index 78da28a0..25ea6d84 100644 --- a/Docs/play-parrot-sound.md +++ b/Docs/play-parrot-sound.md @@ -4,7 +4,7 @@ This PowerShell script plays a parrot sound. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-parrot-sound.ps1 [] +play-parrot-sound.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-pig-sound.md b/Docs/play-pig-sound.md index e96a82d9..483408d0 100644 --- a/Docs/play-pig-sound.md +++ b/Docs/play-pig-sound.md @@ -4,7 +4,7 @@ This PowerShell script plays a pig sound. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-pig-sound.ps1 [] +play-pig-sound.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-rattlesnake-sound.md b/Docs/play-rattlesnake-sound.md index 5c76f132..37a264a6 100644 --- a/Docs/play-rattlesnake-sound.md +++ b/Docs/play-rattlesnake-sound.md @@ -4,7 +4,7 @@ This PowerShell script plays a rattlesnake sound. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-rattlesnake-sound.ps1 [] +play-rattlesnake-sound.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-super-mario.md b/Docs/play-super-mario.md index 0b7e359b..b8c2c2d1 100644 --- a/Docs/play-super-mario.md +++ b/Docs/play-super-mario.md @@ -4,7 +4,7 @@ This PowerShell script plays the Super Mario intro. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-super-mario.ps1 [] +play-super-mario.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-tetris-melody.md b/Docs/play-tetris-melody.md index c4b9430b..57edfb06 100644 --- a/Docs/play-tetris-melody.md +++ b/Docs/play-tetris-melody.md @@ -4,7 +4,7 @@ This PowerShell script plays the Tetris melody. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-tetris-melody.ps1 [] +play-tetris-melody.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-vulture-sound.md b/Docs/play-vulture-sound.md index 8cfe4e01..ed9713e5 100644 --- a/Docs/play-vulture-sound.md +++ b/Docs/play-vulture-sound.md @@ -4,7 +4,7 @@ This PowerShell script plays a vulture sound. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-vulture-sound.ps1 [] +play-vulture-sound.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/play-wolf-sound.md b/Docs/play-wolf-sound.md index 586621c5..662a7d21 100644 --- a/Docs/play-wolf-sound.md +++ b/Docs/play-wolf-sound.md @@ -4,7 +4,7 @@ This PowerShell script plays a wolf sound. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/play-wolf-sound.ps1 [] +play-wolf-sound.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/poweroff.md b/Docs/poweroff.md index d57be483..de37ec6a 100644 --- a/Docs/poweroff.md +++ b/Docs/poweroff.md @@ -4,7 +4,7 @@ This script halts the local computer immediately (needs admin rights). ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/poweroff.ps1 [] +poweroff.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/print-image.md b/Docs/print-image.md index 55114957..10d75b0d 100644 --- a/Docs/print-image.md +++ b/Docs/print-image.md @@ -4,7 +4,7 @@ This PowerShell script shows the printer dialogue to print the given image file. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/print-image.ps1 [[-Path] ] [] +print-image.ps1 [[-Path] ] [] -Path Specifies the path to the image file diff --git a/Docs/publish-to-ipfs.md b/Docs/publish-to-ipfs.md index c47d7e8f..6320d393 100644 --- a/Docs/publish-to-ipfs.md +++ b/Docs/publish-to-ipfs.md @@ -4,7 +4,7 @@ This script publishes the given files and folders to IPFS. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/publish-to-ipfs.ps1 [[-FilePattern] ] [[-HashList] ] [[-DF_Hashes] ] [] +publish-to-ipfs.ps1 [[-FilePattern] ] [[-HashList] ] [[-DF_Hashes] ] [] -FilePattern Specifies the file pattern diff --git a/Docs/pull-repo.md b/Docs/pull-repo.md index 6f7ea222..dfd85291 100644 --- a/Docs/pull-repo.md +++ b/Docs/pull-repo.md @@ -4,7 +4,7 @@ This PowerShell script pulls the latest updates into a local Git repository (inc ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/pull-repo.ps1 [[-RepoDir] ] [] +pull-repo.ps1 [[-RepoDir] ] [] -RepoDir Specifies the file path to the local Git repository (default is working directory) diff --git a/Docs/pull-repos.md b/Docs/pull-repos.md index 86c49160..f55978ff 100644 --- a/Docs/pull-repos.md +++ b/Docs/pull-repos.md @@ -4,7 +4,7 @@ This PowerShell script pulls updates for all Git repositories in a folder (inclu ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/pull-repos.ps1 [[-ParentDir] ] [] +pull-repos.ps1 [[-ParentDir] ] [] -ParentDir Specifies the path to the parent folder diff --git a/Docs/query-smart-data.md b/Docs/query-smart-data.md index a58ccdec..33d660d5 100644 --- a/Docs/query-smart-data.md +++ b/Docs/query-smart-data.md @@ -6,7 +6,7 @@ Queries the S.M.A.R.T. data of your HDD/SSD's and saves it to the current/given ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/query-smart-data.ps1 [[-Directory] ] [] +query-smart-data.ps1 [[-Directory] ] [] -Directory Specifies the path to the target directory diff --git a/Docs/reboot-fritzbox.md b/Docs/reboot-fritzbox.md index e2d20e4a..934af35d 100644 --- a/Docs/reboot-fritzbox.md +++ b/Docs/reboot-fritzbox.md @@ -4,7 +4,7 @@ This PowerShell script reboots the FRITZ!Box device ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/reboot-fritzbox.ps1 [[-Username] ] [[-Password] ] [] +reboot-fritzbox.ps1 [[-Username] ] [[-Password] ] [] -Username Specifies the user name diff --git a/Docs/reboot.md b/Docs/reboot.md index a388df0b..70d8e7ac 100644 --- a/Docs/reboot.md +++ b/Docs/reboot.md @@ -4,7 +4,7 @@ This PowerShell script reboots the local computer immediately (needs admin right ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/reboot.ps1 [] +reboot.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/remind-me.md b/Docs/remind-me.md index cf88f7a7..215c0de0 100644 --- a/Docs/remind-me.md +++ b/Docs/remind-me.md @@ -4,7 +4,7 @@ This PowerShell script creates a scheduled task that will display a popup messag ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/remind-me.ps1 [[-Message] ] [[-Time] ] [] +remind-me.ps1 [[-Message] ] [[-Time] ] [] -Message diff --git a/Docs/remove-empty-dirs.md b/Docs/remove-empty-dirs.md index d644b523..1632be2d 100644 --- a/Docs/remove-empty-dirs.md +++ b/Docs/remove-empty-dirs.md @@ -4,7 +4,7 @@ This PowerShell script removes all empty subfolders within a directory tree. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/remove-empty-dirs.ps1 [[-DirTree] ] [] +remove-empty-dirs.ps1 [[-DirTree] ] [] -DirTree Specifies the path to the directory tree diff --git a/Docs/remove-old-dirs.md b/Docs/remove-old-dirs.md index 25aedc33..017794e8 100644 --- a/Docs/remove-old-dirs.md +++ b/Docs/remove-old-dirs.md @@ -1,13 +1,13 @@ ## The *remove-old-dirs.ps1* Script -This PowerShell script removes any directory in a given folder older than (using last write time). +This PowerShell script removes any subfolder in a parent folder older than (using last write time). ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/remove-old-dirs.ps1 [[-path] ] [[-numDays] ] [] +remove-old-dirs.ps1 [[-path] ] [[-numDays] ] [] -path - Specifies the file path to the folder + Specifies the file path to the parent folder Required? false Position? 1 @@ -44,9 +44,9 @@ Author: Markus Fleschutz .SYNOPSIS Removes old directories .DESCRIPTION - This PowerShell script removes any directory in a given folder older than (using last write time). + This PowerShell script removes any subfolder in a parent folder older than (using last write time). .PARAMETER path - Specifies the file path to the folder + Specifies the file path to the parent folder .PARAMETER numDays Specifies the number of days (1000 by default) .EXAMPLE @@ -59,32 +59,31 @@ param([string]$path = "", [int]$numDays = 1000) try { $stopWatch = [system.diagnostics.stopwatch]::startNew() - if ("$path" -eq "") { $path = Read-Host "Enter the file path to the directory" } + if ("$path" -eq "") { $path = Read-Host "Enter the file path to the parent folder" } if (!(Test-Path -Path "$path" -PathType container)) { throw "Given path doesn't exist - enter a valid path, please" } - Write-Progress "Removing old directories in $path..." - $folders = Get-ChildItem -Path "$path" -Directory + Write-Host "⏳ Removing subfolders older than $numDays days in $path..." + $folders = Get-ChildItem -path "$path" -directory $numRemoved = 0 $count = 0 foreach ($folder in $folders) { [datetime]$folderDate = ($folder | Get-ItemProperty -Name LastWriteTime).LastWriteTime $count++ if ($folderDate -lt (Get-Date).AddDays(-$numDays)) { - Write-Host "#$($count): Removing old '$folder'..." - $fullPath = $folder | Select-Object -ExpandProperty FullName - Remove-Item -Path $fullPath -Force -Recurse + Write-Host "($($count)) Removing old '$folder'..." + $fullPath = $folder | Select-Object -ExpandProperty FullName + Remove-Item -path "$fullPath" -force -recurse $numRemoved++ - } else { - Write-Host "#$($count): Skipping young '$folder'..." + } else { + Write-Host "($($count)) Skipping young '$folder'..." } - } - Write-Progress -completed "." + } [int]$elapsed = $stopWatch.Elapsed.TotalSeconds - Write-Host "Removed $numRemoved of $count directories older than $numDays days at $path in $elapsed sec" + "βœ”οΈ Removed $numRemoved of $count subfolders older than $numDays days in $elapsed sec" exit 0 # success } catch { - Write-Error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" - exit 1 # failure + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 } ``` diff --git a/Docs/remove-print-jobs.md b/Docs/remove-print-jobs.md index 9dce0dd4..6a414358 100644 --- a/Docs/remove-print-jobs.md +++ b/Docs/remove-print-jobs.md @@ -4,7 +4,7 @@ This PowerShell script removes all print jobs from all printer devices. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/remove-print-jobs.ps1 [] +remove-print-jobs.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/remove-tag.md b/Docs/remove-tag.md index d543b55f..b25c6336 100644 --- a/Docs/remove-tag.md +++ b/Docs/remove-tag.md @@ -4,7 +4,7 @@ This PowerShell script removes a Git tag, either locally, remote, or both. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/remove-tag.ps1 [[-TagName] ] [[-Mode] ] [[-RepoDir] ] [] +remove-tag.ps1 [[-TagName] ] [[-Mode] ] [[-RepoDir] ] [] -TagName Specifies the Git tag name diff --git a/Docs/replace-in-files.md b/Docs/replace-in-files.md index aa1be040..d42c73b7 100644 --- a/Docs/replace-in-files.md +++ b/Docs/replace-in-files.md @@ -4,7 +4,7 @@ This PowerShell script searches and replaces a pattern in the given files by the ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/replace-in-files.ps1 [[-pattern] ] [[-replacement] ] [[-files] ] [] +replace-in-files.ps1 [[-pattern] ] [[-replacement] ] [[-files] ] [] -pattern Specifies the pattern to look for diff --git a/Docs/restart-network-adapters.md b/Docs/restart-network-adapters.md index f197c5dd..64927928 100644 --- a/Docs/restart-network-adapters.md +++ b/Docs/restart-network-adapters.md @@ -4,7 +4,7 @@ This PowerShell script restarts all local network adapters (needs admin rights). ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/restart-network-adapters.ps1 [] +restart-network-adapters.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/roll-a-dice.md b/Docs/roll-a-dice.md index 5045fe8d..83ed7d83 100644 --- a/Docs/roll-a-dice.md +++ b/Docs/roll-a-dice.md @@ -4,7 +4,7 @@ This PowerShell script rolls a dice and returns the number by text-to-speech (TT ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/roll-a-dice.ps1 [] +roll-a-dice.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/save-screenshot.md b/Docs/save-screenshot.md index 5113037d..d3bb3626 100644 --- a/Docs/save-screenshot.md +++ b/Docs/save-screenshot.md @@ -4,7 +4,7 @@ This PowerShell script takes a single screenshot and saves it into a target fold ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/save-screenshot.ps1 [[-TargetFolder] ] [] +save-screenshot.ps1 [[-TargetFolder] ] [] -TargetFolder Specifies the target folder (the user's screenshots folder by default) diff --git a/Docs/scan-ports.md b/Docs/scan-ports.md index 11a46b61..a8b09d9a 100644 --- a/Docs/scan-ports.md +++ b/Docs/scan-ports.md @@ -4,7 +4,7 @@ This PowerShell script scans the network for open or closed ports. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/scan-ports.ps1 [] +scan-ports.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/search-filename.md b/Docs/search-filename.md index e5b8a586..08d90cea 100644 --- a/Docs/search-filename.md +++ b/Docs/search-filename.md @@ -5,7 +5,7 @@ After you pass in a root folder and a search term, the script will list all file ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/search-filename.ps1 [-path] [-term] [] +search-filename.ps1 [-path] [-term] [] -path Specifies the path diff --git a/Docs/search-files.md b/Docs/search-files.md index 31a6af48..9bb561fb 100644 --- a/Docs/search-files.md +++ b/Docs/search-files.md @@ -4,7 +4,7 @@ This PowerShell script searches for a pattern in the given files. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/search-files.ps1 [[-pattern] ] [[-files] ] [] +search-files.ps1 [[-pattern] ] [[-files] ] [] -pattern Specifies the search pattern diff --git a/Docs/send-email.md b/Docs/send-email.md index 4fa90dce..f0e1e40b 100644 --- a/Docs/send-email.md +++ b/Docs/send-email.md @@ -4,7 +4,7 @@ This PowerShell script sends an email message. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/send-email.ps1 [[-From] ] [[-To] ] [[-Subject] ] [[-Body] ] [[-SMTPServer] ] [] +send-email.ps1 [[-From] ] [[-To] ] [[-Subject] ] [[-Body] ] [[-SMTPServer] ] [] -From Specifies the sender email address diff --git a/Docs/send-tcp.md b/Docs/send-tcp.md index 182ff251..ffa1590b 100644 --- a/Docs/send-tcp.md +++ b/Docs/send-tcp.md @@ -4,7 +4,7 @@ This PowerShell script sends a TCP message to the given IP address and port. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/send-tcp.ps1 [[-TargetIP] ] [[-TargetPort] ] [[-Message] ] [] +send-tcp.ps1 [[-TargetIP] ] [[-TargetPort] ] [[-Message] ] [] -TargetIP Specifies the target IP address diff --git a/Docs/send-udp.md b/Docs/send-udp.md index 04e78c9c..f3c5155c 100644 --- a/Docs/send-udp.md +++ b/Docs/send-udp.md @@ -4,7 +4,7 @@ This PowerShell script sends a UDP datagram message to an IP address and port. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/send-udp.ps1 [[-TargetIP] ] [[-TargetPort] ] [[-Message] ] [] +send-udp.ps1 [[-TargetIP] ] [[-TargetPort] ] [[-Message] ] [] -TargetIP Specifies the target IP address diff --git a/Docs/set-profile.md b/Docs/set-profile.md index b65cd72b..86549524 100644 --- a/Docs/set-profile.md +++ b/Docs/set-profile.md @@ -4,7 +4,7 @@ This PowerShell script sets the PowerShell profile for the current user. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/set-profile.ps1 [] +set-profile.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/set-timer.md b/Docs/set-timer.md index 02fd4df4..85c3b214 100644 --- a/Docs/set-timer.md +++ b/Docs/set-timer.md @@ -4,7 +4,7 @@ This PowerShell script sets a timer for a countdown. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/set-timer.ps1 [[-Seconds] ] [] +set-timer.ps1 [[-Seconds] ] [] -Seconds Specifies the number of seconds diff --git a/Docs/set-volume.md b/Docs/set-volume.md index ee3183a8..1258552c 100644 --- a/Docs/set-volume.md +++ b/Docs/set-volume.md @@ -4,7 +4,7 @@ This PowerShell script sets the audio volume in percent. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/set-volume.ps1 [-Volume] [] +set-volume.ps1 [-Volume] [] -Volume Specifies the percent number diff --git a/Docs/set-wallpaper.md b/Docs/set-wallpaper.md index c47f47fd..fe834825 100644 --- a/Docs/set-wallpaper.md +++ b/Docs/set-wallpaper.md @@ -4,7 +4,7 @@ This PowerShell script sets the given image file as desktop wallpaper (.JPG or . ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/set-wallpaper.ps1 [[-ImageFile] ] [[-Style] ] [] +set-wallpaper.ps1 [[-ImageFile] ] [[-Style] ] [] -ImageFile Specifies the path to the image file diff --git a/Docs/show-lightnings.md b/Docs/show-lightnings.md index 9a07893e..57b392ff 100644 --- a/Docs/show-lightnings.md +++ b/Docs/show-lightnings.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser and shows lightnings in OpenStre ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/show-lightnings.ps1 [] +show-lightnings.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/show-notification.md b/Docs/show-notification.md index fe718403..1e8b91d8 100644 --- a/Docs/show-notification.md +++ b/Docs/show-notification.md @@ -4,7 +4,7 @@ This PowerShell script shows a toast-message notification for the Windows 10 Not ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/show-notification.ps1 [[-Text] ] [[-Title] ] [[-Duration] ] [] +show-notification.ps1 [[-Text] ] [[-Title] ] [[-Duration] ] [] -Text diff --git a/Docs/show-traffic.md b/Docs/show-traffic.md index 89dc8abc..b2e56249 100644 --- a/Docs/show-traffic.md +++ b/Docs/show-traffic.md @@ -4,7 +4,7 @@ This PowerShell script launches the Web browser with MSN showing the current tra ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/show-traffic.ps1 [] +show-traffic.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/simulate-presence.md b/Docs/simulate-presence.md index 5e7f6b85..96e7fe01 100644 --- a/Docs/simulate-presence.md +++ b/Docs/simulate-presence.md @@ -4,7 +4,7 @@ This PowerShell script simulates the human presence against burglars. It switche ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/simulate-presence.ps1 [[-IPaddress] ] [] +simulate-presence.ps1 [[-IPaddress] ] [] -IPaddress Specifies the IP address of the Shelly1 device diff --git a/Docs/smart-data2csv.md b/Docs/smart-data2csv.md index be6dad96..d595b457 100644 --- a/Docs/smart-data2csv.md +++ b/Docs/smart-data2csv.md @@ -5,7 +5,7 @@ to a CSV table for analysis (use query-smart-data.ps1 to generate those JSON fil ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/smart-data2csv.ps1 [[-Directory] ] [] +smart-data2csv.ps1 [[-Directory] ] [] -Directory Specifies the path to the directory diff --git a/Docs/speak-arabic.md b/Docs/speak-arabic.md index 59089d60..b24ab503 100644 --- a/Docs/speak-arabic.md +++ b/Docs/speak-arabic.md @@ -4,7 +4,7 @@ This PowerShell script speaks the given text with an Arabic text-to-speech (TTS) ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-arabic.ps1 [[-text] ] [] +speak-arabic.ps1 [[-text] ] [] -text Specifies the text to speak diff --git a/Docs/speak-checklist.md b/Docs/speak-checklist.md index 77aad187..c3e68566 100644 --- a/Docs/speak-checklist.md +++ b/Docs/speak-checklist.md @@ -4,7 +4,7 @@ This PowerShell script speaks the given checklist by text-to-speech (TTS). ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-checklist.ps1 [[-Name] ] [] +speak-checklist.ps1 [[-Name] ] [] -Name Specifies the name of the checklist diff --git a/Docs/speak-countdown.md b/Docs/speak-countdown.md index 52301a8c..eab262d0 100644 --- a/Docs/speak-countdown.md +++ b/Docs/speak-countdown.md @@ -4,7 +4,7 @@ This PowerShell script speaks a countdown by text-to-speech (TTS) starting from ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-countdown.ps1 [[-StartNumber] ] [] +speak-countdown.ps1 [[-StartNumber] ] [] -StartNumber Specifies the number to start from (10 by default) diff --git a/Docs/speak-danish.md b/Docs/speak-danish.md index a8eec83b..b579ab47 100644 --- a/Docs/speak-danish.md +++ b/Docs/speak-danish.md @@ -4,7 +4,7 @@ This PowerShell script speaks the given text with a Danish text-to-speech (TTS) ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-danish.ps1 [[-text] ] [] +speak-danish.ps1 [[-text] ] [] -text Specifies the text to speak diff --git a/Docs/speak-dutch.md b/Docs/speak-dutch.md index 32e1ab46..d2947461 100644 --- a/Docs/speak-dutch.md +++ b/Docs/speak-dutch.md @@ -4,7 +4,7 @@ This PowerShell script speaks the given text with a Dutch text-to-speech (TTS) v ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-dutch.ps1 [[-text] ] [] +speak-dutch.ps1 [[-text] ] [] -text Specifies the text to speak diff --git a/Docs/speak-english.md b/Docs/speak-english.md index 2f08a3f0..9f8aeb6b 100644 --- a/Docs/speak-english.md +++ b/Docs/speak-english.md @@ -4,7 +4,7 @@ This PowerShell scripts speaks the given text with an English text-to-speech (TT ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-english.ps1 [[-text] ] [] +speak-english.ps1 [[-text] ] [] -text Specifies the text to speak diff --git a/Docs/speak-epub.md b/Docs/speak-epub.md index 406b1d5c..3dfcfb9e 100644 --- a/Docs/speak-epub.md +++ b/Docs/speak-epub.md @@ -4,7 +4,7 @@ This PowerShell script speaks the content of the given Epub file by text-to-spee ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-epub.ps1 [[-Filename] ] [] +speak-epub.ps1 [[-Filename] ] [] -Filename Specifies the path to the Epub file diff --git a/Docs/speak-file.md b/Docs/speak-file.md index c6d42d11..0bdb9a0e 100644 --- a/Docs/speak-file.md +++ b/Docs/speak-file.md @@ -4,7 +4,7 @@ This PowerShell script speaks the content of the given text file by text-to-spee ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-file.ps1 [[-File] ] [] +speak-file.ps1 [[-File] ] [] -File Specifies the path to the text file diff --git a/Docs/speak-french.md b/Docs/speak-french.md index afd15f4f..edb4b7cd 100644 --- a/Docs/speak-french.md +++ b/Docs/speak-french.md @@ -4,7 +4,7 @@ This PowerShell script speaks the given text with a French text-to-speech (TTS) ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-french.ps1 [[-text] ] [] +speak-french.ps1 [[-text] ] [] -text Specifies the text to speak diff --git a/Docs/speak-german.md b/Docs/speak-german.md index 08fabce5..cb56843b 100644 --- a/Docs/speak-german.md +++ b/Docs/speak-german.md @@ -4,7 +4,7 @@ This PowerShell script speaks the given text with a German text-to-speech (TTS) ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-german.ps1 [[-text] ] [] +speak-german.ps1 [[-text] ] [] -text Specifies the text to speak diff --git a/Docs/speak-greek.md b/Docs/speak-greek.md index 42934f90..cfd978cd 100644 --- a/Docs/speak-greek.md +++ b/Docs/speak-greek.md @@ -4,7 +4,7 @@ This PowerShell script speaks the given text with a Greek text-to-speech (TTS) v ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-greek.ps1 [[-text] ] [] +speak-greek.ps1 [[-text] ] [] -text Specifies the text to speak diff --git a/Docs/speak-hindi.md b/Docs/speak-hindi.md index 4f4be845..8ffcdf90 100644 --- a/Docs/speak-hindi.md +++ b/Docs/speak-hindi.md @@ -4,7 +4,7 @@ This PowerShell script speaks the given text with a Hindi text-to-speech (TTS) v ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-hindi.ps1 [[-text] ] [] +speak-hindi.ps1 [[-text] ] [] -text Specifies the text to speak diff --git a/Docs/speak-italian.md b/Docs/speak-italian.md index 483e02b9..58f20c0d 100644 --- a/Docs/speak-italian.md +++ b/Docs/speak-italian.md @@ -4,7 +4,7 @@ This PowerShell script speaks the given text with an Italian text-to-speech (TTS ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-italian.ps1 [[-text] ] [] +speak-italian.ps1 [[-text] ] [] -text Specifies the text to speak diff --git a/Docs/speak-japanese.md b/Docs/speak-japanese.md index c7382d14..4402ae38 100644 --- a/Docs/speak-japanese.md +++ b/Docs/speak-japanese.md @@ -4,7 +4,7 @@ This PowerShell script speaks the given text with a Japanese text-to-speech (TTS ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-japanese.ps1 [[-text] ] [] +speak-japanese.ps1 [[-text] ] [] -text Specifies the text to speak diff --git a/Docs/speak-latin.md b/Docs/speak-latin.md index 883b445a..d88fab8e 100644 --- a/Docs/speak-latin.md +++ b/Docs/speak-latin.md @@ -4,7 +4,7 @@ This PowerShell script speaks the given text with a Latin text-to-speech (TTS) v ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-latin.ps1 [[-text] ] [] +speak-latin.ps1 [[-text] ] [] -text Specifies the text to speak diff --git a/Docs/speak-mandarin.md b/Docs/speak-mandarin.md index 7b2f7c3a..eb0d423c 100644 --- a/Docs/speak-mandarin.md +++ b/Docs/speak-mandarin.md @@ -4,7 +4,7 @@ This PowerShell script speaks the given text with a Mandarin text-to-speech (TTS ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-mandarin.ps1 [[-text] ] [] +speak-mandarin.ps1 [[-text] ] [] -text Specifies the text to speak diff --git a/Docs/speak-polish.md b/Docs/speak-polish.md index acf32cbe..148efaa4 100644 --- a/Docs/speak-polish.md +++ b/Docs/speak-polish.md @@ -4,7 +4,7 @@ This PowerShell script speaks the given text with a Polish text-to-speech (TTS) ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-polish.ps1 [[-text] ] [] +speak-polish.ps1 [[-text] ] [] -text Specifies the text to speak diff --git a/Docs/speak-portuguese.md b/Docs/speak-portuguese.md index 1f003931..fd7d5ed5 100644 --- a/Docs/speak-portuguese.md +++ b/Docs/speak-portuguese.md @@ -4,7 +4,7 @@ This PowerShell script speaks the given text with a Portuguese text-to-speech (T ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-portuguese.ps1 [[-text] ] [] +speak-portuguese.ps1 [[-text] ] [] -text Specifies the text to speak diff --git a/Docs/speak-spanish.md b/Docs/speak-spanish.md index 3f06d94b..127d6a9c 100644 --- a/Docs/speak-spanish.md +++ b/Docs/speak-spanish.md @@ -4,7 +4,7 @@ This PowerShell script speaks the given text with a Spanish text-to-speech (TTS) ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-spanish.ps1 [[-text] ] [] +speak-spanish.ps1 [[-text] ] [] -text Specifies the text to speak diff --git a/Docs/speak-swedish.md b/Docs/speak-swedish.md index 7ff85d52..08f2feb8 100644 --- a/Docs/speak-swedish.md +++ b/Docs/speak-swedish.md @@ -4,7 +4,7 @@ This PowerShell script speaks the given text with a Swedish text-to-speech (TTS) ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-swedish.ps1 [[-text] ] [] +speak-swedish.ps1 [[-text] ] [] -text Specifies the text to speak diff --git a/Docs/speak-text.md b/Docs/speak-text.md index 744b8d94..3c459799 100644 --- a/Docs/speak-text.md +++ b/Docs/speak-text.md @@ -4,7 +4,7 @@ This PowerShell script speaks the given text by the default text-to-speech (TTS) ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-text.ps1 [[-text] ] [] +speak-text.ps1 [[-text] ] [] -text Specifies the text to read diff --git a/Docs/speak-turkish.md b/Docs/speak-turkish.md index 8d8f985a..1295380d 100644 --- a/Docs/speak-turkish.md +++ b/Docs/speak-turkish.md @@ -4,7 +4,7 @@ This PowerShell script speaks the given text with a Turkish text-to-speech (TTS) ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-turkish.ps1 [[-text] ] [] +speak-turkish.ps1 [[-text] ] [] -text Specifies the text to speak diff --git a/Docs/speak-ukrainian.md b/Docs/speak-ukrainian.md index a982cb88..45ace2b7 100644 --- a/Docs/speak-ukrainian.md +++ b/Docs/speak-ukrainian.md @@ -4,7 +4,7 @@ This PowerShell script speaks the given text with a Ukrainian text-to-speech (TT ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/speak-ukrainian.ps1 [[-text] ] [] +speak-ukrainian.ps1 [[-text] ] [] -text Specifies the text to speak diff --git a/Docs/spell-word.md b/Docs/spell-word.md index cdd3b597..37934322 100644 --- a/Docs/spell-word.md +++ b/Docs/spell-word.md @@ -4,7 +4,7 @@ This PowerShell script spells the given word by text-to-speech (TTS). ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/spell-word.ps1 [[-word] ] [] +spell-word.ps1 [[-word] ] [] -word Specifies the word to spell diff --git a/Docs/start-ipfs-server.md b/Docs/start-ipfs-server.md index dd26e3c1..d3dc3484 100644 --- a/Docs/start-ipfs-server.md +++ b/Docs/start-ipfs-server.md @@ -4,7 +4,7 @@ This PowerShell script starts a local IPFS server as a daemon process. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/start-ipfs-server.ps1 [] +start-ipfs-server.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/suspend.md b/Docs/suspend.md index 49edd412..5d322083 100644 --- a/Docs/suspend.md +++ b/Docs/suspend.md @@ -4,7 +4,7 @@ This PowerShell script suspends the local computer immediately. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/suspend.ps1 [] +suspend.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/switch-branch.md b/Docs/switch-branch.md index 19eac306..f2d3997b 100644 --- a/Docs/switch-branch.md +++ b/Docs/switch-branch.md @@ -4,7 +4,7 @@ This PowerShell script switches to another branch in a Git repository (including ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/switch-branch.ps1 [[-BranchName] ] [[-RepoDir] ] [] +switch-branch.ps1 [[-BranchName] ] [[-RepoDir] ] [] -BranchName Specifies the branch name diff --git a/Docs/switch-shelly1.md b/Docs/switch-shelly1.md index 7e5405b3..0f380c5b 100644 --- a/Docs/switch-shelly1.md +++ b/Docs/switch-shelly1.md @@ -4,7 +4,7 @@ This PowerShell script switches a Shelly1 device in the local network. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/switch-shelly1.ps1 [[-Host] ] [[-TurnMode] ] [[-Timer] ] [] +switch-shelly1.ps1 [[-Host] ] [[-TurnMode] ] [[-Timer] ] [] -Host Specifies either the hostname or IP address of the Shelly1 device diff --git a/Docs/switch-tabs.md b/Docs/switch-tabs.md index 12a2ab43..5af7f898 100644 --- a/Docs/switch-tabs.md +++ b/Docs/switch-tabs.md @@ -4,7 +4,7 @@ This PowerShell script switches browser tabs automatically every seconds (by ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/switch-tabs.ps1 [[-Interval] ] [] +switch-tabs.ps1 [[-Interval] ] [] -Interval Specifies the switch interval in seconds (10 sec per default) diff --git a/Docs/sync-repo.md b/Docs/sync-repo.md index 45f10dee..0d2816c5 100644 --- a/Docs/sync-repo.md +++ b/Docs/sync-repo.md @@ -4,7 +4,7 @@ This PowerShell script synchronizes a local Git repository by push and pull (inc ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/sync-repo.ps1 [[-RepoDir] ] [] +sync-repo.ps1 [[-RepoDir] ] [] -RepoDir Specifies the path to the Git repository diff --git a/Docs/tell-joke.md b/Docs/tell-joke.md index d360805f..5693809d 100644 --- a/Docs/tell-joke.md +++ b/Docs/tell-joke.md @@ -4,7 +4,7 @@ This PowerShell script selects a random Chuck Norris joke in Data/jokes.csv and ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/tell-joke.ps1 [] +tell-joke.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/tell-quote.md b/Docs/tell-quote.md index 1d7aa166..66f509f7 100644 --- a/Docs/tell-quote.md +++ b/Docs/tell-quote.md @@ -4,7 +4,7 @@ This PowerShell script selects a random quote in Data/quotes.csv and speaks it b ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/tell-quote.ps1 [] +tell-quote.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/toggle-caps-lock.md b/Docs/toggle-caps-lock.md index 72682688..9a381038 100644 --- a/Docs/toggle-caps-lock.md +++ b/Docs/toggle-caps-lock.md @@ -4,7 +4,7 @@ This PowerShell script toggles the Caps Lock key state. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/toggle-caps-lock.ps1 [] +toggle-caps-lock.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/toggle-num-lock.md b/Docs/toggle-num-lock.md index c6c3f2ec..ecc6a268 100644 --- a/Docs/toggle-num-lock.md +++ b/Docs/toggle-num-lock.md @@ -4,7 +4,7 @@ This PowerShell script toggles the Num Lock key state. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/toggle-num-lock.ps1 [] +toggle-num-lock.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/toggle-scroll-lock.md b/Docs/toggle-scroll-lock.md index 1014489e..029f297a 100644 --- a/Docs/toggle-scroll-lock.md +++ b/Docs/toggle-scroll-lock.md @@ -4,7 +4,7 @@ This PowerShell script toggles the Scroll Lock key state. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/toggle-scroll-lock.ps1 [] +toggle-scroll-lock.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/translate-file.md b/Docs/translate-file.md index ffbb849d..e5a6d03a 100644 --- a/Docs/translate-file.md +++ b/Docs/translate-file.md @@ -1,13 +1,13 @@ ## The *translate-file.ps1* Script -This PowerShell script translates a text file into another language. +This PowerShell script translates the given text file into another language and writes the output on the console. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/translate-file.ps1 [[-File] ] [[-SourceLang] ] [[-TargetLang] ] [] +translate-file.ps1 [[-File] ] [[-SourceLang] ] [[-TargetLang] ] [] -File - Specifies the file to translate + Specifies the path to the file to be translated Required? false Position? 1 @@ -56,9 +56,9 @@ https://github.com/fleschutz/PowerShell .SYNOPSIS Translates a text file into another language .DESCRIPTION - This PowerShell script translates a text file into another language. + This PowerShell script translates the given text file into another language and writes the output on the console. .PARAMETER File - Specifies the file to translate + Specifies the path to the file to be translated .PARAMETER SourceLang Specifies the source language .PARAMETER TargetLang @@ -75,25 +75,25 @@ param([string]$File = "", [string]$SourceLang = "", [string]$TargetLang = "") function UseLibreTranslate { param([string]$Text, [string]$SourceLang, [string]$TargetLang) $Parameters = @{"q"="$Text"; "source"="$SourceLang"; "target"="$TargetLang"; } - $Result = (Invoke-WebRequest -Uri https://libretranslate.com/translate -Method POST -Body ($Parameters|ConvertTo-Json) -ContentType "application/json").content | ConvertFrom-Json - Start-Sleep -milliseconds 3000 # 20 requests per minute maximum + $Result = (Invoke-WebRequest -Uri https://libretranslate.de/translate -Method POST -Body ($Parameters|ConvertTo-Json) -ContentType "application/json" -useBasicParsing).content | ConvertFrom-Json + Start-Sleep -seconds 6 # 10 requests per minute maximum return $Result.translatedText } try { - if ($File -eq "" ) { $File = read-host "Enter path to file" } - if ($SourceLang -eq "" ) { $SourceLang = read-host "Enter language used in this file" } - if ($TargetLang -eq "" ) { $TargetLang = read-host "Enter language to translate to" } + if ($File -eq "" ) { $File = Read-Host "Enter the file path" } + if ($SourceLang -eq "" ) { $SourceLang = Read-Host "Enter the source language" } + if ($TargetLang -eq "" ) { $TargetLang = Read-Host "Enter the target language" } $Lines = Get-Content -path $File foreach($Line in $Lines) { - if ("$Line" -eq "") { write-output "$Line"; continue } - if ("$Line" -eq " ") { write-output "$Line"; continue } - if ("$Line" -like "===*") { write-output "$Line"; continue } - if ("$Line" -like "---*") { write-output "$Line"; continue } - if ("$Line" -like "!*(/*)") { write-output "$Line"; continue } + if ("$Line" -eq "") { Write-Output "$Line"; continue } + if ("$Line" -eq " ") { Write-Output "$Line"; continue } + if ("$Line" -like "===*") { Write-Output "$Line"; continue } + if ("$Line" -like "---*") { Write-Output "$Line"; continue } + if ("$Line" -like "!*(/*)") { Write-Output "$Line"; continue } $Result = UseLibreTranslate $Line $SourceLang $TargetLang - write-output $Result + Write-Output $Result } exit 0 # success } catch { diff --git a/Docs/translate-files.md b/Docs/translate-files.md index 088ce95d..fdf64d2e 100644 --- a/Docs/translate-files.md +++ b/Docs/translate-files.md @@ -1,13 +1,13 @@ ## The *translate-files.ps1* Script -This PowerShell script translates text files into any supported language. +This PowerShell script translates text files into multiple languages. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/translate-files.ps1 [[-FilePattern] ] [] +translate-files.ps1 [[-filePattern] ] [] --FilePattern - Specifies the file pattern +-filePattern + Specifies the file pattern of the text file(s) to be translated Required? false Position? 1 @@ -38,9 +38,9 @@ https://github.com/fleschutz/PowerShell .SYNOPSIS Translates text files .DESCRIPTION - This PowerShell script translates text files into any supported language. -.PARAMETER FilePattern - Specifies the file pattern + This PowerShell script translates text files into multiple languages. +.PARAMETER filePattern + Specifies the file pattern of the text file(s) to be translated .EXAMPLE PS> ./translate-files C:\Temp\*.txt .LINK @@ -49,34 +49,46 @@ https://github.com/fleschutz/PowerShell Author: Markus Fleschutz | License: CC0 #> -param([string]$FilePattern = "") +param([string]$filePattern = "") function DetectSourceLang { param([string]$Filename) - if ("$Filename" -like "*Deutsch*") { return "de" } - if ("$Filename" -like "*English*") { return "en" } - if ("$Filename" -like "*FranΓ§ais*") { return "fr" } + if ("$Filename" -like "*-Deutsch*") { return "de" } + if ("$Filename" -like "*-English*") { return "en" } + if ("$Filename" -like "*-EspaΓ±ol*") { return "es" } + if ("$Filename" -like "*-FranΓ§ais*") { return "fr" } + if ("$Filename" -like "*-Portuguese*") { return "pt" } return "unknown" } function TranslateFilename { param([string]$Filename, [string]$SourceLang, [string]$TargetLang) [string]$SourceLanguage = "" - if ($SourceLang -eq "de") { $SourceLanguage = "Deutsch" } - if ($SourceLang -eq "en") { $SourceLanguage = "English" } - if ($SourceLang -eq "fr") { $SourceLanguage = "FranΓ§ais" } - $TargetLanguage = ("$PSScriptRoot/translate-text.ps1 $SourceLanguage $SourceLang $TargetLang") + if ($SourceLang -eq "de") { $SourceLanguage = "-Deutsch" } + if ($SourceLang -eq "en") { $SourceLanguage = "-English" } + if ($SourceLang -eq "es") { $SourceLanguage = "-EspaΓ±ol" } + if ($SourceLang -eq "fr") { $SourceLanguage = "-FranΓ§ais" } + if ($SourceLang -eq "pt") { $SourceLanguage = "-Portuguese" } + [string]$TargetLanguage = "-Unknown" + if ($TargetLang -eq "ar") { $TargetLanguage = "-Arabic" } + if ($TargetLang -eq "de") { $TargetLanguage = "-Deutsch" } + if ($TargetLang -eq "en") { $TargetLanguage = "-English" } + if ($TargetLang -eq "es") { $TargetLanguage = "-EspaΓ±ol" } + if ($TargetLang -eq "fr") { $TargetLanguage = "-FranΓ§ais" } + if ($TargetLang -eq "pt") { $TargetLanguage = "-Portuguese" } return $Filename.replace($SourceLanguage, $TargetLanguage) } try { - if ($FilePattern -eq "" ) { $FilePattern = read-host "Enter the file pattern" } + if ($filePattern -eq "" ) { $filePattern = Read-Host "Enter the file pattern of the text file(s) to be translated" } $TargetLanguages = "ar","zh","fr","de","hi","ga","it","ja","ko","pt","ru","es" - $SourceFiles = get-childItem -path "$FilePattern" + $SourceFiles = Get-ChildItem -path "$filePattern" foreach($SourceFile in $SourceFiles) { $SourceLang = DetectSourceLang $SourceFile foreach($TargetLang in $TargetLanguages) { if ($SourceLang -eq $TargetLang) { continue } + Write-Host "Translating $SourceFile from $SourceLang to $TargetLang ..." $TargetFile = TranslateFilename $SourceFile $SourceLang $TargetLang + Write-Host "$TargetFile" & "$PSScriptRoot/translate-file.ps1" $SourceFile $SourceLang $TargetLang > $TargetFile } } diff --git a/Docs/translate-text.md b/Docs/translate-text.md index a9cee467..7bca5f81 100644 --- a/Docs/translate-text.md +++ b/Docs/translate-text.md @@ -4,7 +4,7 @@ This PowerShell script translates text into other languages. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/translate-text.ps1 [[-Text] ] [[-SourceLangCode] ] [[-TargetLangCode] ] [] +translate-text.ps1 [[-Text] ] [[-SourceLangCode] ] [[-TargetLangCode] ] [] -Text Specifies the text to translate @@ -27,7 +27,7 @@ This PowerShell script translates text into other languages. Required? false Position? 3 - Default value any + Default value all Accept pipeline input? false Accept wildcard characters? false @@ -38,7 +38,7 @@ This PowerShell script translates text into other languages. ## Example ```powershell -PS> ./translate-text "Hello World" de en +PS> ./translate-text "Hello World" en all ``` @@ -58,37 +58,38 @@ https://github.com/fleschutz/PowerShell .PARAMETER Text Specifies the text to translate .PARAMETER SourceLang - Specifies the source language + Specifies the source language (English by default) .PARAMETER TargetLang - Specifies the target language + Specifies the target language (all by default) .EXAMPLE - PS> ./translate-text "Hello World" de en + PS> ./translate-text "Hello World" en all .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$Text = "", [string]$SourceLangCode = "en", [string]$TargetLangCode = "any") +param([string]$Text = "", [string]$SourceLangCode = "en", [string]$TargetLangCode = "all") function UseLibreTranslate { param([string]$Text, [string]$SourceLangCode, [string]$TargetLangCode) $Parameters = @{"q"="$Text"; "source"="$SourceLangCode"; "target"="$TargetLangCode"; } - $Result = (Invoke-WebRequest -Uri https://translate.mentality.rip/translate -Method POST -Body ($Parameters|ConvertTo-Json) -ContentType "application/json" -useBasicParsing).content | ConvertFrom-Json + $Result = (Invoke-WebRequest -Uri https://libretranslate.de/translate -Method POST -Body ($Parameters|ConvertTo-Json) -ContentType "application/json" -useBasicParsing).content | ConvertFrom-Json return $Result.translatedText } try { - if ($Text -eq "" ) { $Text = read-host "Enter text to translate" } + if ($Text -eq "" ) { $Text = Read-Host "Enter the text to translate" } - if ($TargetLangCode -eq "any") { + if ($TargetLangCode -eq "all") { $TargetLangCodes = "ar","de","es","fr","ga","hi","it","ja","ko","pt","ru","zh" foreach($TargetLangCode in $TargetLangCodes) { $Translation = UseLibreTranslate $Text $SourceLangCode $TargetLangCode - write-output "$($TargetLangCode): $Translation" + Write-Output "$($TargetLangCode): $Translation" + Start-Sleep -seconds 6 # 10 requests maximum per minute } } else { $Translation = UseLibreTranslate $Text $SourceLangCode $TargetLangCode - write-output "$Translation" + Write-Output "$Translation" } exit 0 # success } catch { diff --git a/Docs/turn-volume-down.md b/Docs/turn-volume-down.md index 642d6ed3..66c2fb9a 100644 --- a/Docs/turn-volume-down.md +++ b/Docs/turn-volume-down.md @@ -4,7 +4,7 @@ This PowerShell script turns the audio volume down (-10% by default). ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/turn-volume-down.ps1 [[-percent] ] [] +turn-volume-down.ps1 [[-percent] ] [] -percent Specifies the percent number diff --git a/Docs/turn-volume-fully-up.md b/Docs/turn-volume-fully-up.md index 4e924b31..947bb255 100644 --- a/Docs/turn-volume-fully-up.md +++ b/Docs/turn-volume-fully-up.md @@ -4,7 +4,7 @@ This PowerShell script turns the audio volume fully up to 100%. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/turn-volume-fully-up.ps1 [] +turn-volume-fully-up.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/turn-volume-off.md b/Docs/turn-volume-off.md index b57db690..5a9467cc 100644 --- a/Docs/turn-volume-off.md +++ b/Docs/turn-volume-off.md @@ -4,7 +4,7 @@ This PowerShell script mutes the default audio device immediately. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/turn-volume-off.ps1 [] +turn-volume-off.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/turn-volume-on.md b/Docs/turn-volume-on.md index 6ab3e6f5..eb9d5dfc 100644 --- a/Docs/turn-volume-on.md +++ b/Docs/turn-volume-on.md @@ -4,7 +4,7 @@ This PowerShell script immediately unmutes the audio output. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/turn-volume-on.ps1 [] +turn-volume-on.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/turn-volume-up.md b/Docs/turn-volume-up.md index 79749325..d647bfa2 100644 --- a/Docs/turn-volume-up.md +++ b/Docs/turn-volume-up.md @@ -4,7 +4,7 @@ This PowerShell script turns the audio volume up (+10% by default). ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/turn-volume-up.ps1 [[-percent] ] [] +turn-volume-up.ps1 [[-percent] ] [] -percent Specifies the percent number diff --git a/Docs/uninstall-all-apps.md b/Docs/uninstall-all-apps.md index fabd0d7a..0e2e3488 100644 --- a/Docs/uninstall-all-apps.md +++ b/Docs/uninstall-all-apps.md @@ -4,7 +4,7 @@ This PowerShell script uninstalls all applications from the local computer. Usef ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/uninstall-all-apps.ps1 [] +uninstall-all-apps.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/uninstall-bloatware.md b/Docs/uninstall-bloatware.md new file mode 100644 index 00000000..a982fee0 --- /dev/null +++ b/Docs/uninstall-bloatware.md @@ -0,0 +1,70 @@ +## The *uninstall-bloatware.ps1* Script + +uninstall-bloatware.ps1 + + +## Parameters +```powershell + + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +## Source Code +```powershell +"Removing System Applications..." +winget uninstall 'OMEN Audio Control' +winget uninstall 'OMEN Gaming Hub' +winget uninstall 'Clipchamp' +winget uninstall 'Cortana' +winget uninstall 'Microsoft News' +winget uninstall 'MSN Weather' +winget uninstall 'Get Help' +winget uninstall 'Microsoft Tips' +winget uninstall 'Office' +winget uninstall 'Microsoft.Office' +winget uninstall 'Microsoft Solitaire Collection' +winget uninstall 'Solitaire & Casual Games' +winget uninstall 'Microsoft Sticky Notes' +winget uninstall 'Paint' +winget uninstall 'Microsoft People' +winget uninstall 'Power Automate' +winget uninstall 'Microsoft To Do' +winget uninstall 'Microsoft Photos' +winget uninstall 'Windows Camera' +winget uninstall 'Windows Clock' +winget uninstall 'Windows Calculator' +winget uninstall 'Feedback Hub' +winget uninstall 'Windows Maps' +winget uninstall 'Windows Voice Recorder' +winget uninstall 'Your Phone' +winget uninstall 'Windows Media Player' +winget uninstall 'Movies & TV' +winget uninstall 'Microsoft Family' +winget uninstall 'Quick Assist' +winget uninstall 'Microsoft Teams' +winget uninstall 'Mail and Calendar' +winget uninstall 'Snipping Tool' + +"Removing Xbox associated applications..." +winget uninstall 'Xbox' +winget uninstall 'Xbox TCUI' +winget uninstall 'Xbox Game Bar Plugin' +winget uninstall 'Xbox Identity Provider' +winget uninstall 'Xbox Game Speech Window' + +"Removing miscellaneous Apps that crowd the Start Menu..." +winget uninstall 'Spotify Music' +winget uninstall 'Messenger' +winget uninstall 'Instagram' +winget uninstall 'Whatsapp' +winget uninstall 'Netflix' +winget uninstall 'LinkedIn' +winget uninstall 'Prime Video for Windows' + +exit 0 # success +``` + +*Generated by convert-ps2md.ps1 using the comment-based help of uninstall-bloatware.ps1* diff --git a/Docs/uninstall-crystal-disk-info.md b/Docs/uninstall-crystal-disk-info.md index a989b568..8f3dc485 100644 --- a/Docs/uninstall-crystal-disk-info.md +++ b/Docs/uninstall-crystal-disk-info.md @@ -4,7 +4,7 @@ This PowerShell script uninstalls CrystalDiskInfo from the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/uninstall-crystal-disk-info.ps1 [] +uninstall-crystal-disk-info.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/uninstall-crystal-disk-mark.md b/Docs/uninstall-crystal-disk-mark.md index f7a750d9..35b3a243 100644 --- a/Docs/uninstall-crystal-disk-mark.md +++ b/Docs/uninstall-crystal-disk-mark.md @@ -4,7 +4,7 @@ This PowerShell script uninstalls CrystalDiskMark from the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/uninstall-crystal-disk-mark.ps1 [] +uninstall-crystal-disk-mark.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/uninstall-discord.md b/Docs/uninstall-discord.md index ec9af862..3c3dcbbe 100644 --- a/Docs/uninstall-discord.md +++ b/Docs/uninstall-discord.md @@ -4,7 +4,7 @@ This PowerShell script uninstalls Discord from the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/uninstall-discord.ps1 [] +uninstall-discord.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/uninstall-edge.md b/Docs/uninstall-edge.md index 7a1f8398..1150eb2c 100644 --- a/Docs/uninstall-edge.md +++ b/Docs/uninstall-edge.md @@ -4,7 +4,7 @@ This PowerShell script uninstalls Microsoft Edge from the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/uninstall-edge.ps1 [] +uninstall-edge.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/uninstall-firefox.md b/Docs/uninstall-firefox.md index f77e52c1..09b0fe00 100644 --- a/Docs/uninstall-firefox.md +++ b/Docs/uninstall-firefox.md @@ -4,7 +4,7 @@ This PowerShell script uninstalls Mozilla Firefox from the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/uninstall-firefox.ps1 [] +uninstall-firefox.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/uninstall-git-extensions.md b/Docs/uninstall-git-extensions.md index 7e580683..0fe89fe6 100644 --- a/Docs/uninstall-git-extensions.md +++ b/Docs/uninstall-git-extensions.md @@ -4,7 +4,7 @@ This PowerShell script uninstalls Git Extensions from the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/uninstall-git-extensions.ps1 [] +uninstall-git-extensions.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/uninstall-irfanview.md b/Docs/uninstall-irfanview.md index 9cfd4c7c..a81d957b 100644 --- a/Docs/uninstall-irfanview.md +++ b/Docs/uninstall-irfanview.md @@ -4,7 +4,7 @@ This PowerShell script uninstalls IrfanView from the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/uninstall-irfanview.ps1 [] +uninstall-irfanview.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/uninstall-microsoft-teams.md b/Docs/uninstall-microsoft-teams.md index b4e288b8..ddff777c 100644 --- a/Docs/uninstall-microsoft-teams.md +++ b/Docs/uninstall-microsoft-teams.md @@ -4,7 +4,7 @@ This PowerShell script uninstalls Microsoft Teams from the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/uninstall-microsoft-teams.ps1 [] +uninstall-microsoft-teams.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/uninstall-netflix.md b/Docs/uninstall-netflix.md index 53b37242..28441b4f 100644 --- a/Docs/uninstall-netflix.md +++ b/Docs/uninstall-netflix.md @@ -4,7 +4,7 @@ This PowerShell script uninstalls Netflix from the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/uninstall-netflix.ps1 [] +uninstall-netflix.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/uninstall-nine-zip.md b/Docs/uninstall-nine-zip.md index 06e6d712..9c18be5b 100644 --- a/Docs/uninstall-nine-zip.md +++ b/Docs/uninstall-nine-zip.md @@ -4,7 +4,7 @@ This PowerShell script uninstalls 9 ZIP from the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/uninstall-nine-zip.ps1 [] +uninstall-nine-zip.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/uninstall-opera-browser.md b/Docs/uninstall-opera-browser.md index 50525c2b..ecba2d93 100644 --- a/Docs/uninstall-opera-browser.md +++ b/Docs/uninstall-opera-browser.md @@ -4,7 +4,7 @@ This PowerShell script uninstalls Opera Browser from the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/uninstall-opera-browser.ps1 [] +uninstall-opera-browser.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/uninstall-opera-gx.md b/Docs/uninstall-opera-gx.md index ab0d3f22..cd5ee92d 100644 --- a/Docs/uninstall-opera-gx.md +++ b/Docs/uninstall-opera-gx.md @@ -4,7 +4,7 @@ This PowerShell script uninstalls Opera GX from the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/uninstall-opera-gx.ps1 [] +uninstall-opera-gx.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/uninstall-paint-3d.md b/Docs/uninstall-paint-3d.md index 6a723fd6..40f0babc 100644 --- a/Docs/uninstall-paint-3d.md +++ b/Docs/uninstall-paint-3d.md @@ -4,7 +4,7 @@ This PowerShell script uninstalls Paint 3D from the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/uninstall-paint-3d.ps1 [] +uninstall-paint-3d.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/uninstall-rufus.md b/Docs/uninstall-rufus.md index 6ffa89aa..149fac25 100644 --- a/Docs/uninstall-rufus.md +++ b/Docs/uninstall-rufus.md @@ -4,7 +4,7 @@ This PowerShell script uninstalls Rufus from the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/uninstall-rufus.ps1 [] +uninstall-rufus.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/uninstall-skype.md b/Docs/uninstall-skype.md index 42315169..4d37abbd 100644 --- a/Docs/uninstall-skype.md +++ b/Docs/uninstall-skype.md @@ -4,7 +4,7 @@ This PowerShell script uninstalls Skype from the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/uninstall-skype.ps1 [] +uninstall-skype.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/uninstall-spotify.md b/Docs/uninstall-spotify.md index fdf273e1..e5f91135 100644 --- a/Docs/uninstall-spotify.md +++ b/Docs/uninstall-spotify.md @@ -4,7 +4,7 @@ This PowerShell script uninstalls Spotify from the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/uninstall-spotify.ps1 [] +uninstall-spotify.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/uninstall-twitter.md b/Docs/uninstall-twitter.md index bd7460b0..c18e799e 100644 --- a/Docs/uninstall-twitter.md +++ b/Docs/uninstall-twitter.md @@ -4,7 +4,7 @@ This PowerShell script uninstalls Twitter from the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/uninstall-twitter.ps1 [] +uninstall-twitter.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/uninstall-visual-studio-code.md b/Docs/uninstall-visual-studio-code.md index 0d70b5f4..57a4f60b 100644 --- a/Docs/uninstall-visual-studio-code.md +++ b/Docs/uninstall-visual-studio-code.md @@ -4,7 +4,7 @@ This PowerShell script uninstalls Visual Studio Code from the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/uninstall-visual-studio-code.ps1 [] +uninstall-visual-studio-code.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/uninstall-vlc.md b/Docs/uninstall-vlc.md index 95b7cbb3..29308234 100644 --- a/Docs/uninstall-vlc.md +++ b/Docs/uninstall-vlc.md @@ -4,7 +4,7 @@ This PowerShell script uninstalls the VLC media player from the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/uninstall-vlc.ps1 [] +uninstall-vlc.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/uninstall-windows-terminal.md b/Docs/uninstall-windows-terminal.md index 8225d3e1..31a6f08a 100644 --- a/Docs/uninstall-windows-terminal.md +++ b/Docs/uninstall-windows-terminal.md @@ -4,7 +4,7 @@ This PowerShell script uninstalls Windows Terminal from the local computer. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/uninstall-windows-terminal.ps1 [] +uninstall-windows-terminal.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/upgrade-ubuntu.md b/Docs/upgrade-ubuntu.md index 321ca722..3b3a527e 100644 --- a/Docs/upgrade-ubuntu.md +++ b/Docs/upgrade-ubuntu.md @@ -4,7 +4,7 @@ This PowerShell script upgrades Ubuntu Linux to the latest (LTS) release. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/upgrade-ubuntu.ps1 [] +upgrade-ubuntu.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/upload-file.md b/Docs/upload-file.md index 09d6f29f..97e0cc33 100644 --- a/Docs/upload-file.md +++ b/Docs/upload-file.md @@ -4,7 +4,7 @@ This PowerShell script uploads a local file to a FTP server. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/upload-file.ps1 [[-File] ] [[-URL] ] [[-Username] ] [[-Password] ] [] +upload-file.ps1 [[-File] ] [[-URL] ] [[-Username] ] [[-Password] ] [] -File Specifies the path to the local file diff --git a/Docs/upload-to-dropbox.md b/Docs/upload-to-dropbox.md index b7ab280e..571079ba 100644 --- a/Docs/upload-to-dropbox.md +++ b/Docs/upload-to-dropbox.md @@ -4,7 +4,7 @@ This PowerShell script uploads a local file to Dropbox. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/upload-to-dropbox.ps1 [-SourceFilePath] [] +upload-to-dropbox.ps1 [-SourceFilePath] [] -SourceFilePath diff --git a/Docs/wake-up.md b/Docs/wake-up.md index 5aeea3e5..50d053d5 100644 --- a/Docs/wake-up.md +++ b/Docs/wake-up.md @@ -1,10 +1,10 @@ ## The *wake-up.ps1* Script -This PowerShell script sends a magic UDP packet twice to a computer to wake him up (requires the target computer to have Wake-on-LAN activated). +This PowerShell script sends a magic UDP packet to a computer to wake him up (requires the target computer to have Wake-on-LAN activated). ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/wake-up.ps1 [[-MACaddress] ] [[-IPaddress] ] [[-Port] ] [[-NumRetries] ] [] +wake-up.ps1 [[-MACaddress] ] [[-IPaddress] ] [[-Port] ] [[-NumRetries] ] [] -MACaddress Specifies the host's MAC address (e.g. 11:22:33:44:55:66) @@ -65,7 +65,7 @@ https://github.com/fleschutz/PowerShell .SYNOPSIS Wakes up a computer using Wake-on-LAN .DESCRIPTION - This PowerShell script sends a magic UDP packet twice to a computer to wake him up (requires the target computer to have Wake-on-LAN activated). + This PowerShell script sends a magic UDP packet to a computer to wake him up (requires the target computer to have Wake-on-LAN activated). .PARAMETER MACaddress Specifies the host's MAC address (e.g. 11:22:33:44:55:66) .PARAMETER IPaddress @@ -97,15 +97,16 @@ function Send-WOL { param([string]$mac, [string]$ip, [int]$port) } try { - if ($MACaddress -eq "" ) { $MACaddress = Read-Host "Enter the host's MAC address (e.g. 11:22:33:44:55:66)" } - if ($IPaddress -eq "" ) { $IPaddress = Read-Host "Enter the host's IP address or subnet address (e.g. 192.168.0.255)" } + if ($MACaddress -eq "" ) { $MACaddress = Read-Host "Enter the host's MAC address, e.g. 11:22:33:44:55:66" } + if ($IPaddress -eq "" ) { $IPaddress = Read-Host "Enter the host's IP or subnet address, e.g. 192.168.0.255" } Send-WOL $MACaddress $IPaddress $Port for ($i = 0; $i -lt $NumRetries; $i++) { Start-Sleep -milliseconds 100 Send-WOL $MACaddress $IPaddress $Port } - "βœ”οΈ sent magic packet $MACaddress to IP $IPaddress on port $Port ($NumRetries retries)" + "βœ”οΈ sent magic packet with MAC $MACaddress to IP $IPaddress on port $Port as wakeup call ($($NumRetries + 1) times)" + " (Hint: wait a minute until the computer fully boots up)" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" diff --git a/Docs/weather-report.md b/Docs/weather-report.md index f8f61ec5..dbdf3d68 100644 --- a/Docs/weather-report.md +++ b/Docs/weather-report.md @@ -4,7 +4,7 @@ This PowerShell script lists the local weather report. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/weather-report.ps1 [[-GeoLocation] ] [] +weather-report.ps1 [[-GeoLocation] ] [] -GeoLocation Specifies the geographic location to use (determine automatically by default) diff --git a/Docs/weather.md b/Docs/weather.md index 764c30e2..abf69fc1 100644 --- a/Docs/weather.md +++ b/Docs/weather.md @@ -4,7 +4,7 @@ This PowerShell script lists the current weather forecast. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/weather.ps1 [[-GeoLocation] ] [] +weather.ps1 [[-GeoLocation] ] [] -GeoLocation Specifies the geographic location to use diff --git a/Docs/what-is.md b/Docs/what-is.md index e3f2f224..1dc03300 100644 --- a/Docs/what-is.md +++ b/Docs/what-is.md @@ -4,7 +4,7 @@ This PowerShell script queries the description of the given abbreviation and pri ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/what-is.ps1 [[-abbr] ] [] +what-is.ps1 [[-abbr] ] [] -abbr Specifies the abbreviation to look for @@ -61,7 +61,7 @@ try { foreach($Row in $Table) { if ($Row.ABBR -eq $abbr) { $Basename = (Get-Item "$File").Basename -Replace "_"," " - "πŸ’‘ $($Row.ABBR) in $Basename refers to: $($Row.TERM)" + "πŸ’‘ $($Row.ABBR) in $Basename refers to: $($Row.MEANING)" $Matches++ } } diff --git a/Docs/write-animated.md b/Docs/write-animated.md index 0de7a3b2..b6e82c9d 100644 --- a/Docs/write-animated.md +++ b/Docs/write-animated.md @@ -1,10 +1,10 @@ ## The *write-animated.ps1* Script -This PowerShell script writes animated text. +This PowerShell script writes animated text to the console. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/write-animated.ps1 [[-Line1] ] [[-Line2] ] [[-Line3] ] [[-Line4] ] [[-Line5] ] [[-Line6] ] [[-Line7] ] [[-Line8] ] [[-Line9] ] [[-Speed] ] [] +write-animated.ps1 [[-Line1] ] [[-Line2] ] [[-Line3] ] [[-Line4] ] [[-Line5] ] [[-Line6] ] [[-Line7] ] [[-Line8] ] [[-Line9] ] [[-Speed] ] [] -Line1 @@ -109,7 +109,7 @@ https://github.com/fleschutz/PowerShell .SYNOPSIS Writes animated text .DESCRIPTION - This PowerShell script writes animated text. + This PowerShell script writes animated text to the console. .EXAMPLE PS> ./write-animated "Hello World" .LINK @@ -122,41 +122,43 @@ param($Line1 = "", $Line2 = "", $Line3 = "", $Line4 = "", $Line5 = "", $Line6 = $TerminalWidth = 120 # characters -function WriteLine { param([string]$Line, [int]$Speed) - [int]$Start = 1 +function WriteLine { param([string]$Line) + if ($Line -eq "") { return } [int]$End = $Line.Length $StartPosition = $HOST.UI.RawUI.CursorPosition $Spaces = " " - - if ($Line -eq "") { return } - foreach ($Pos in $Start .. $End) { + foreach($Pos in 1 .. $End) { $TextToDisplay = $Spaces.Substring(0, $TerminalWidth / 2 - $pos / 2) + $Line.Substring(0, $Pos) - write-host -nonewline $TextToDisplay - start-sleep -milliseconds $Speed + Write-Host $TextToDisplay -noNewline + Start-Sleep -milliseconds $Speed $HOST.UI.RawUI.CursorPosition = $StartPosition } - write-host "" + Write-Host "" } -if ($Line1 -eq "") { - $Line1 = "Welcome to PowerShell Scripts" - $Line2 = " " - $Line3 = "This repository contains useful and cross-platform PowerShell scripts." - $Line4 = " " - $Line5 = "Best regards," - $Line6 = "Markus" +try { + if ($Line1 -eq "") { + $Line1 = "Welcome to PowerShell Scripts" + $Line2 = " " + $Line3 = "This repository contains useful and cross-platform PowerShell scripts." + $Line4 = " " + $Line5 = "Best regards," + $Line6 = "Markus" + } + WriteLine $Line1 + WriteLine $Line2 + WriteLine $Line3 + WriteLine $Line4 + WriteLine $Line5 + WriteLine $Line6 + WriteLine $Line7 + WriteLine $Line8 + WriteLine $Line9 + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 } - -WriteLine $Line1 $Speed -WriteLine $Line2 $Speed -WriteLine $Line3 $Speed -WriteLine $Line4 $Speed -WriteLine $Line5 $Speed -WriteLine $Line6 $Speed -WriteLine $Line7 $Speed -WriteLine $Line8 $Speed -WriteLine $Line9 $Speed -exit 0 # success ``` *Generated by convert-ps2md.ps1 using the comment-based help of write-animated.ps1* diff --git a/Docs/write-ascii-image.md b/Docs/write-ascii-image.md new file mode 100644 index 00000000..b663c080 --- /dev/null +++ b/Docs/write-ascii-image.md @@ -0,0 +1,61 @@ +## The *write-ascii-image.ps1* Script + +write-ascii-image.ps1 + + +## Parameters +```powershell + + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +## Source Code +```powershell +<# +.SYNOPSIS + Writes an ASCII image +.DESCRIPTION + This PowerShell script writes an ASCII image to the console. +.EXAMPLE + PS> .\write-ascii-image.ps1 +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +function WriteLine { param([string]$line) + Write-Host $line -foregroundColor green +} + +WriteLine "" +WriteLine " _-o#&&*''''?d:>b\_" +WriteLine " _o/'`'' '',, dMF9MMMMMHo_" +WriteLine " .o&#' `'MbHMMMMMMMMMMMHo." +WriteLine " .o'' ' vodM*$&&HMMMMMMMMMM?." +WriteLine " ,' $M&ood,~'`(&##MMMMMMH\" +WriteLine " / ,MMMMMMM#b?#bobMMMMHMMML" +WriteLine " & ?MMMMMMMMMMMMMMMMM7MMM$R*Hk" +WriteLine " ?$. :MMMMMMMMMMMMMMMMMMM/HMMM|`*L" +WriteLine "| |MMMMMMMMMMMMMMMMMMMMbMH' T," +WriteLine "$H#: `*MMMMMMMMMMMMMMMMMMMMb#}' `?" +WriteLine "]MMH# ''*''''*#MMMMMMMMMMMMM' -" +WriteLine "MMMMMb_ |MMMMMMMMMMMP' :" +WriteLine "HMMMMMMMHo `MMMMMMMMMT ." +WriteLine "?MMMMMMMMP 9MMMMMMMM} -" +WriteLine "-?MMMMMMM |MMMMMMMMM?,d- '" +WriteLine " :|MMMMMM- `MMMMMMMT .M|. :" +WriteLine " .9MMM[ &MMMMM*' `' ." +WriteLine " :9MMk `MMM#' -" +WriteLine " &M} ' .-" +WriteLine " `&. ." +WriteLine " `~, . ./" +WriteLine " . _ .-" +WriteLine " '`--._,dd###pp='''" +exit 0 # success +``` + +*Generated by convert-ps2md.ps1 using the comment-based help of write-ascii-image.ps1* diff --git a/Docs/write-big.md b/Docs/write-big.md index d1f497fd..c8059ae0 100644 --- a/Docs/write-big.md +++ b/Docs/write-big.md @@ -4,7 +4,7 @@ This PowerShell script writes the given text in big letters. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/write-big.ps1 [[-text] ] [] +write-big.ps1 [[-text] ] [] -text Specifies the text to write diff --git a/Docs/write-blue.md b/Docs/write-blue.md index 73a169dc..2f32fe97 100644 --- a/Docs/write-blue.md +++ b/Docs/write-blue.md @@ -4,7 +4,7 @@ This PowerShell script writes text in a blue foreground color. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/write-blue.ps1 [[-text] ] [] +write-blue.ps1 [[-text] ] [] -text Specifies the text to write diff --git a/Docs/write-braille.md b/Docs/write-braille.md index be2efbb2..d8add098 100644 --- a/Docs/write-braille.md +++ b/Docs/write-braille.md @@ -4,7 +4,7 @@ This PowerShell script writes text in Braille. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/write-braille.ps1 [[-text] ] [] +write-braille.ps1 [[-text] ] [] -text Specifies the text to write diff --git a/Docs/write-clock.md b/Docs/write-clock.md new file mode 100644 index 00000000..24dbea87 --- /dev/null +++ b/Docs/write-clock.md @@ -0,0 +1,74 @@ +## The *write-clock.ps1* Script + +This PowerShell script writes the current time as ACSII clock + +## Parameters +```powershell +write-clock.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +## Example +```powershell +PS> ./write-clock.ps1 + +``` + +## Notes +Author: Markus Fleschutz | License: CC0 + +## Related Links +https://github.com/fleschutz/PowerShell + +## Source Code +```powershell +<# +.SYNOPSIS + Writes an ASCII clock +.DESCRIPTION + This PowerShell script writes the current time as ACSII clock +.EXAMPLE + PS> ./write-clock.ps1 +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +try { + [system.threading.thread]::currentthread.currentculture = [system.globalization.cultureinfo]"en-US" + + Clear-Host + $Weekday = Get-Date -UFormat "%A" + & "$PSScriptRoot/write-big.ps1" " $Weekday" + Write-Output "" + + $Date = Get-Date -UFormat "%d%b%y" + & "$PSScriptRoot/write-big.ps1" " $Date" + Write-Output "" + + $Week = Get-Date -UFormat "%V" + & "$PSScriptRoot/write-big.ps1" " WEEK$Week" + Write-Output "" + + $StartPosition = $HOST.UI.RawUI.CursorPosition + while ($true) { + $Time = Get-Date -format "HH:mm:ss" + + & "$PSScriptRoot/write-big.ps1" " $Time " + Write-Output "" + Write-Output " (press to stop)" + Start-Sleep -seconds 1 + $HOST.UI.RawUI.CursorPosition = $StartPosition + } + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*Generated by convert-ps2md.ps1 using the comment-based help of write-clock.ps1* diff --git a/Docs/write-code.md b/Docs/write-code.md index 2997588e..530d3580 100644 --- a/Docs/write-code.md +++ b/Docs/write-code.md @@ -4,7 +4,7 @@ This PowerShell script generates and writes PowerShell code on the console (for ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/write-code.ps1 [[-color] ] [[-speed] ] [] +write-code.ps1 [[-color] ] [[-speed] ] [] -color Specifies the color to use ("green" by default) diff --git a/Docs/write-date.md b/Docs/write-date.md index 9d464347..9e4b8b89 100644 --- a/Docs/write-date.md +++ b/Docs/write-date.md @@ -4,7 +4,7 @@ This PowerShell script determines and writes the current date. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/write-date.ps1 [] +write-date.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/write-green.md b/Docs/write-green.md index 2248102e..acdff6f2 100644 --- a/Docs/write-green.md +++ b/Docs/write-green.md @@ -4,7 +4,7 @@ This PowerShell script writes text in a green foreground color. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/write-green.ps1 [[-text] ] [] +write-green.ps1 [[-text] ] [] -text Specifies the text to write diff --git a/Docs/write-joke.md b/Docs/write-joke.md index a0d097e3..be959930 100644 --- a/Docs/write-joke.md +++ b/Docs/write-joke.md @@ -4,7 +4,7 @@ This PowerShell script writes a random Juck Norris joke to the console. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/write-joke.ps1 [] +write-joke.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/write-lowercase.md b/Docs/write-lowercase.md index 711e8694..4ddaf145 100644 --- a/Docs/write-lowercase.md +++ b/Docs/write-lowercase.md @@ -1,10 +1,10 @@ ## The *write-lowercase.ps1* Script -This PowerShell script writes text in lowercase letters. +This PowerShell script writes the given text in lowercase letters. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/write-lowercase.ps1 [[-text] ] [] +write-lowercase.ps1 [[-text] ] [] -text Specifies the text to write @@ -23,6 +23,7 @@ This PowerShell script writes text in lowercase letters. ## Example ```powershell PS> ./write-lowercase "Hello World" +hello world ``` @@ -38,11 +39,12 @@ https://github.com/fleschutz/PowerShell .SYNOPSIS Writes text in lowercase letters .DESCRIPTION - This PowerShell script writes text in lowercase letters. + This PowerShell script writes the given text in lowercase letters. .PARAMETER text Specifies the text to write .EXAMPLE PS> ./write-lowercase "Hello World" + hello world .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -51,9 +53,9 @@ https://github.com/fleschutz/PowerShell param([string]$text = "") -if ($text -eq "" ) { $text = read-host "Enter the text to write" } +if ($text -eq "" ) { $text = Read-Host "Enter the text to write" } -write-output $text.ToLower() +Write-Output $text.ToLower() exit 0 # success ``` diff --git a/Docs/write-marquee.md b/Docs/write-marquee.md index 8ca7a93d..b6adae44 100644 --- a/Docs/write-marquee.md +++ b/Docs/write-marquee.md @@ -4,7 +4,7 @@ This PowerShell script writes the given text as marquee. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/write-marquee.ps1 [[-Text] ] [[-Speed] ] [] +write-marquee.ps1 [[-Text] ] [[-Speed] ] [] -Text Specifies the text to write diff --git a/Docs/write-morse-code.md b/Docs/write-morse-code.md index 887c96b6..73f52ad9 100644 --- a/Docs/write-morse-code.md +++ b/Docs/write-morse-code.md @@ -4,7 +4,7 @@ This PowerShell script writes the given text in Morse code. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/write-morse-code.ps1 [[-text] ] [[-speed] ] [] +write-morse-code.ps1 [[-text] ] [[-speed] ] [] -text Specifies the text to write diff --git a/Docs/write-motd.md b/Docs/write-motd.md index 2a4b7f7f..bab66a92 100644 --- a/Docs/write-motd.md +++ b/Docs/write-motd.md @@ -4,7 +4,7 @@ This PowerShell script writes the message of the day (MOTD). ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/write-motd.ps1 [] +write-motd.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, @@ -75,59 +75,59 @@ Write-Host " ,.=:^!^!t3Z3z., " -ForegroundColor Red Write-Host " :tt:::tt333EE3 " -ForegroundColor Red Write-Host " Et:::ztt33EEE " -ForegroundColor Red -NoNewline Write-Host " @Ee., .., " -ForegroundColor green -NoNewline -Write-Host " Time: " -ForegroundColor Red -NoNewline +Write-Host " Time: " -ForegroundColor DarkGray -NoNewline Write-Host "$CurrentTime" -ForegroundColor Cyan Write-Host " ;tt:::tt333EE7" -ForegroundColor Red -NoNewline Write-Host " ;EEEEEEttttt33# " -ForegroundColor Green -NoNewline -Write-Host " Timezone: " -ForegroundColor Red -NoNewline +Write-Host " Timezone: " -ForegroundColor DarkGray -NoNewline Write-Host "$TimeZone" -ForegroundColor Cyan Write-Host " :Et:::zt333EEQ." -NoNewline -ForegroundColor Red Write-Host " SEEEEEttttt33QL " -NoNewline -ForegroundColor Green -Write-Host " User: " -NoNewline -ForegroundColor Red +Write-Host " User: " -NoNewline -ForegroundColor DarkGray Write-Host "$UserName" -ForegroundColor Cyan Write-Host " it::::tt333EEF" -NoNewline -ForegroundColor Red Write-Host " @EEEEEEttttt33F " -NoNewline -ForegroundColor Green -Write-Host " Hostname: " -NoNewline -ForegroundColor Red +Write-Host " Hostname: " -NoNewline -ForegroundColor DarkGray Write-Host "$ComputerName" -ForegroundColor Cyan Write-Host " ;3=*^``````'*4EEV" -NoNewline -ForegroundColor Red Write-Host " :EEEEEEttttt33@. " -NoNewline -ForegroundColor Green -Write-Host " OS: " -NoNewline -ForegroundColor Red +Write-Host " OS: " -NoNewline -ForegroundColor DarkGray Write-Host "$OSName" -ForegroundColor Cyan Write-Host " ,.=::::it=., " -NoNewline -ForegroundColor Cyan Write-Host "``" -NoNewline -ForegroundColor Red Write-Host " @EEEEEEtttz33QF " -NoNewline -ForegroundColor Green -Write-Host " Kernel: " -NoNewline -ForegroundColor Red +Write-Host " Kernel: " -NoNewline -ForegroundColor DarkGray Write-Host "$Kernel " -NoNewline -ForegroundColor Cyan Write-Host "$Kernel_Info" -ForegroundColor Cyan Write-Host " ;::::::::zt33) " -NoNewline -ForegroundColor Cyan Write-Host " '4EEEtttji3P* " -NoNewline -ForegroundColor Green -Write-Host " Uptime: " -NoNewline -ForegroundColor Red +Write-Host " Uptime: " -NoNewline -ForegroundColor DarkGray Write-Host "$Uptime" -ForegroundColor Cyan Write-Host " :t::::::::tt33." -NoNewline -ForegroundColor Cyan Write-Host ":Z3z.. " -NoNewline -ForegroundColor Yellow Write-Host " ````" -NoNewline -ForegroundColor Green Write-Host " ,..g. " -NoNewline -ForegroundColor Yellow -Write-Host " PowerShell: " -NoNewline -ForegroundColor Red +Write-Host " PowerShell: " -NoNewline -ForegroundColor DarkGray Write-Host "$PowerShellVersion $PowerShellEdition" -ForegroundColor Cyan Write-Host " i::::::::zt33F" -NoNewline -ForegroundColor Cyan Write-Host " AEEEtttt::::ztF " -NoNewline -ForegroundColor Yellow -Write-Host " CPU: " -NoNewline -ForegroundColor Red +Write-Host " CPU: " -NoNewline -ForegroundColor DarkGray Write-Host "$CPU_Info" -ForegroundColor Cyan Write-Host " ;:::::::::t33V" -NoNewline -ForegroundColor Cyan Write-Host " ;EEEttttt::::t3 " -NoNewline -ForegroundColor Yellow -Write-Host " Processes: " -NoNewline -ForegroundColor Red +Write-Host " Processes: " -NoNewline -ForegroundColor DarkGray Write-Host "$NumberOfProcesses" -ForegroundColor Cyan Write-Host " E::::::::zt33L" -NoNewline -ForegroundColor Cyan Write-Host " @EEEtttt::::z3F " -NoNewline -ForegroundColor Yellow -Write-Host " Current Load: " -NoNewline -ForegroundColor Red +Write-Host " Current Load: " -NoNewline -ForegroundColor DarkGray Write-Host "$CurrentLoad" -ForegroundColor Cyan Write-Host " {3=*^``````'*4E3)" -NoNewline -ForegroundColor Cyan Write-Host " ;EEEtttt:::::tZ`` " -NoNewline -ForegroundColor Yellow -Write-Host " Memory: " -NoNewline -ForegroundColor Red +Write-Host " Memory: " -NoNewline -ForegroundColor DarkGray Write-Host "$Memory_Size" -ForegroundColor Cyan Write-Host " ``" -NoNewline -ForegroundColor Cyan Write-Host " :EEEEtttt::::z7 " -NoNewline -ForegroundColor Yellow -Write-Host " System Volume: " -NoNewline -ForegroundColor Red +Write-Host " System Volume: " -NoNewline -ForegroundColor DarkGray Write-Host "$DiskSize" -ForegroundColor Cyan Write-Host " 'VEzjt:;;z>*`` " -ForegroundColor Yellow [Environment]::NewLine diff --git a/Docs/write-qr-code.md b/Docs/write-qr-code.md new file mode 100644 index 00000000..686cfbe1 --- /dev/null +++ b/Docs/write-qr-code.md @@ -0,0 +1,58 @@ +## The *write-qr-code.ps1* Script + +This PowerShell script writes "Hello World" as QR code to the console output. + +## Parameters +```powershell +write-qr-code.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +## Example +```powershell +PS> ./write-qr-code + +``` + +## Notes +Author: Markus Fleschutz | License: CC0 + +## Related Links +https://github.com/fleschutz/PowerShell + +## Source Code +```powershell +<# +.SYNOPSIS + Writes a QR code +.DESCRIPTION + This PowerShell script writes "Hello World" as QR code to the console output. +.EXAMPLE + PS> ./write-qr-code +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +Write-Host " " -foregroundColor black -backgroundColor white +Write-Host " β–„β–„β–„β–„β–„β–„β–„ β–„ β–„β–„β–„ β–„β–„β–„β–„β–„β–„β–„ " -foregroundColor black -backgroundColor white +Write-Host " β–ˆ β–„β–„β–„ β–ˆ β–„β–„β–€β–ˆ β–ˆ β–„β–„β–„ β–ˆ " -foregroundColor black -backgroundColor white +Write-Host " β–ˆ β–ˆβ–ˆβ–ˆ β–ˆ β–ˆβ–€ β–„β–€ β–ˆ β–ˆβ–ˆβ–ˆ β–ˆ " -foregroundColor black -backgroundColor white +Write-Host " β–ˆβ–„β–„β–„β–„β–„β–ˆ β–„β–€β–ˆβ–€β–ˆ β–ˆβ–„β–„β–„β–„β–„β–ˆ " -foregroundColor black -backgroundColor white +Write-Host " β–„β–„β–„β–„ β–„ β–„β–„β–„β–ˆβ–ˆβ–„ β–„β–„β–„ β–„ " -foregroundColor black -backgroundColor white +Write-Host " β–€ β–ˆ β–€β–„β–„β–€β–ˆβ–€β–€β–ˆβ–€β–ˆβ–€β–ˆβ–€β–€β–€β–„β–ˆ " -foregroundColor black -backgroundColor white +Write-Host " β–„β–„β–ˆβ–ˆβ–€β–€β–„β–„β–ˆ β–„β–€β–„β–„β–„β–€ β–€ β–€β–„ " -foregroundColor black -backgroundColor white +Write-Host " β–„β–„β–„β–„β–„β–„β–„ β–€β–€β–ˆβ–ˆβ–„β–„β–ˆβ–ˆβ–„ β–€ β–€ " -foregroundColor black -backgroundColor white +Write-Host " β–ˆ β–„β–„β–„ β–ˆ β–€β–„ β–„β–€ β–€ β–ˆβ–ˆβ–€β–€ " -foregroundColor black -backgroundColor white +Write-Host " β–ˆ β–ˆβ–ˆβ–ˆ β–ˆ β–ˆβ–„ β–„ β–€β–„ β–€β–ˆβ–€ " -foregroundColor black -backgroundColor white +Write-Host " β–ˆβ–„β–„β–„β–„β–„β–ˆ β–ˆβ–€β–„β–ˆ β–ˆβ–ˆβ–ˆβ–€ β–„ β–€ " -foregroundColor black -backgroundColor white +Write-Host " " -foregroundColor black -backgroundColor white + +exit 0 # success +``` + +*Generated by convert-ps2md.ps1 using the comment-based help of write-qr-code.ps1* diff --git a/Docs/write-quote.md b/Docs/write-quote.md index d72e3ac6..0486ad3f 100644 --- a/Docs/write-quote.md +++ b/Docs/write-quote.md @@ -4,7 +4,7 @@ This PowerShell script writes a random quote to the console. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/write-quote.ps1 [] +write-quote.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/write-red.md b/Docs/write-red.md index e76500e3..29c18d3b 100644 --- a/Docs/write-red.md +++ b/Docs/write-red.md @@ -4,7 +4,7 @@ This PowerShell script writes text in a red foreground color. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/write-red.ps1 [[-text] ] [] +write-red.ps1 [[-text] ] [] -text Specifies the text to write diff --git a/Docs/write-rot13.md b/Docs/write-rot13.md index 648c1f9e..506d847c 100644 --- a/Docs/write-rot13.md +++ b/Docs/write-rot13.md @@ -4,7 +4,7 @@ This PowerShell script writes text encoded or decoded with ROT13. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/write-rot13.ps1 [[-text] ] [] +write-rot13.ps1 [[-text] ] [] -text Specifies the text to write diff --git a/Docs/write-shit.md b/Docs/write-shit.md new file mode 100644 index 00000000..12f169d3 --- /dev/null +++ b/Docs/write-shit.md @@ -0,0 +1,20 @@ +## The *write-shit.ps1* Script + +write-shit.ps1 + + +## Parameters +```powershell + + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +## Source Code +```powershell +"πŸ’©" +``` + +*Generated by convert-ps2md.ps1 using the comment-based help of write-shit.ps1* diff --git a/Docs/write-sine-curves.md b/Docs/write-sine-curves.md index 38cd4bdc..725fd2f3 100644 --- a/Docs/write-sine-curves.md +++ b/Docs/write-sine-curves.md @@ -4,7 +4,7 @@ This PowerShell script writes sine curves. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/write-sine-curves.ps1 [] +write-sine-curves.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/write-time.md b/Docs/write-time.md index 94200454..3fe0b3f6 100644 --- a/Docs/write-time.md +++ b/Docs/write-time.md @@ -4,7 +4,7 @@ This PowerShell script determines and writes the current time. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/write-time.ps1 [] +write-time.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, diff --git a/Docs/write-typewriter.md b/Docs/write-typewriter.md index 18ccb42c..6b6ef974 100644 --- a/Docs/write-typewriter.md +++ b/Docs/write-typewriter.md @@ -4,7 +4,7 @@ This PowerShell script writes the given text with the typewriter effect. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/write-typewriter.ps1 [[-text] ] [[-speed] ] [] +write-typewriter.ps1 [[-text] ] [[-speed] ] [] -text Specifies the text to write diff --git a/Docs/write-uppercase.md b/Docs/write-uppercase.md index 029c4dc7..27862904 100644 --- a/Docs/write-uppercase.md +++ b/Docs/write-uppercase.md @@ -1,10 +1,10 @@ ## The *write-uppercase.ps1* Script -This PowerShell script writes text in uppercase letters. +This PowerShell script writes the given text in uppercase letters. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/write-uppercase.ps1 [[-text] ] [] +write-uppercase.ps1 [[-text] ] [] -text Specifies the text to write @@ -23,6 +23,7 @@ This PowerShell script writes text in uppercase letters. ## Example ```powershell PS> ./write-uppercase "Hello World" +HELLO WORLD ``` @@ -38,11 +39,12 @@ https://github.com/fleschutz/PowerShell .SYNOPSIS Writes text in uppercase letters .DESCRIPTION - This PowerShell script writes text in uppercase letters. + This PowerShell script writes the given text in uppercase letters. .PARAMETER text Specifies the text to write .EXAMPLE PS> ./write-uppercase "Hello World" + HELLO WORLD .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -51,9 +53,9 @@ https://github.com/fleschutz/PowerShell param([string]$text = "") -if ($text -eq "" ) { $text = read-host "Enter the text to write" } +if ($text -eq "" ) { $text = Read-Host "Enter the text to write" } -write-output $text.ToUpper() +Write-Output $text.ToUpper() exit 0 # success ``` diff --git a/Docs/write-vertical.md b/Docs/write-vertical.md index db65aa18..f287aee8 100644 --- a/Docs/write-vertical.md +++ b/Docs/write-vertical.md @@ -4,7 +4,7 @@ This PowerShell script writes text in vertical direction. ## Parameters ```powershell -/home/mf/Repos/PowerShell/Scripts/write-vertical.ps1 [[-text] ] [] +write-vertical.ps1 [[-text] ] [] -text Specifies the text to write diff --git a/Scripts/convert-ps2md.ps1 b/Scripts/convert-ps2md.ps1 index 3cb63332..b51aebf7 100755 --- a/Scripts/convert-ps2md.ps1 +++ b/Scripts/convert-ps2md.ps1 @@ -70,7 +70,7 @@ try { "## Parameters" "``````powershell" $Syntax = (($full.syntax | Out-String) -replace "`r`n", "`r`n").Trim() - $Syntax = (($Syntax | Out-String) -replace "/home/mf/PowerShell/Scripts/", "") + $Syntax = (($Syntax | Out-String) -replace "/home/mf/Repos/PowerShell/Scripts/", "") if ($Syntax -ne "") { "$Syntax" }