You can install apps from either Command Prompt or PowerShell on Windows, but the simplest built-in option for many users is the winget command, which works in both shells. Open a terminal, find the app’s package ID, and install it with winget install; PowerShell also offers scripting features, while Command Prompt is sufficient for straightforward commands.
What the command-line options do
Command Prompt (often called CMD) and PowerShell are different command-line environments. Both let you enter commands, run programs, and manage files, but PowerShell adds a more capable scripting language and works with structured objects as well as text. Neither shell is itself an app store.
On current Windows installations, winget—the Windows Package Manager command-line client—can search for and install packages from configured sources. You can type its commands in CMD or PowerShell. Other installation routes include running an installer file, using a package manager already installed on the computer, or using an organization’s deployment tools.
For example, if you know an app’s exact package ID, the basic pattern is:
winget install --id Vendor.AppName
The example ID is a placeholder, not a real package recommendation. Package IDs and availability vary, so search first and check that the result is the app you intended.
Install an app with winget
- Open Start, search for Terminal, and launch it. Windows Terminal can open a PowerShell or Command Prompt tab; alternatively, search for PowerShell or Command Prompt directly.
- Check that the package manager is available by entering
winget --version. If Windows says the command is not recognized, see the troubleshooting section below. - Search for the app. For example:
winget search "App Name". Review the name, publisher, source, and package ID in the results. - Install the intended result using its exact ID, such as
winget install --id Vendor.AppName. You can add--exactto request an exact match:winget install --id Vendor.AppName --exact. - Read any prompts and follow them. Depending on the installer and app, Windows may request confirmation, administrator approval, or interaction with a graphical setup window.
- When the command finishes, open the app from Start or follow any completion message. If it does not appear immediately, wait briefly or check the installer’s stated outcome.
To check whether the package manager knows about an installed app, try winget list. This is a useful inventory, but it is not guaranteed to show every program or every installation method.
CMD versus PowerShell
For a single winget search or install, the difference is usually negligible: both shells pass the command to the same executable. Choose the one you already have open. PowerShell is often more convenient for repeatable scripts, automation, and combining commands with Windows administration features. CMD may feel simpler if you are following older instructions or using a batch file.
- Choose CMD for a basic command, a legacy batch script, or instructions written specifically for it.
- Choose PowerShell when you need richer scripting, variables, loops, or other PowerShell commands.
- Choose Windows Terminal when you want one application that can host either shell and keep multiple tabs open.
Be aware that shell syntax can differ when commands are combined or placed in scripts. A command copied from a PowerShell script might not work unchanged in CMD, even though a simple winget install line often does.
Choosing a safe installation source
A package manager can make installation quicker, but a command is not automatically safe just because it runs in a terminal. Search results may contain similarly named apps, and packages can come from different sources. Verify the publisher and package details before installing, especially when the app is unfamiliar.
Use these checks before proceeding:
- Confirm the app name and publisher match what you intended.
- Prefer the developer’s official distribution or a trusted configured package source.
- Do not run a command copied from an unknown website if you do not understand what it does.
- Do not approve an administrator prompt unless you understand why the installer needs elevated permissions.
- For a work or school computer, follow the organization’s software policy; installation may be restricted or centrally managed.
It is also possible to download an installer from an official website and run it yourself. That can be appropriate when an app is not available through winget, but check the download source and review the installer prompts. A package-manager command does not bypass Windows permissions or an organization’s controls.
Common problems and what to try
“winget” is not recognized. The Windows Package Manager client may not be available, registered, or accessible in that Windows account. Install or update the relevant App Installer component through Microsoft Store if it is offered, then close and reopen the terminal and try winget --version again. On managed devices, ask the administrator rather than trying to work around restrictions.
The search returns several matches. Do not guess based only on the display name. Compare the publisher and ID, then use the exact ID in the install command. If the publisher is unclear, check the app developer’s official site for the correct distribution details.
The install fails or asks for confirmation. Read the full terminal output; it may identify a source, network, permissions, or installer issue. You can try winget source update to refresh package-source information, then search again. Do not repeatedly approve prompts or disable protections to force an installation.
The app is already installed. Check with winget list or search the Start menu. Package detection can vary, so an app may be installed even if the list does not identify it as expected. Avoid running multiple installers at once.
Other ways to install apps
The command line is optional. Microsoft Store provides a graphical way to find and install apps that are listed there. A developer’s official website may provide a standalone installer, while workplaces may offer a company portal or managed deployment. These routes can differ in update handling, available versions, and permissions.
Choose based on the app and the device, not on the idea that one method is always better. A graphical store is often easiest for occasional installs; winget is handy for repeatable commands and searching; an official installer may be necessary when the app is not in a package source. Check how the app will receive updates, since installation through one route does not necessarily manage updates from another.
Frequently Asked Questions
Can I install apps from Command Prompt?
Yes. If winget is available, you can search and install packages from CMD using commands such as winget search "App Name" and winget install --id Vendor.AppName.
Is PowerShell better than Command Prompt for installing apps?
Not for a basic winget command; both can run it. PowerShell is more useful when you are automating installs or writing scripts, while CMD is fine for a one-off installation.
Do I need administrator rights to use winget?
Not always. Whether elevated permission is needed depends on the app, installer, and installation scope. Follow the prompt and do not approve elevation unless you trust the app and understand the request.
How do I find an app’s package ID?
Run winget search "App Name" and inspect the results, including publisher and source. Use the exact ID shown for the app you verified.
Why does winget say the command is not recognized?
The client may be missing, outdated, or unavailable to the current account. Check or update App Installer through Microsoft Store if available, reopen the terminal, and try again; managed-device restrictions may require help from an administrator.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- How to Schedule Work Profile Android Phones
- How to Enable ChatGPT Plugins and Use Them
- How to Print PowerPoint Slides With Notes
- Fix This App Was Blocked for Your Protection in Windows
- Windows Backup and Restore Stuck? What to Do
- How to Use Microsoft Copilot on Mobile