Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: This article shows how to use WMI classes in PowerShell to manage network configuration setting in Windows.
ms.date: 12/08/2022
ms.date: 02/12/2025
title: Performing networking tasks
---
# Performing networking tasks
Expand Down Expand Up @@ -81,15 +81,15 @@ properties.

## Pinging computers

You can perform a simple ping against a computer using by **Win32_PingStatus**. The following
You can perform a simple ping against a computer by using **Win32_PingStatus**. The following
command performs the ping, but returns lengthy output:

```powershell
Get-CimInstance -Class Win32_PingStatus -Filter "Address='127.0.0.1'"
```

A more useful form for summary information a display of the Address, ResponseTime, and StatusCode
properties, as generated by the following command. The **Autosize** parameter of `Format-Table`
The response from **Win32_PingStatus** contains 29 properties. You can use `Format-Table` to select
the properties that are most interesting to you. The **Autosize** parameter of `Format-Table`
resizes the table columns so that they display properly in PowerShell.

```powershell
Expand Down
2 changes: 2 additions & 0 deletions reference/docs-conceptual/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ items:
href: overview.md
- name: What is Windows PowerShell?
href: what-is-windows-powershell.md
- name: What is a command shell?
href: what-is-a-command-shell.md
- name: What is a PowerShell command?
href: powershell-commands.md
- name: Discover PowerShell
Expand Down
106 changes: 106 additions & 0 deletions reference/docs-conceptual/what-is-a-command-shell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
---
title: What is a command shell?
ms.date: 02/13/2025
description: This article explains the difference between command shells, command-line tools, and terminals.
---
# What is a command shell?

Many people use the terms _command shell_, _command-line tool_, and _terminal_ interchangeably,
which can be confusing. This article explains the difference between these concepts and provides
examples of each.

A **command shell** is an interactive command-line interface for managing a computer, also known as a
**Read-Eval-Print Loop** ([REPL][14]).

A shell takes input from the keyboard, evaluates that input, and executes the input as a shell
command or forwards the input to the operating system to be executed. Most shells can also read
commands from a script file, and can include programming features like variables, flow control, and
functions.

## Types of command shells

There are two main types of command shells:

- General purpose command shells

General purpose command shells provide are designed to work with the operating system and allow
you to run any command that the operating system supports. They also include shell-specific
commands and programming features. The following list contains some examples of general purpose
command shells:

- [PowerShell][16]
- [Windows Command Shell][06]
- [bash][15] - popular on Linux
- [zsh][12] - popular on macOS

- Utility command shells

Utility command shells are designed to work with specific applications or services. These shells
can only run commands that are specific to the application or service. Some utility shells support
running commands from a batch script, but don't include programming features. Usually, these
shells can only be used interactively.

- [AI Shell][04] - An interactive-only shell used to communicate with AI services such as Azure
OpenAI.
- [netsh][07] - Network shell (netsh) is a command-line utility that allows you to configure and
display the status of various network components on Windows. It's both a command-line tool and a
command shell. It also supports running commands from a script file.

## Command-line tools

A **command-line tool** is a standalone program that you run from a command shell. Command-line
tools are typically designed to perform a specific task, such as managing files, configuring
settings, or querying for information. Command-line tools can be used in any shell that supports
running external programs.

- [Azure CLI][02] - a collection of command-line tools for managing Azure resources that can be run
in any supported shell.
- [Azure PowerShell][03] - a collection of PowerShell modules for managing Azure resources that can
be run in any supported version of PowerShell.
- [OpenSSH for Windows][05] - includes a command-line client and a server that provides secure
communication over a network.
- [Windows Commands][08] - a collection of command-line tools that are built into Windows.

In general, command-line tools don't provide a command shell (REPL) interface. The `netsh` command
in Windows is an exception, as it's both a command-line tool and an interactive command shell.

## Terminals

A **terminal** is an application that provides a text-based window for hosting command shells. Some
terminals are designed to work with a specific shell, while others can host multiple shells. They
can also include advanced features such as:

- Ability to create multiple panes within a single window
- Ability to create multiple tabs to host multiple shells
- Ability to change color schemes and fonts
- Support for copy and paste operations

The following list contains some examples of terminal applications:

- [Windows Terminal][10] - a modern terminal application for Windows that can host multiple shells.
- [Windows Console Host][09] - the default host application on Windows for text-based applications.
It can also host the Windows Command Shell or PowerShell.
- [Terminal for macOS][13] - the default terminal application on macOS that can host the bash or zsh
shell.
- [iTerm2 for macOS][11] - a popular 3rd-party terminal application for macOS.
- [Azure Cloud Shell][01] - a browser-based terminal application hosted in Microsoft Azure. Azure
Cloud shell gives you the choice of using bash or PowerShell. Each shell comes preconfigured with
many command-line tools for managing Azure resources.

<!-- link references -->
[01]: /azure/cloud-shell/overview
[02]: /cli/azure
[03]: /powershell/azure
[04]: /powershell/utility-modules/aishell/overview
[05]: /windows-server/administration/openssh/openssh-overview
[06]: /windows-server/administration/windows-commands/cmd
[07]: /windows-server/administration/windows-commands/netsh
[08]: /windows-server/administration/windows-commands/windows-commands
[09]: /windows/console/consoles
[10]: /windows/terminal
[11]: https://iterm2.com/
[12]: https://support.apple.com/102360
[13]: https://support.apple.com/guide/terminal/welcome/mac
[14]: https://wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop
[15]: https://www.gnu.org/software/bash/
[16]: overview.md