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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ title: about_ANSI_Terminals
---
# about_ANSI_Terminals

## Short description
## SHORT DESCRIPTION
Describes the support available for ANSI escape sequences in Windows PowerShell.

## Long description
## LONG DESCRIPTION

Unlike newer versions of PowerShell, the Windows PowerShell 5.1 engine and core
cmdlets don't output ANSI escape sequences to format the text displayed on your
screen. However, that doesn't prevent you from using ANSI escape sequences for
text formatting in terminals that support it.

## ANSI Terminal support
## ANSI TERMINAL SUPPORT

On Windows 10 and higher, the Windows Console Host is [xterm][02] compatible.
The [Windows Terminal][03] application is also xterm compatible. These
Expand All @@ -31,7 +31,7 @@ The default colors were chosen for use with terminals that have a dark
background. You can change the colors needed for your environment. For more
information, see [Customizing your shell experience][01].

## Redirecting output
## REDIRECTING OUTPUT

You should be careful about creating output that's decorated with ANSI escape
sequences. The formatting is intended for display in the terminal. When you
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ title: about_Alias_Provider
---
# about_Alias_Provider

## Provider name
## PROVIDER NAME

Alias

## Drives
## DRIVES

`Alias:`

## Capabilities
## CAPABILITIES

**ShouldProcess**

## Short description
## SHORT DESCRIPTION

Provides access to the PowerShell aliases and the values that they represent.

## Detailed description
## DETAILED DESCRIPTION

The PowerShell **Alias** provider lets you get, add, change, clear, and delete
aliases in PowerShell.
Expand Down Expand Up @@ -58,12 +58,12 @@ cmdlets.
- [New-Alias][10]
- [Set-Alias][11]

## Types exposed by this provider
## TYPES EXPOSED BY THIS PROVIDER

Each alias is an instance of the [System.Management.Automation.AliasInfo][12]
class.

## Navigating the Alias drive
## NAVIGATING THE ALIAS DRIVE

The **Alias** provider exposes its data store in the `Alias:` drive. To work
with aliases, you can change your location to the `Alias:` drive by using the
Expand Down Expand Up @@ -139,7 +139,7 @@ cmdlet name.
Get-Item -Path Alias:* | Where-Object {$_.Definition -eq "Get-ChildItem"}
```

## Creating aliases
## CREATING ALIASES

### Create an alias from the Alias: drive

Expand Down Expand Up @@ -181,7 +181,7 @@ function CD32 {Set-Location -Path C:\windows\system32}
Set-Item -Path Alias:go -Value CD32
```

## Changing aliases
## CHANGING ALIASES

### Change the options of an alias

Expand Down Expand Up @@ -226,7 +226,7 @@ This command uses the `Rename-Item` cmdlet to change the `popd` alias to `pop`.
Rename-Item -Path Alias:popd -NewName pop
```

## Copying an alias
## COPYING AN ALIAS

This command copies the `pushd` alias so that a new `push` alias is created for
the `Push-Location` cmdlet.
Expand All @@ -240,7 +240,7 @@ the `-Path` parameter.
Copy-Item -Path Alias:pushd -Destination Alias:push
```

## Deleting an alias
## DELETING AN ALIAS

This command deletes the `serv` alias from the current session.
You can use this command in any PowerShell drive.
Expand All @@ -267,7 +267,7 @@ allows the command to delete aliases whose **Options** property has a value of
Remove-Item Alias:* -Force
```

## Dynamic parameters
## DYNAMIC PARAMETERS

Dynamic parameters are cmdlet parameters that are added by a PowerShell
provider and are available only when the cmdlet is being used in the
Expand All @@ -292,14 +292,14 @@ Determines the value of the **Options** property of an alias.
- [New-Item][04]
- [Set-Item][14]

## Using the pipeline
## USING THE PIPELINE

Provider cmdlets accept pipeline input. You can use the pipeline to simplify
task by sending provider data from one cmdlet to another provider cmdlet.
To read more about how to use the pipeline with provider cmdlets, see the
cmdlet references provided throughout this article.

## Getting help
## GETTING HELP

Beginning in Windows PowerShell 3.0, you can get customized help topics for
provider cmdlets that explain how those cmdlets behave in a file system drive.
Expand All @@ -316,7 +316,7 @@ Get-Help Get-ChildItem
Get-Help Get-ChildItem -Path Alias:
```

## See also
## SEE ALSO

- [about_Aliases][16]
- [about_Providers][17]
Expand Down
22 changes: 11 additions & 11 deletions reference/5.1/Microsoft.PowerShell.Core/About/about_Aliases.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ title: about_Aliases
---
# about_Aliases

## Short description
## SHORT DESCRIPTION

Describes how to use alternate names for cmdlets and commands in PowerShell.

## Long description
## LONG DESCRIPTION

An alias is an alternate name or nickname for a cmdlet or for a command
element, such as a function, script, file, or executable file. You can use the
Expand Down Expand Up @@ -47,7 +47,7 @@ If you create `word` as the alias for Microsoft Office Word, you can type
"C:\Program Files\Microsoft Office\Office11\Winword.exe"
```

## Built-in aliases
## BUILT-IN ALIASES

PowerShell includes a set of built-in aliases, including `cd` and `chdir` for
the `Set-Location` cmdlet, and `ls` and `dir` for the `Get-ChildItem` cmdlet.
Expand All @@ -58,7 +58,7 @@ To get all the aliases on the computer, including the built-in aliases, type:
Get-Alias
```

