A brief list of Windows commands that are helpful but don’t deserve a separate article.
0. General
Power shell install using Windows command prompt
Find available Powershell versions to install:winget search Microsoft.PowerShell
Install it:
winget install --id Microsoft.PowerShell --source wingetCode language: CSS (css)Update PowerShell using CLI
winget upgrade --id Microsoft.PowerShellCode language: CSS (css)
1. Network
Windows PowerShell command to save ping results in a text file:
ping.exe -t www.google.com|Foreach{"{0} - {1}" -f (Get-Date),$_} >> c:\test\ping-result-2023-10-18.txtCode language: PHP (php)
2. System tweaking
To easily add an application to startup for the active user:
- Create a shortcut to the app (if it doesn’t already exist).
- Win+R -> shell:startup
- To the window that’s opened, right-mouse drag the app’s shortcut and “Copy here” it in the window.
The path of the window is:
C:\Users\active_user\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup(re)sources and relevant links
- Microsoft docs:
Install PowerShell 7 on Windows
Last updated:
Originally published:
