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
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/01-article.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ body:
- "5.1"
- "7.4"
- "7.5"
- "7.6"
- type: textarea
id: summary
validations:
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
ms.date: 01/03/2025
ms.date: 01/17/2025
---
# PowerShell Documentation

Expand Down Expand Up @@ -30,6 +30,7 @@ The following list describes the main folders in this repository.
- `5.1` - contains the cmdlet reference and about topics for PowerShell 5.1
- `7.4` - contains the cmdlet reference and about topics for PowerShell 7.4
- `7.5` - contains the cmdlet reference and about topics for PowerShell 7.5
- `7.6` - contains the cmdlet reference and about topics for PowerShell 7.6
- `bread` - contains the TOC used for breadcrumb navigation
- `docs-conceptual` - contains the conceptual articles that are published to the Docs site. In
general, the folder structure mirrors the Table of Contents (TOC).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ WindowsPowerShell/3.0" with slight variations for each operating system and plat

To test a website with the standard user agent string that is used by most Internet browsers, use
the properties of the [PSUserAgent](/dotnet/api/microsoft.powershell.commands) class, such as
Chrome, FireFox, Internet Explorer, Opera, and Safari.
Chrome, Firefox, Internet Explorer, Opera, and Safari.

```yaml
Type: System.String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ each operating system and platform.

To test a website with the standard user agent string that is used by most Internet browsers, use
the properties of the [PSUserAgent](/dotnet/api/microsoft.powershell.commands.psuseragent) class,
such as Chrome, FireFox, InternetExplorer, Opera, and Safari. For example, the following command
such as Chrome, Firefox, InternetExplorer, Opera, and Safari. For example, the following command
uses the user agent string for Internet Explorer:
`Invoke-WebRequest -Uri https://website.com/ -UserAgent ([Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer)`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,7 @@ variations for each operating system and platform.

To test a website with the standard user agent string that is used by most internet browsers, use
the properties of the [PSUserAgent](/dotnet/api/microsoft.powershell.commands.psuseragent) class,
such as Chrome, FireFox, InternetExplorer, Opera, and Safari.
such as Chrome, Firefox, InternetExplorer, Opera, and Safari.

```yaml
Type: System.String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,7 @@ variations for each operating system and platform.

To test a website with the standard user agent string that's used by most internet browsers, use the
properties of the [PSUserAgent](/dotnet/api/microsoft.powershell.commands.psuseragent) class, such
as Chrome, FireFox, InternetExplorer, Opera, and Safari.
as Chrome, Firefox, InternetExplorer, Opera, and Safari.

For example, the following command uses the user agent string for Internet Explorer:
`Invoke-WebRequest -Uri https://website.com/ -UserAgent ([Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer)`
Expand Down
4 changes: 2 additions & 2 deletions reference/7.5/CimCmdlets/Get-CimAssociatedInstance.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,6 @@ This cmdlet is only available on Windows platforms.

## RELATED LINKS

[Get-CimClass](get-cimclass.md)
[Get-CimClass](Get-CimClass.md)

[Get-CimInstance](get-ciminstance.md)
[Get-CimInstance](Get-CimInstance.md)
28 changes: 15 additions & 13 deletions reference/7.5/CimCmdlets/Get-CimInstance.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ the key property `@{ "Handle"=0 }` and stores it in a variable named `$x`. The v
a CIM instance to the `Get-CimInstance` cmdlet to get a particular instance.

```powershell
$x = New-CimInstance -ClassName Win32_Process -Namespace root\cimv2 -Property @{ "Handle"=0 } -Key Handle -ClientOnly
$x = New-CimInstance -ClassName Win32_Process -Namespace root\cimv2 -Property @{"Handle"=0} -Key Handle -ClientOnly
Get-CimInstance -CimInstance $x
```

Expand All @@ -156,7 +156,7 @@ the variables `$x` and `$y`. The variable `$x` is then formatted in a table cont

```powershell
$x,$y = Get-CimInstance -ClassName Win32_Process
$x | Format-Table -Property Name,KernelModeTime -AutoSize
$x | Format-Table -Property Name, KernelModeTime -AutoSize
```

