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
16 changes: 8 additions & 8 deletions reference/5.1/CimCmdlets/Set-CimInstance.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,9 @@ Accept wildcard characters: False

### -Namespace

Specifies the namespace for the CIM operation. The default namespace is root/cimv2. You can use tab
completion to browse the list of namespaces, because PowerShell gets a list of namespaces from the
local WMI server to provide the list of namespaces.
Specifies the namespace for the CIM operation. The default namespace is **root/CIMV2**. You can use
tab completion to browse the list of namespaces, because PowerShell gets a list of namespaces from
the local WMI server to provide the list of namespaces.

```yaml
Type: System.String
Expand Down Expand Up @@ -360,11 +360,11 @@ A URI consists of a prefix and a path to a resource. For example:
By default, if you do not specify this parameter, the DMTF standard resource URI
`http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/` is used and the class name is appended to it.

ResourceURI can only be used with CIM sessions created using the WSMan protocol, or when specifying
the ComputerName parameter, which creates a CIM session using WSMan. If you specify this parameter
without specifying the ComputerName parameter, or if you specify a CIM session created using DCOM
protocol, you will get an error, because the DCOM protocol does not support the ResourceURI
parameter.
**ResourceUri** can only be used with CIM sessions created using the WSMan protocol, or when
specifying the **ComputerName** parameter, which creates a CIM session using WSMan. If you specify
this parameter without specifying the **ComputerName** parameter, or if you specify a CIM session
created using DCOM protocol, you will get an error, because the DCOM protocol does not support the
**ResourceUri** parameter.

If both the **ResourceUri** parameter and the **Filter** parameter are specified, the **Filter**
parameter is ignored.
Expand Down
14 changes: 7 additions & 7 deletions reference/5.1/Microsoft.PowerShell.Core/About/About.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Provides a brief introduction to the PowerShell Desired State Configuration

### [about_Do](about_Do.md)

Runs a statement list one or more times, subject to a `While` or `Until`
Runs a statement list one or more times, subject to a `while` or `until`
condition.

### [about_Enum](about_Enum.md)
Expand Down Expand Up @@ -267,8 +267,8 @@ expression in the background without interacting with the current session.

### [about_Join](about_Join.md)

Describes how the join operator (-join) combines multiple strings into a single
string.
Describes how the join operator (`-join`) combines multiple strings into a
single string.

### [about_Language_Keywords](about_Language_Keywords.md)

Expand Down Expand Up @@ -377,7 +377,7 @@ command-line parameters and describes the syntax.

### [about_PowerShell_Ise_exe](about_PowerShell_Ise_exe.md)

Explains how to use the PowerShell_Ise.exe command-line tool.
Explains how to use the `powershell_ise.exe` command-line tool.

### [about_Preference_Variables](about_Preference_Variables.md)

Expand All @@ -389,8 +389,8 @@ Describes how to create and use a PowerShell profile.

### [about_Prompts](about_Prompts.md)

Describes the `Prompt` function and demonstrates how to create a custom
`Prompt` function.
Describes the `prompt` function and demonstrates how to create a custom
`prompt` function.

### [about_Properties](about_Properties.md)

Expand All @@ -417,7 +417,7 @@ The automatic variable that contains the current object in the pipeline object.

### [about_PSModulePath](about_PSModulePath.md)

This article the purpose and usage of the `$env:PSModulePath` environment
This article the purpose and usage of the `$Env:PSModulePath` environment
variable.

### [about_PSSession_Details](about_PSSession_Details.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Describes the features of PowerShell that use ANSI escape sequences
Locale: en-US
ms.date: 03/01/2023
schema: 2.0.0
title: about_ANSI_terminals
title: about_ANSI_Terminals
---
# about_ANSI_Terminals

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ current location is in the `Alias:` drive, the `-Path` parameter is not needed.
This command also uses the `-Options` dynamic parameter to set the **AllScope**
option on the alias. The `-Options` parameter is available in the `New-Item`
cmdlet only when you are in the `Alias:` drive. The dot (`.`) indicates the
current directory, which is the alias drive.
current directory, which is the `Alias:` drive.

```
PS Alias:\> New-Item -Path . -Name serv -Value Get-Service -Options "AllScope"
Expand All @@ -161,7 +161,7 @@ You can create an alias for any item that invokes a command.
This command creates the `np` alias for `Notepad.exe`.

