Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown and PS Styles #11706

Merged
merged 3 commits into from
Jan 21, 2025
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
14 changes: 14 additions & 0 deletions reference/5.1/CimCmdlets/CimCmdlets.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,43 +18,57 @@ Management Instrumentation (WMI) service.
## CimCmdlets Cmdlets

### [Export-BinaryMiLog](Export-BinaryMiLog.md)

Creates a binary encoded representation of an object or objects and stores it in a file.

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

Retrieves the CIM instances that are connected to a specific CIM instance by an association.

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

Gets a list of CIM classes in a specific namespace.

### [Get-CimInstance](Get-CimInstance.md)

Gets the CIM instances of a class from a CIM server.

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

Gets the CIM session objects from the current session.

### [Import-BinaryMiLog](Import-BinaryMiLog.md)

Used to re-create the saved objects based on the contents of an export file.

### [Invoke-CimMethod](Invoke-CimMethod.md)

Invokes a method of a CIM class.

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

Creates a CIM instance.

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

Creates a CIM session.

### [New-CimSessionOption](New-CimSessionOption.md)

Specifies advanced options for the `New-CimSession` cmdlet.

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

Subscribes to indications using a filter expression or a query expression.

### [Remove-CimInstance](Remove-CimInstance.md)

Removes a CIM instance from a computer.

### [Remove-CimSession](Remove-CimSession.md)

Removes one or more CIM sessions.

### [Set-CimInstance](Set-CimInstance.md)

Modifies a CIM instance on a CIM server by calling the **ModifyInstance** method of the CIM class.
6 changes: 3 additions & 3 deletions reference/5.1/CimCmdlets/Export-BinaryMiLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## RELATED LINKS

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

[Import-BinaryMiLog](import-binarymilog.md)
[Import-BinaryMiLog](Import-BinaryMiLog.md)

[Import-Clixml](../microsoft.powershell.utility/import-clixml.md)
[Import-Clixml](../Microsoft.Powershell.Utility/Import-Clixml.md)
4 changes: 2 additions & 2 deletions reference/5.1/CimCmdlets/Get-CimAssociatedInstance.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,6 @@ Windows PowerShell includes the following aliases for `Get-CimAssociatedInstance

## 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/5.1/CimCmdlets/Get-CimInstance.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,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 @@ -154,7 +154,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 @@ -169,7 +169,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 @@ -188,8 +188,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 @@ -204,7 +204,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 @@ -214,7 +214,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 @@ -320,8 +321,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 @@ -495,7 +496,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 @@ -514,18 +516,18 @@ the CIM server.

## 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)
15 changes: 9 additions & 6 deletions reference/5.1/CimCmdlets/Get-CimSession.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,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 @@ -56,7 +57,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 @@ -96,7 +97,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 @@ -169,7 +170,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 @@ -223,6 +225,7 @@ Accept wildcard characters: True
```

### CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
-WarningAction, and -WarningVariable. For more information, see
Expand All @@ -244,10 +247,10 @@ This cmdlet returns a CIM session object.

## 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)
1 change: 1 addition & 0 deletions reference/5.1/CimCmdlets/Import-BinaryMiLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Accept wildcard characters: True
```

### CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
-WarningAction, and -WarningVariable. For more information, see
Expand Down
6 changes: 3 additions & 3 deletions reference/5.1/CimCmdlets/Invoke-CimMethod.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,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 @@ -467,9 +467,9 @@ This cmdlet returns an object.

## 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/5.1/CimCmdlets/New-CimInstance.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,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 @@ -403,10 +403,10 @@ This cmdlet returns an object that contains the CIM instance information.

## 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)
38 changes: 22 additions & 16 deletions reference/5.1/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 All @@ -23,7 +22,7 @@ New-CimSession [-Authentication <PasswordAuthenticationMechanism>] [[-Credential
[-Port <UInt32>] [-SessionOption <CimSessionOptions>] [<CommonParameters>]
```

### CertificatePrameterSet
### CertificateParameterSet

```
New-CimSession [-CertificateThumbprint <String>] [[-ComputerName] <String[]>] [-Name <String>]
Expand Down Expand Up @@ -128,9 +127,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 @@ -164,11 +163,12 @@ 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
Parameter Sets: CertificatePrameterSet
Parameter Sets: CertificateParameterSet
Aliases:

Required: False
Expand Down Expand Up @@ -215,7 +215,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 @@ -235,7 +236,8 @@ 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.
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
Expand All @@ -254,9 +256,13 @@ Accept wildcard characters: False

Duration for which the cmdlet waits for a response from the server.

By default, the value of this parameter is 0, which means that the cmdlet uses the default timeout value for the 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.
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 All @@ -272,12 +278,12 @@ Accept wildcard characters: False

### -Port

Specifies the network port on the remote computer that is used for this connection.
To connect to a remote computer, the remote computer must be listening on the port that the connection uses.
The default ports are 5985 (the WinRM port for HTTP) and 5986 (the WinRM port for HTTPS).
Specifies the network port on the remote computer that is used for this connection. To connect to a
remote computer, the remote computer must be listening on the port that the connection uses. The
default ports are 5985 (the WinRM port for HTTP) and 5986 (the WinRM port for HTTPS).

Before using an alternate port, you must configure the WinRM listener on the remote computer to listen at that port.
Use the following commands to configure the listener:
Before using an alternate port, you must configure the WinRM listener on the remote computer to
listen at that port. Use the following commands to configure the listener:

`winrm delete winrm/config/listener?Address=*+Transport=HTTP`

Expand Down
Loading