```Output
Expand All @@ -171,7 +171,7 @@ This example retrieves the CIM instances of a class named **Win32_ComputerSystem
computers named **Server01** and **Server02**.

```powershell
Get-CimInstance -ClassName Win32_ComputerSystem -ComputerName Server01,Server02
Get-CimInstance -ClassName Win32_ComputerSystem -ComputerName Server01, Server02
```

### Example 8: Getting only the key properties, instead of all properties
Expand All @@ -190,8 +190,8 @@ This example retrieves only a subset of properties, which reduces the size of th
traffic.

```powershell
Get-CimInstance -Class Win32_Process -Property Name,KernelModeTime
$x = Get-CimInstance -Class Win32_Process -Property Name,KernelModeTime
Get-CimInstance -Class Win32_Process -Property Name, KernelModeTime
$x = Get-CimInstance -Class Win32_Process -Property Name, KernelModeTime
$x | Invoke-CimMethod -MethodName GetOwner
```

Expand All @@ -206,7 +206,7 @@ the variable are then passed to `Get-CimInstance` by using the **CimSession** pa
CIM instances of the class named **Win32_ComputerSystem**.

```powershell
$s = New-CimSession -ComputerName Server01,Server02
$s = New-CimSession -ComputerName Server01, Server02
Get-CimInstance -ClassName Win32_ComputerSystem -CimSession $s
```

Expand All @@ -216,7 +216,8 @@ Get-CimInstance -ClassName Win32_ComputerSystem -CimSession $s

Specifies the CIM session to use for this cmdlet. Enter a variable that contains the CIM session or
a command that creates or gets the CIM session, such as the `New-CimSession` or `Get-CimSession`
cmdlets. For more information, see [about_CimSession](../Microsoft.PowerShell.Core/About/about_CimSession.md).
cmdlets. For more information, see
[about_CimSession](../Microsoft.PowerShell.Core/About/about_CimSession.md).

```yaml
Type: Microsoft.Management.Infrastructure.CimSession[]
Expand Down Expand Up @@ -322,8 +323,8 @@ Accept wildcard characters: False
Indicates that only objects with key properties populated are returned. Specifying the **KeyOnly**
parameter reduces the amount of data transferred over the network.

Use the **KeyOnly** parameter to return only a small portion of the object, which can be used for other
operations, such as the `Set-CimInstance` or `Get-CimAssociatedInstance` cmdlets.
Use the **KeyOnly** parameter to return only a small portion of the object, which can be used for
other operations, such as the `Set-CimInstance` or `Get-CimAssociatedInstance` cmdlets.

```yaml
Type: System.Management.Automation.SwitchParameter
Expand Down Expand Up @@ -497,7 +498,8 @@ Accept wildcard characters: False

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-WarningAction, and -WarningVariable. For more information, see
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

Expand All @@ -523,18 +525,18 @@ This cmdlet is only available on Windows platforms.

## RELATED LINKS

[Format-Table](../microsoft.powershell.utility/format-table.md)
[Format-Table](../Microsoft.Powershell.Utility/Format-Table.md)

[Get-CimAssociatedInstance](Get-CimAssociatedInstance.md)

[Get-CimClass](Get-CimClass.md)

[Invoke-CimMethod](invoke-cimmethod.md)
[Invoke-CimMethod](Invoke-CimMethod.md)

[New-CimInstance](New-CimInstance.md)

[Register-CimIndicationEvent](Register-CimIndicationEvent.md)

[Remove-CimInstance](remove-ciminstance.md)
[Remove-CimInstance](Remove-CimInstance.md)

[Set-CimInstance](Set-CimInstance.md)
14 changes: 8 additions & 6 deletions reference/7.5/CimCmdlets/Get-CimSession.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ can use the parameters of `Get-CimSession` to get the sessions that are for part
you can identify sessions by their names or other identifiers. `Get-CimSession` does not get CIM
sessions that were created in other PowerShell sessions or that were created on other computers.

For more information about CIM sessions, see [about_CimSession](../Microsoft.PowerShell.Core/About/about_CimSession.md).
For more information about CIM sessions, see
[about_CimSession](../Microsoft.PowerShell.Core/About/about_CimSession.md).

## EXAMPLES

Expand All @@ -58,7 +59,7 @@ This example creates CIM sessions using [New-CimSession](New-CimSession.md), and
sessions using `Get-CimSession`.

```powershell
New-CimSession -ComputerName Server01,Server02
New-CimSession -ComputerName Server01, Server02
Get-CimSession
```

Expand Down Expand Up @@ -98,7 +99,7 @@ This example gets all CIM sessions in the current PowerShell session and display
only the **ComputerName** and **InstanceID** properties.

```powershell
Get-CimSession | Format-Table -Property ComputerName,InstanceId
Get-CimSession | Format-Table -Property ComputerName, InstanceId
```

```Output
Expand Down Expand Up @@ -171,7 +172,8 @@ Specifies the identifier of the CIM session to get. For multiple IDs, use commas
or use the range operator (`..`) to specify a range of IDs. An **Id** is an integer that uniquely
identifies the CIM session within the current PowerShell session.