```powershell
New-Item -Path Alias:np -Value c:\windows\notepad.exe
New-Item -Path Alias:np -Value C:\windows\notepad.exe
```

### Create an alias to a new function
Expand All @@ -177,7 +177,7 @@ When the command is complete, you can use either `CD32` or `go` to invoke the
function.

```powershell
function CD32 {Set-Location -Path c:\windows\system32}
function CD32 {Set-Location -Path C:\windows\system32}
Set-Item -Path Alias:go -Value CD32
```

Expand Down Expand Up @@ -313,7 +313,7 @@ Get-Help Get-ChildItem
```

```powershell
Get-Help Get-ChildItem -Path alias:
Get-Help Get-ChildItem -Path Alias:
```

## See also
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ following example, the negative value can't be cast to an unsigned integer, and
the unsigned integer is too large to be cast to `Int32`:

```powershell
([int32]::minvalue + [uint32]::maxvalue).GetType().FullName
([int32]::MinValue + [uint32]::MaxValue).GetType().FullName
```

```Output
Expand All @@ -241,10 +241,10 @@ The `System.Decimal` type is an exception. If either operand has the
**Decimal** value is an error.

```powershell
PS> [Decimal]::maxvalue
PS> [decimal]::MaxValue
79228162514264337593543950335

PS> [Decimal]::maxvalue + 1
PS> [decimal]::MaxValue + 1
RuntimeException: Value was either too large or too small for a Decimal.
```

Expand Down Expand Up @@ -454,12 +454,12 @@ InvalidOperation: A hash table can only be added to another hash table.

Although the addition operators are very useful, use the assignment operators
to add elements to hash tables and arrays. For more information see
[about_assignment_operators](about_Assignment_Operators.md). The following
[about_Assignment_Operators](about_Assignment_Operators.md). The following
examples use the `+=` assignment operator to add items to an array:

```powershell
$array = @()
(0..2).foreach{ $array += $_ }
(0..2).ForEach{ $array += $_ }
$array
```

Expand Down Expand Up @@ -497,15 +497,15 @@ The following examples show how to use the arithmetic operators in expressions
with PowerShell commands:

```powershell
(Get-Date) + (New-TimeSpan -day 1)
(Get-Date) + (New-TimeSpan -Day 1)
```

The parenthesis operator forces the evaluation of the `Get-Date` cmdlet and the
evaluation of the `New-TimeSpan -Day 1` cmdlet expression, in that order. Both
results are then added using the `+` operator.

```powershell
Get-Process | Where-Object { ($_.ws * 2) -gt 50mb }
Get-Process | Where-Object { ($_.WS * 2) -gt 50mb }
```

```Output
Expand All @@ -519,7 +519,7 @@ Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
967 30 58804 59496 416 930.97 2508 WINWORD
```

In the above expression, each process working space (`$_.ws`) is multiplied by
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
Expand All @@ -540,7 +540,7 @@ PowerShell supports the following bitwise operators.
| `-band` | Bitwise AND | `10 -band 3` | 2 |
| `-bor` | Bitwise OR (inclusive) | `10 -bor 3` | 11 |
| `-bxor` | Bitwise OR (exclusive) | `10 -bxor 3` | 9 |
| `-bnot` | Bitwise NOT | `-bNot 10` | -11 |
| `-bnot` | Bitwise NOT | `-bnot 10` | -11 |
| `-shl` | Shift-left | `102 -shl 2` | 408 |
| `-shr` | Shift-right | `102 -shr 1` | 51 |

