Microsoft DevBlog: Windows Command Line.
shift
keyshift
keyMove
on the pop-up menuInstall software with Windows Package Manager (aka WinGet) and record the computer setup with WinGet configuration.
# list all installed packages
winget.exe list
# search packages
winget.exe search
# install a package
winget.exe install
# unistall a package
winget.exe uninstall
The canonical configuration file name is configuration.dsc.yaml
.
winget.exe configure show <FILE>
winget.exe configure validate <FILE>
winget.exe configure test --accept-configuration-agreements <FILE>
Elevated means the program is running as Administrator.
Run the following command in non-elevated PowerShell:
PS> Start-Process -Verb RunAs wt.exe
And UAC (User Account Control) consent prompt is triggered.
Handy sudo function:
function sudo {
param(
[Parameter(Mandatory=$true)][string]$path
)
Start-Process -Verb RunAs $path
}
Run in PowerShell:
PS> sudo wt.exe
Windows Terminal is the modern goto terminal program in Windows.
Deployment Image Serving and Management (DISM.exe) is a command line tool and PowerShell module that can be used to configure Windows features.
DISM needs to be run in an elevated PowerShell.
See Enable or Disable Windows Features Using DISM.
# list features
Dism.exe /online /Get-Features
# get details of the feature
Dism.exe /online /Get-FeatureInfo /FeatureName:<FEATURENAME>
# enable the feature
Dism.exe /online /Enable-Feature /FeatureName:<FEATURENAME>
# disable the feature
Dism.exe /online /Disable-Feature /FeatureName:<FEATURENAME>
See DISM PowerShell Module.
# list features
Get-WindowsOptionalFeature -Online
# get details of the feature
Get-WindowsOptionalFeature -Online -FeatureName:<FEATURENAME>
# enable the feature
Enable-WindowsOptionalFeature -Online -FeatureName:<FEATURENAME>
# disable the feature
Disable-WindowsOptionalFeature -Online -FeatureName:<FEATURENAME>
Run a GNU/Linux environment directly on Windows, unmodified.
Access Windows filesystem from Linux: /mnt/<DRIVE_LETTER>/
Access Linux filesystem from Windows: \\wsl.localhost\<LINUX_NAME>\
Find out Windows version:
systeminfo.exe | findstr.exe -b -c:"OS Name" -b -c:"OS Version"
Source: win11.md Created: 2023-10-25T08:29:03+03:00 Changed: 2024-09-17T10:45:04+03:00