For more information about the range operator, see [about_Operators](../Microsoft.PowerShell.Core/About/about_Operators.md).
For more information about the range operator, see
[about_Operators](../Microsoft.PowerShell.Core/About/about_Operators.md).

```yaml
Type: System.UInt32[]
Expand Down Expand Up @@ -254,10 +256,10 @@ This cmdlet is only available on Windows platforms.

## RELATED LINKS

[Format-Table](../microsoft.powershell.utility/format-table.md)
[Format-Table](../Microsoft.Powershell.Utility/Format-Table.md)

[New-CimSession](New-CimSession.md)

[Remove-CimSession](remove-cimsession.md)
[Remove-CimSession](Remove-CimSession.md)

[about_CimSession](../Microsoft.PowerShell.Core/About/about_CimSession.md)
6 changes: 3 additions & 3 deletions reference/7.5/CimCmdlets/Invoke-CimMethod.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ to `Invoke-CimMethod`.

```powershell
$c = Get-CimClass -ClassName Win32_Process
Invoke-CimMethod -CimClass $c -MethodName "xyz" -Arguments @{ CommandLine = 'notepad.exe' }
Invoke-CimMethod -CimClass $c -MethodName "xyz" -Arguments @{CommandLine='notepad.exe'}
```

## PARAMETERS
Expand Down Expand Up @@ -476,9 +476,9 @@ This cmdlet is only available on Windows platforms.

## RELATED LINKS

[Get-CimClass](get-cimclass.md)
[Get-CimClass](Get-CimClass.md)

[Get-CimInstance](get-ciminstance.md)
[Get-CimInstance](Get-CimInstance.md)

[Get-CimSession](Get-CimSession.md)

Expand Down
14 changes: 7 additions & 7 deletions reference/7.5/CimCmdlets/New-CimInstance.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,10 @@ Accept wildcard characters: False

Specifies the amount of time that the cmdlet waits for a response from the CIM server. By default,
the value of this parameter is 0, which means that the cmdlet uses the default timeout value for the
server. If the **OperationTimeoutSec** parameter is set to a value less than the robust connection retry
timeout of 3 minutes, network failures that last more than the value of the **OperationTimeoutSec**
parameter are not recoverable, because the operation on the server times out before the client can
reconnect.
server. If the **OperationTimeoutSec** parameter is set to a value less than the robust connection
retry timeout of 3 minutes, network failures that last more than the value of the
**OperationTimeoutSec** parameter are not recoverable, because the operation on the server times
out before the client can reconnect.

```yaml
Type: System.UInt32
Expand Down Expand Up @@ -412,10 +412,10 @@ This cmdlet is only available on Windows platforms.

## RELATED LINKS

[Get-CimClass](get-cimclass.md)
[Get-CimClass](Get-CimClass.md)

[Get-CimInstance](get-ciminstance.md)
[Get-CimInstance](Get-CimInstance.md)

[Remove-CimInstance](remove-ciminstance.md)
[Remove-CimInstance](Remove-CimInstance.md)

[Set-CimInstance](Set-CimInstance.md)
20 changes: 11 additions & 9 deletions reference/7.5/CimCmdlets/New-CimSession.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ title: New-CimSession
# New-CimSession

## SYNOPSIS

Creates a CIM session.

## SYNTAX
Expand Down Expand Up @@ -68,7 +67,7 @@ This example creates a CIM session to each of the computers specified by **Compu
comma separated list.

```powershell
New-CimSession -ComputerName Server01,Server02,Server03
New-CimSession -ComputerName Server01, Server02, Server03
```

### Example 4: Create a CIM session with a friendly name
Expand Down Expand Up @@ -130,9 +129,9 @@ parameter are:
- NtlmDomain
- CredSsp

You cannot use the **NtlmDomain** authentication type for connection to the local computer. **CredSSP**
authentication is available only in Windows Vista, Windows Server 2008, and later versions of
Windows.
You cannot use the **NtlmDomain** authentication type for connection to the local computer.
**CredSSP** authentication is available only in Windows Vista, Windows Server 2008, and later
versions of Windows.

> [!CAUTION]
> Credential Security Service Provider (CredSSP) authentication is designed for commands that
Expand Down Expand Up @@ -166,7 +165,8 @@ To get a certificate thumbprint, use the
[`Get-ChildItem`](../Microsoft.Powershell.Management/Get-ChildItem.md) cmdlets in the PowerShell
Certificate Provider.