## Alias cmdlets
## ALIAS CMDLETS

PowerShell includes the following cmdlets, which are designed for working with
aliases:
Expand All @@ -81,7 +81,7 @@ For example, type:
Get-Help Export-Alias -Detailed
```

## Creating an alias
## CREATING AN ALIAS

To create a new alias, use the `New-Alias` cmdlet. For example, to create the
`gh` alias for `Get-Help`, type:
Expand All @@ -105,7 +105,7 @@ Or, type:
gh Get-CimInstance -Detailed
```

## Saving aliases
## SAVING ALIASES

The aliases that you create are saved only in the current session. To use the
aliases in a different session, add the alias to your PowerShell profile. Or,
Expand All @@ -117,7 +117,7 @@ For more information, type:
Get-Help about_Profiles
```

## Getting aliases
## GETTING ALIASES

To get all the aliases in the current session, including the built-in aliases,
the aliases in your PowerShell profiles, and the aliases that you have created
Expand Down Expand Up @@ -164,7 +164,7 @@ hyphen. These are likely to be preferred substitute names for cmdlets and
functions, instead of typical abbreviations or nicknames, and the author might
not want them to be as evident.

## Alternate names for commands with parameters
## ALTERNATE NAMES FOR COMMANDS WITH PARAMETERS

You can assign an alias to a cmdlet, script, function, or executable file. You
cannot assign an alias to a command and its parameters. For example, you can
Expand Down Expand Up @@ -192,7 +192,7 @@ For more information about functions, type:
Get-Help about_Functions
```

## Alias objects
## ALIAS OBJECTS

PowerShell aliases are represented by objects that are instances of the
System.Management.Automation.AliasInfo class. For more information about this
Expand All @@ -216,7 +216,7 @@ the `dir` alias. The following command performs these tasks:
Get-Alias -Name dir | Format-List -Property *
```

## PowerShell Alias provider
## POWERSHELL ALIAS PROVIDER

PowerShell includes the Alias provider. The Alias provider lets you view the
aliases in PowerShell as though they were on a file system drive.
Expand Down Expand Up @@ -255,7 +255,7 @@ For more information about the PowerShell Alias provider, type:
Get-Help Alias
```

## See also
## SEE ALSO

- [about_Functions](about_Functions.md)
- [about_Profiles](about_Profiles.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ title: about_Arithmetic_Operators
---
# about_Arithmetic_Operators

## Short description
## SHORT DESCRIPTION

Describes the operators that perform arithmetic in PowerShell.

## Long description
## LONG DESCRIPTION

Arithmetic operators calculate numeric values. You can use one or more
arithmetic operators to add, subtract, multiply, and divide values, and to
Expand Down Expand Up @@ -107,7 +107,7 @@ PowerShell supports the following arithmetic operators:
102 -shr 2 # result = 25
```

## Operator precedence
## OPERATOR PRECEDENCE

PowerShell processes arithmetic operators in the following order:

Expand Down Expand Up @@ -160,7 +160,7 @@ $a = $a + 1
$b[$a] = $tmp
```

## Division and rounding
## DIVISION AND ROUNDING

When the quotient of a division operation is an integer, PowerShell rounds the
value to the nearest integer. When the value is `.5`, it rounds to the nearest
Expand Down Expand Up @@ -192,7 +192,7 @@ PS> [int][Math]::Floor(5 / 2)
For more information, see the [Math.Round](/dotnet/api/system.math.round)
method.

## Type conversion to accommodate result
## TYPE CONVERSION TO ACCOMMODATE RESULT

PowerShell automatically selects the .NET numeric type that best expresses the
result without losing precision. For example:
Expand Down Expand Up @@ -309,7 +309,7 @@ PS> 1 / [int]1.9
0.5
```

## Adding and multiplying non numeric types
## ADDING AND MULTIPLYING NON NUMERIC TYPES

You can add numbers, strings, arrays, and hash tables. And, you can multiply
numbers, strings, and arrays. However, you can't multiply hash tables.
Expand Down Expand Up @@ -469,7 +469,7 @@ $array
2
```

## Arithmetic operators and variables
## ARITHMETIC OPERATORS AND VARIABLES

You can also use arithmetic operators with variables. The operators act on the
values of the variables. The following examples demonstrate the use of
Expand All @@ -487,7 +487,7 @@ PS> $a + $b
PowerShell
```

## Arithmetic operators and commands
## ARITHMETIC OPERATORS AND COMMANDS

Typically, you use the arithmetic operators in expressions with numbers,
strings, and arrays. However, you can also use arithmetic operators with the
Expand Down Expand Up @@ -522,7 +522,7 @@ Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
In the above expression, each process working space (`$_.WS`) is multiplied by
`2`; and, the result, compared against `50mb` to see if it's greater than that.

## Bitwise operators
## BITWISE OPERATORS

PowerShell supports the standard bitwise operators, including bitwise-AND
(`-band`), the inclusive and exclusive bitwise-OR operators (`-bor` and
Expand Down Expand Up @@ -631,7 +631,7 @@ unsigned values, a zero is inserted in the left-most position.
| `(-21 -shr 1)` | -11 | 11111111111111111111111111110101 | 0xFFFFFFF5 |
| `(-21 -shr 2)` | -6 | 11111111111111111111111111111010 | 0xFFFFFFF4 |

## See also
## SEE ALSO

- [about_Arrays](about_Arrays.md)
- [about_Hash_Tables](about_Hash_Tables.md)
Expand Down
Loading
Loading