Expand Down Expand Up @@ -587,7 +587,7 @@ For example, the binary complement of 0 is -1, the maximum unsigned integer
(0xFFFFFFFF), and the binary complement of -1 is 0.

```powershell
-bNot 10
-bnot 10
```

```Output
Expand Down
24 changes: 12 additions & 12 deletions reference/5.1/Microsoft.PowerShell.Core/About/about_Arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ value in an array, type:

```powershell
$a = 0..9
for ($i = 0; $i -le ($a.length - 1); $i += 2) {
for ($i = 0; $i -le ($a.Length - 1); $i += 2) {
$a[$i]
}
```
Expand Down Expand Up @@ -346,11 +346,11 @@ In PowerShell, arrays have three properties that indicate the number of items
contained in the array.

- **Count** - This property is the most commonly used property to determine the
number of items in any collection, not just an array. It's an `[Int32]` type
number of items in any collection, not just an array. It's an `[int32]` type
value. In Windows PowerShell 5.1 (and older) **Count** alias property for
**Length**.

- **Length** - This property is an `[Int32]` type value. This contains the same
- **Length** - This property is an `[int32]` type value. This contains the same
value as **Count**.

> [!NOTE]
Expand All @@ -359,7 +359,7 @@ contained in the array.
> string is the number of characters in the string. But the **Count**
> property is always `1`.

- **Longlength** - This property is an `[Int64]` type value. Use this property
- **LongLength** - This property is an `[int64]` type value. Use this property
for arrays containing more than 2,147,483,647 elements.

```powershell
Expand Down Expand Up @@ -408,8 +408,8 @@ Multidimensional arrays are stored in [row-major order][14]. The following
example shows how to create a truly multidimensional array.

```powershell
[string[,]]$rank2 = [string[,]]::New(3,2)
$rank2.rank
[string[,]]$rank2 = [string[,]]::new(3,2)
$rank2.Rank
$rank2.Length
$rank2[0,0] = 'a'
$rank2[0,1] = 'b'
Expand Down Expand Up @@ -487,7 +487,7 @@ True
In this example, `$intA` is explicitly typed to contain integers.

```powershell
[Int[]] $intA = 1, 2, 3
[int[]] $intA = 1, 2, 3
$intA.Clear()
$intA
```
Expand Down Expand Up @@ -552,7 +552,7 @@ For more information about the behavior of **ArgumentList**, see

The `ForEach()` method can be used to cast the elements to a different type;
the following example shows how to convert a list of string dates to
`[DateTime]` type.
`[datetime]` type.

```powershell
("1/1/2017", "2/1/2017", "3/1/2017").ForEach([datetime])
Expand Down Expand Up @@ -680,7 +680,7 @@ to return.

```powershell
# Get the zip files in the current users profile, sorted by LastAccessTime
$Zips = dir $env:userprofile -Recurse '*.zip' | Sort-Object LastAccessTime
$Zips = dir $Env:USERPROFILE -Recurse '*.zip' | Sort-Object LastAccessTime
# Get the least accessed file over 100MB
$Zips.Where({$_.Length -gt 100MB}, 'Default', 1)
```
Expand Down Expand Up @@ -876,7 +876,7 @@ create the `$t` array with all the elements in the `$a` array except for the
value at index position 2, type:

```powershell
$t = $a[0,1 + 3..($a.length - 1)]
$t = $a[0,1 + 3..($a.Length - 1)]
```

To combine two arrays into a single array, use the plus operator (`+`). The
Expand Down Expand Up @@ -1093,7 +1093,7 @@ LastWriteTimeUtc Property datetime LastWriteTimeUtc {get;set;}
## See also

- [about_For][05]
- [about_ForEach][06]
- [about_Foreach][06]
- [about_Hash_Tables][07]
- [about_Member-Access_Enumeration][09]
- [about_Operators][11]
Expand All @@ -1106,7 +1106,7 @@ LastWriteTimeUtc Property datetime LastWriteTimeUtc {get;set;}
[03]: about_Assignment_Operators.md
[04]: about_Booleans.md
[05]: about_For.md
[06]: about_ForEach.md
[06]: about_Foreach.md
[07]: about_Hash_Tables.md
[08]: about_Intrinsic_Members.md
[09]: about_Member-Access_Enumeration.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pipeline to a variable. For example, the following command sorts the services
on the computer and then assigns the sorted services to the `$a` variable:

```powershell
$a = Get-Service | Sort-Object -Property name
$a = Get-Service | Sort-Object -Property Name
```

You can also assign the value created by a statement to a variable, as in the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ non-zero integer.

### `$foreach`

Contains the enumerator (not the resulting values) of a [ForEach][56] loop. The
`$foreach` variable exists only while the `ForEach` loop is running; it's
Contains the enumerator (not the resulting values) of a [foreach][56] loop. The
`$foreach` variable exists only while the `foreach` loop is running; it's
deleted after the loop is completed.

Enumerators contain properties and methods you can use to retrieve loop values
Expand All @@ -215,18 +215,18 @@ and change the current loop iteration. For more information, see
### `$HOME`

Contains the full path of the user's home directory. This variable uses the
value of the `"$env:USERPROFILE"` Windows environment variable, typically
value of the `"$Env:USERPROFILE"` Windows environment variable, typically
`C:\Users\<UserName>`.

> [!IMPORTANT]
> Windows can redirect the location of the user's profile. This means that
> `$HOME` may not have the same value as `"$env:HOMEDRIVE$env:HOMEPATH"`.
> `$HOME` may not have the same value as `"$Env:HOMEDRIVE$Env:HOMEPATH"`.

### `$Host`

Contains an object that represents the current host application for PowerShell.
You can use this variable to represent the current host in commands or to
display or change the properties of the host, such as `$Host.version` or
display or change the properties of the host, such as `$Host.Version` or
`$Host.CurrentCulture`, or `$Host.UI.RawUI.BackGroundColor = "Red"`.

### $input
Expand Down Expand Up @@ -456,7 +456,7 @@ Test-Path $PROFILE
Or, you can use it in a command to create a profile:

```powershell
New-Item -ItemType file -Path $PROFILE -Force
New-Item -ItemType File -Path $PROFILE -Force
```

You can use it in a command to open the profile in **notepad.exe**:
Expand Down Expand Up @@ -550,7 +550,7 @@ available for use in module manifest files, whereas `$PSVersionTable` isn't.
### `$PSHOME`

Contains the full path of the installation directory for PowerShell, typically,
`$env:windir\System32\PowerShell\v1.0` in Windows systems. You can use this
`$Env:windir\System32\PowerShell\v1.0` in Windows systems. You can use this
variable in the paths of PowerShell files. For example, the following command
searches the conceptual Help topics for the word **Help**:

Expand Down Expand Up @@ -639,8 +639,8 @@ Contains a stack trace for the most recent error.

### `$switch`

Contains the enumerator not the resulting values of a `Switch` statement. The
`$switch` variable exists only while the `Switch` statement is running; it's
Contains the enumerator not the resulting values of a `switch` statement. The
`$switch` variable exists only while the `switch` statement is running; it's
deleted when the `switch` statement completes execution. For more information,
see [about_Switch][71].

Expand Down Expand Up @@ -1093,7 +1093,7 @@ Default (Current): End
[53]: about_CommonParameters.md
[54]: about_comparison_operators.md
[55]: about_Continue.md
[56]: about_ForEach.md
[56]: about_Foreach.md
[57]: about_Functions_Advanced_Methods.md
[58]: about_Functions_Advanced_Parameters.md
[59]: about_Functions_Advanced.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Examples:
# Empty collections
PS> [bool]@()
False
PS> [bool](Get-ChildItem | Where-Object Name -eq 'Non-existent-File.txt')
PS> [bool](Get-ChildItem | Where-Object Name -EQ 'Non-existent-File.txt')
False
# Single-element collections
PS> $a = @(0)
Expand Down
Loading