For more information, see [about_Certificate_Provider](../Microsoft.PowerShell.Security/About/about_Certificate_Provider.md).
For more information, see
[about_Certificate_Provider](../Microsoft.PowerShell.Security/About/about_Certificate_Provider.md).

```yaml
Type: System.String
Expand Down Expand Up @@ -217,7 +217,8 @@ Specify the value for **Credential** using one of the following formats:
- A user name: "User01"
- A domain name and a user name: "Domain01\User01"
- A user principal name: "[email protected]"
- A PSCredential object, such as one returned by the [`Get-Credential`](../Microsoft.PowerShell.Security/Get-Credential.md) cmdlet.
- A PSCredential object, such as one returned by the
[`Get-Credential`](../Microsoft.PowerShell.Security/Get-Credential.md) cmdlet.

When you type a user name, you are prompted for a password.

Expand All @@ -237,8 +238,9 @@ Accept wildcard characters: False

Specifies a friendly name for the CIM session.

You can use the name to refer to the CIM session when using other cmdlets, such as the [Get-CimSession](Get-CimSession.md) cmdlet.
The name is not required to be unique to the computer or the current session.
You can use the name to refer to the CIM session when using other cmdlets, such as the
[Get-CimSession](Get-CimSession.md) cmdlet. The name is not required to be unique to the computer
or the current session.

```yaml
Type: System.String
Expand Down
11 changes: 6 additions & 5 deletions reference/7.5/CimCmdlets/New-CimSessionOption.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ parameter using one of the following formats:

- A culture name in `<languagecode2>-<country/regioncode2>` format such as "EN-US".
- A variable that contains a **CultureInfo** object.
- A command that gets a **CultureInfo** object, such as [Get-Culture](../Microsoft.PowerShell.Utility/Get-Culture.md)
- A command that gets a **CultureInfo** object, such as
[Get-Culture](../Microsoft.PowerShell.Utility/Get-Culture.md)

```yaml
Type: System.Globalization.CultureInfo
Expand Down Expand Up @@ -488,12 +489,12 @@ This cmdlet is only available on Windows platforms.

## RELATED LINKS

[Get-ChildItem](../microsoft.powershell.management/get-childitem.md)
[Get-ChildItem](../Microsoft.Powershell.Management/Get-ChildItem.md)

[Get-Credential](../microsoft.powershell.security/get-credential.md)
[Get-Credential](../Microsoft.Powershell.Security/Get-Credential.md)

[Get-Culture](../microsoft.powershell.utility/get-culture.md)
[Get-Culture](../Microsoft.Powershell.Utility/Get-Culture.md)

[Get-Item](../microsoft.powershell.management/get-item.md)
[Get-Item](../Microsoft.Powershell.Management/Get-Item.md)

[New-CimSession](New-CimSession.md)
14 changes: 7 additions & 7 deletions reference/7.5/CimCmdlets/Register-CimIndicationEvent.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ script block for **Action**, which uses the `$event` variable to access the even
$action = {
$name = $event.SourceEventArgs.NewEvent.ProcessName
$id = $event.SourceEventArgs.NewEvent.ProcessId
Write-Host -Object "New Process Started : Name = $name
ID = $id"
Write-Host -Object "New Process Started : Name = $name ID = $id"
}
Register-CimIndicationEvent -ClassName 'Win32_ProcessStartTrace' -SourceIdentifier "ProcessStarted" -Action $action
```

For more information, see [Win32_ProcessStartTrace](/previous-versions/windows/desktop/krnlprov/win32-processstarttrace).
For more information, see
[Win32_ProcessStartTrace](/previous-versions/windows/desktop/krnlprov/win32-processstarttrace).

### Example 4: Register the events on a remote computer

Expand Down Expand Up @@ -399,13 +399,13 @@ This cmdlet is only available on Windows platforms.

## RELATED LINKS

[Get-Event](../microsoft.powershell.utility/get-event.md)
[Get-Event](../Microsoft.Powershell.Utility/Get-Event.md)

[Remove-Event](../microsoft.powershell.utility/remove-event.md)
[Remove-Event](../Microsoft.Powershell.Utility/Remove-Event.md)

[Unregister-Event](../microsoft.powershell.utility/unregister-event.md)
[Unregister-Event](../Microsoft.Powershell.Utility/Unregister-Event.md)

[Write-Host](../microsoft.powershell.utility/write-host.md)
[Write-Host](../Microsoft.Powershell.Utility/Write-Host.md)

[Get-CimSession](Get-CimSession.md)

Expand Down
Loading