Skip to content

Commit 317a70b

Browse files
authored
Merge pull request #11808 from MicrosoftDocs/main
2/17/2025 PM Publish
2 parents 624fc7a + 0a67499 commit 317a70b

16 files changed

+249
-189
lines changed

reference/5.1/CimCmdlets/Get-CimClass.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ Gets a list of CIM classes in a specific namespace.
1818
### ComputerSet (Default)
1919

2020
```
21-
Get-CimClass [[-ClassName] <String>] [[-Namespace] <String>] [-OperationTimeoutSec <UInt32>]
22-
[-ComputerName <String[]>] [-MethodName <String>] [-PropertyName <String>]
23-
[-QualifierName <String>] [<CommonParameters>]
21+
Get-CimClass [[-ClassName] <String>] [[-Namespace] <String>]
22+
[-OperationTimeoutSec <UInt32>] [-ComputerName <String[]>] [-MethodName <String>]
23+
[-PropertyName <String>] [-QualifierName <String>] [<CommonParameters>]
2424
```
2525

2626
### SessionSet
2727

2828
```
29-
Get-CimClass [[-ClassName] <String>] [[-Namespace] <String>] [-OperationTimeoutSec <UInt32>]
30-
-CimSession <CimSession[]> [-MethodName <String>] [-PropertyName <String>]
31-
[-QualifierName <String>] [<CommonParameters>]
29+
Get-CimClass [[-ClassName] <String>] [[-Namespace] <String>]
30+
[-OperationTimeoutSec <UInt32>] -CimSession <CimSession[]> [-MethodName <String>]
31+
[-PropertyName <String>] [-QualifierName <String>] [<CommonParameters>]
3232
```
3333

3434
## DESCRIPTION

reference/5.1/CimCmdlets/Get-CimInstance.md

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ Gets the CIM instances of a class from a CIM server.
1818
### ClassNameComputerSet (Default)
1919

2020
```
21-
Get-CimInstance [-ClassName] <String> [-ComputerName <String[]>] [-KeyOnly] [-Namespace <String>]
22-
[-OperationTimeoutSec <UInt32>] [-QueryDialect <String>] [-Shallow] [-Filter <String>]
23-
[-Property <String[]>] [<CommonParameters>]
21+
Get-CimInstance [-ClassName] <String> [-ComputerName <String[]>] [-KeyOnly]
22+
[-Namespace <String>] [-OperationTimeoutSec <UInt32>] [-QueryDialect <String>] [-Shallow]
23+
[-Filter <String>] [-Property <String[]>] [<CommonParameters>]
2424
```
2525

2626
### ResourceUriSessionSet
2727

2828
```
29-
Get-CimInstance -CimSession <CimSession[]> -ResourceUri <Uri> [-KeyOnly] [-Namespace <String>]
30-
[-OperationTimeoutSec <UInt32>] [-Shallow] [-Filter <String>] [-Property <String[]>]
31-
[<CommonParameters>]
29+
Get-CimInstance -CimSession <CimSession[]> -ResourceUri <Uri> [-KeyOnly]
30+
[-Namespace <String>] [-OperationTimeoutSec <UInt32>] [-Shallow] [-Filter <String>]
31+
[-Property <String[]>] [<CommonParameters>]
3232
```
3333

3434
### QuerySessionSet
@@ -42,31 +42,31 @@ Get-CimInstance -CimSession <CimSession[]> [-ResourceUri <Uri>] [-Namespace <Str
4242
### ClassNameSessionSet
4343

4444
```
45-
Get-CimInstance -CimSession <CimSession[]> [-ClassName] <String> [-KeyOnly] [-Namespace <String>]
46-
[-OperationTimeoutSec <UInt32>] [-QueryDialect <String>] [-Shallow] [-Filter <String>]
47-
[-Property <String[]>] [<CommonParameters>]
45+
Get-CimInstance -CimSession <CimSession[]> [-ClassName] <String> [-KeyOnly]
46+
[-Namespace <String>] [-OperationTimeoutSec <UInt32>] [-QueryDialect <String>] [-Shallow]
47+
[-Filter <String>] [-Property <String[]>] [<CommonParameters>]
4848
```
4949

5050
### CimInstanceSessionSet
5151

5252
```
53-
Get-CimInstance -CimSession <CimSession[]> [-ResourceUri <Uri>] [-OperationTimeoutSec <UInt32>]
54-
[-InputObject] <CimInstance> [<CommonParameters>]
53+
Get-CimInstance -CimSession <CimSession[]> [-ResourceUri <Uri>]
54+
[-OperationTimeoutSec <UInt32>] [-InputObject] <CimInstance> [<CommonParameters>]
5555
```
5656

5757
### CimInstanceComputerSet
5858

5959
```
60-
Get-CimInstance [-ResourceUri <Uri>] [-ComputerName <String[]>] [-OperationTimeoutSec <UInt32>]
61-
[-InputObject] <CimInstance> [<CommonParameters>]
60+
Get-CimInstance [-ResourceUri <Uri>] [-ComputerName <String[]>]
61+
[-OperationTimeoutSec <UInt32>] [-InputObject] <CimInstance> [<CommonParameters>]
6262
```
6363

6464
### ResourceUriComputerSet
6565

6666
```
67-
Get-CimInstance -ResourceUri <Uri> [-ComputerName <String[]>] [-KeyOnly] [-Namespace <String>]
68-
[-OperationTimeoutSec <UInt32>] [-Shallow] [-Filter <String>] [-Property <String[]>]
69-
[<CommonParameters>]
67+
Get-CimInstance -ResourceUri <Uri> [-ComputerName <String[]>] [-KeyOnly]
68+
[-Namespace <String>] [-OperationTimeoutSec <UInt32>] [-Shallow] [-Filter <String>]
69+
[-Property <String[]>] [<CommonParameters>]
7070
```
7171

7272
### QueryComputerSet
@@ -142,7 +142,16 @@ the key property `@{ "Handle"=0 }` and stores it in a variable named `$x`. The v
142142
a CIM instance to the `Get-CimInstance` cmdlet to get a particular instance.
143143

144144
```powershell
145-
$x = New-CimInstance -ClassName Win32_Process -Namespace root\cimv2 -Property @{"Handle"=0} -Key Handle -ClientOnly
145+
$instance = @{
146+
ClassName = 'Win32_Process'
147+
Namespace = 'root\cimv2'
148+
Properties = @{
149+
Handle = 0
150+
}
151+
Key = 'Handle'
152+
ClientOnly = $true
153+
}
154+
$x = New-CimInstance @instance
146155
Get-CimInstance -CimInstance $x
147156
```
148157

@@ -153,7 +162,7 @@ the variables `$x` and `$y`. The variable `$x` is then formatted in a table cont
153162
**Name** and **KernelModeTime** properties, the table set to **AutoSize**.
154163

155164
```powershell
156-
$x,$y = Get-CimInstance -ClassName Win32_Process
165+
$x, $y = Get-CimInstance -ClassName Win32_Process
157166
$x | Format-Table -Property Name, KernelModeTime -AutoSize
158167
```
159168

reference/5.1/CimCmdlets/Get-CimSession.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Protocol : WSMAN
134134
This example gets the CIM session that has an **Id** of 2.
135135

136136
```powershell
137-
Get-CimSession -ID 2
137+
Get-CimSession -Id 2
138138
```
139139

140140
```Output

reference/5.1/CimCmdlets/Invoke-CimMethod.md

Lines changed: 35 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,63 +18,65 @@ Invokes a method of a CIM class.
1818
### ClassNameComputerSet (Default)
1919

2020
```
21-
Invoke-CimMethod [-ClassName] <String> [-ComputerName <String[]>] [[-Arguments] <IDictionary>]
22-
[-MethodName] <String> [-Namespace <String>] [-OperationTimeoutSec <UInt32>] [-WhatIf] [-Confirm]
23-
[<CommonParameters>]
21+
Invoke-CimMethod [-ClassName] <String> [-ComputerName <String[]>]
22+
[[-Arguments] <IDictionary>] [-MethodName] <String> [-Namespace <String>]
23+
[-OperationTimeoutSec <UInt32>] [-WhatIf] [-Confirm] [<CommonParameters>]
2424
```
2525

2626
### ClassNameSessionSet
2727

2828
```
29-
Invoke-CimMethod [-ClassName] <String> -CimSession <CimSession[]> [[-Arguments] <IDictionary>]
30-
[-MethodName] <String> [-Namespace <String>] [-OperationTimeoutSec <UInt32>] [-WhatIf] [-Confirm]
31-
[<CommonParameters>]
29+
Invoke-CimMethod [-ClassName] <String> -CimSession <CimSession[]>
30+
[[-Arguments] <IDictionary>] [-MethodName] <String> [-Namespace <String>]
31+
[-OperationTimeoutSec <UInt32>] [-WhatIf] [-Confirm] [<CommonParameters>]
3232
```
3333

3434
### ResourceUriComputerSet
3535

3636
```
37-
Invoke-CimMethod -ResourceUri <Uri> [-ComputerName <String[]>] [[-Arguments] <IDictionary>]
38-
[-MethodName] <String> [-Namespace <String>] [-OperationTimeoutSec <UInt32>] [-WhatIf] [-Confirm]
39-
[<CommonParameters>]
37+
Invoke-CimMethod -ResourceUri <Uri> [-ComputerName <String[]>]
38+
[[-Arguments] <IDictionary>] [-MethodName] <String> [-Namespace <String>]
39+
[-OperationTimeoutSec <UInt32>] [-WhatIf] [-Confirm] [<CommonParameters>]
4040
```
4141

4242
### CimInstanceSessionSet
4343

4444
```
45-
Invoke-CimMethod [-ResourceUri <Uri>] [-InputObject] <CimInstance> -CimSession <CimSession[]>
46-
[[-Arguments] <IDictionary>] [-MethodName] <String> [-OperationTimeoutSec <UInt32>] [-WhatIf]
47-
[-Confirm] [<CommonParameters>]
45+
Invoke-CimMethod [-ResourceUri <Uri>] [-InputObject] <CimInstance>
46+
-CimSession <CimSession[]> [[-Arguments] <IDictionary>] [-MethodName] <String>
47+
[-OperationTimeoutSec <UInt32>] [-WhatIf] [-Confirm] [<CommonParameters>]
4848
```
4949

5050
### CimInstanceComputerSet
5151

5252
```
53-
Invoke-CimMethod [-ResourceUri <Uri>] [-InputObject] <CimInstance> [-ComputerName <String[]>]
54-
[[-Arguments] <IDictionary>] [-MethodName] <String> [-OperationTimeoutSec <UInt32>] [-WhatIf]
55-
[-Confirm] [<CommonParameters>]
53+
Invoke-CimMethod [-ResourceUri <Uri>] [-InputObject] <CimInstance>
54+
[-ComputerName <String[]>] [[-Arguments] <IDictionary>] [-MethodName] <String>
55+
[-OperationTimeoutSec <UInt32>] [-WhatIf] [-Confirm] [<CommonParameters>]
5656
```
5757

5858
### ResourceUriSessionSet
5959

6060
```
61-
Invoke-CimMethod -ResourceUri <Uri> -CimSession <CimSession[]> [[-Arguments] <IDictionary>]
62-
[-MethodName] <String> [-Namespace <String>] [-OperationTimeoutSec <UInt32>] [-WhatIf] [-Confirm]
63-
[<CommonParameters>]
61+
Invoke-CimMethod -ResourceUri <Uri> -CimSession <CimSession[]>
62+
[[-Arguments] <IDictionary>] [-MethodName] <String> [-Namespace <String>]
63+
[-OperationTimeoutSec <UInt32>] [-WhatIf] [-Confirm] [<CommonParameters>]
6464
```
6565

6666
### CimClassComputerSet
6767

6868
```
69-
Invoke-CimMethod [-CimClass] <CimClass> [-ComputerName <String[]>] [[-Arguments] <IDictionary>]
70-
[-MethodName] <String> [-OperationTimeoutSec <UInt32>] [-WhatIf] [-Confirm] [<CommonParameters>]
69+
Invoke-CimMethod [-CimClass] <CimClass> [-ComputerName <String[]>]
70+
[[-Arguments] <IDictionary>] [-MethodName] <String> [-OperationTimeoutSec <UInt32>]
71+
[-WhatIf] [-Confirm] [<CommonParameters>]
7172
```
7273

7374
### CimClassSessionSet
7475

7576
```
76-
Invoke-CimMethod [-CimClass] <CimClass> -CimSession <CimSession[]> [[-Arguments] <IDictionary>]
77-
[-MethodName] <String> [-OperationTimeoutSec <UInt32>] [-WhatIf] [-Confirm] [<CommonParameters>]
77+
Invoke-CimMethod [-CimClass] <CimClass> -CimSession <CimSession[]>
78+
[[-Arguments] <IDictionary>] [-MethodName] <String> [-OperationTimeoutSec <UInt32>]
79+
[-WhatIf] [-Confirm] [<CommonParameters>]
7880
```
7981

8082
### QueryComputerSet
@@ -122,7 +124,11 @@ If the **InputObject** parameter is specified, the cmdlet works in one of the fo
122124
This example invokes the **Terminate** method of the **Win32_Process** class.
123125

124126
```powershell
125-
Invoke-CimMethod -Query 'select * from Win32_Process where name like "notepad%"' -MethodName "Terminate"
127+
$method = @{
128+
Query = 'select * from Win32_Process where name like "notepad%"'
129+
MethodName = "Terminate"
130+
}
131+
Invoke-CimMethod @method
126132
```
127133

128134
### Example 2: Invoke a method using CIM instance object
@@ -265,7 +271,7 @@ to invoke instance methods. To invoke class static methods, use the **Class** pa
265271

266272
```yaml
267273
Type: Microsoft.Management.Infrastructure.CimInstance
268-
Parameter Sets: CimInstanceSessionSet, CimInstanceComputerSet
274+
Parameter Sets: CimInstanceComputerSet, CimInstanceSessionSet
269275
Aliases: CimInstance
270276
271277
Required: True
@@ -300,7 +306,7 @@ the local WMI server to provide the list of namespaces.
300306

301307
```yaml
302308
Type: System.String
303-
Parameter Sets: ClassNameComputerSet, ClassNameSessionSet, ResourceUriComputerSet, ResourceUriSessionSet, QueryComputerSet, QuerySessionSet
309+
Parameter Sets: ClassNameComputerSet, ClassNameSessionSet, ResourceUriComputerSet, ResourceUriSessionSet, QuerySessionSet, QueryComputerSet
304310
Aliases:
305311
306312
Required: False
@@ -343,7 +349,7 @@ them in square brackets (`[]`): percent (`%`), underscore (`_`), or opening squa
343349

344350
```yaml
345351
Type: System.String
346-
Parameter Sets: QueryComputerSet, QuerySessionSet
352+
Parameter Sets: QuerySessionSet, QueryComputerSet
347353
Aliases:
348354
349355
Required: True
@@ -362,7 +368,7 @@ The default value is **WQL**.
362368

363369
```yaml
364370
Type: System.String
365-
Parameter Sets: QueryComputerSet, QuerySessionSet
371+
Parameter Sets: QuerySessionSet, QueryComputerSet
366372
Aliases:
367373
368374
Required: False
@@ -398,7 +404,7 @@ parameter is ignored.
398404

399405
```yaml
400406
Type: System.Uri
401-
Parameter Sets: ResourceUriSessionSet, ResourceUriComputerSet
407+
Parameter Sets: CimInstanceComputerSet, CimInstanceSessionSet
402408
Aliases:
403409
404410
Required: True (ResourceUriSessionSet, ResourceUriComputerSet), False (CimInstanceSessionSet, CimInstanceComputerSet)
@@ -445,7 +451,7 @@ Accept wildcard characters: False
445451
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
446452
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
447453
-WarningAction, and -WarningVariable. For more information, see
448-
[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
454+
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
449455

450456
## INPUTS
451457

reference/7.4/CimCmdlets/Get-CimClass.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Get-CimClass [[-ClassName] <string>] [[-Namespace] <string>] [-Amended]
2626
### SessionSet
2727

2828
```
29-
Get-CimClass [[-ClassName] <string>] [[-Namespace] <string>] -CimSession <CimSession[]> [-Amended]
30-
[-OperationTimeoutSec <uint>] [-MethodName <string>] [-PropertyName <string>]
29+
Get-CimClass [[-ClassName] <string>] [[-Namespace] <string>] -CimSession <CimSession[]>
30+
[-Amended] [-OperationTimeoutSec <uint>] [-MethodName <string>] [-PropertyName <string>]
3131
[-QualifierName <string>] [<CommonParameters>]
3232
```
3333

reference/7.4/CimCmdlets/Get-CimInstance.md

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ Gets the CIM instances of a class from a CIM server.
1818
### ClassNameComputerSet (Default)
1919

2020
```
21-
Get-CimInstance [-ClassName] <String> [-ComputerName <String[]>] [-KeyOnly] [-Namespace <String>]
22-
[-OperationTimeoutSec <UInt32>] [-QueryDialect <String>] [-Shallow] [-Filter <String>]
23-
[-Property <String[]>] [<CommonParameters>]
21+
Get-CimInstance [-ClassName] <String> [-ComputerName <String[]>] [-KeyOnly]
22+
[-Namespace <String>] [-OperationTimeoutSec <UInt32>] [-QueryDialect <String>] [-Shallow]
23+
[-Filter <String>] [-Property <String[]>] [<CommonParameters>]
2424
```
2525

2626
### ResourceUriSessionSet
2727

2828
```
29-
Get-CimInstance -CimSession <CimSession[]> -ResourceUri <Uri> [-KeyOnly] [-Namespace <String>]
30-
[-OperationTimeoutSec <UInt32>] [-Shallow] [-Filter <String>] [-Property <String[]>]
31-
[<CommonParameters>]
29+
Get-CimInstance -CimSession <CimSession[]> -ResourceUri <Uri> [-KeyOnly]
30+
[-Namespace <String>] [-OperationTimeoutSec <UInt32>] [-Shallow] [-Filter <String>]
31+
[-Property <String[]>] [<CommonParameters>]
3232
```
3333

3434
### QuerySessionSet
@@ -42,31 +42,31 @@ Get-CimInstance -CimSession <CimSession[]> [-ResourceUri <Uri>] [-Namespace <Str
4242
### ClassNameSessionSet
4343

4444
```
45-
Get-CimInstance -CimSession <CimSession[]> [-ClassName] <String> [-KeyOnly] [-Namespace <String>]
46-
[-OperationTimeoutSec <UInt32>] [-QueryDialect <String>] [-Shallow] [-Filter <String>]
47-
[-Property <String[]>] [<CommonParameters>]
45+
Get-CimInstance -CimSession <CimSession[]> [-ClassName] <String> [-KeyOnly]
46+
[-Namespace <String>] [-OperationTimeoutSec <UInt32>] [-QueryDialect <String>] [-Shallow]
47+
[-Filter <String>] [-Property <String[]>] [<CommonParameters>]
4848
```
4949

5050
### CimInstanceSessionSet
5151

5252
```
53-
Get-CimInstance -CimSession <CimSession[]> [-ResourceUri <Uri>] [-OperationTimeoutSec <UInt32>]
54-
[-InputObject] <CimInstance> [<CommonParameters>]
53+
Get-CimInstance -CimSession <CimSession[]> [-ResourceUri <Uri>]
54+
[-OperationTimeoutSec <UInt32>] [-InputObject] <CimInstance> [<CommonParameters>]
5555
```
5656

5757
### CimInstanceComputerSet
5858

5959
```
60-
Get-CimInstance [-ResourceUri <Uri>] [-ComputerName <String[]>] [-OperationTimeoutSec <UInt32>]
61-
[-InputObject] <CimInstance> [<CommonParameters>]
60+
Get-CimInstance [-ResourceUri <Uri>] [-ComputerName <String[]>]
61+
[-OperationTimeoutSec <UInt32>] [-InputObject] <CimInstance> [<CommonParameters>]
6262
```
6363

6464
### ResourceUriComputerSet
6565

6666
```
67-
Get-CimInstance -ResourceUri <Uri> [-ComputerName <String[]>] [-KeyOnly] [-Namespace <String>]
68-
[-OperationTimeoutSec <UInt32>] [-Shallow] [-Filter <String>] [-Property <String[]>]
69-
[<CommonParameters>]
67+
Get-CimInstance -ResourceUri <Uri> [-ComputerName <String[]>] [-KeyOnly]
68+
[-Namespace <String>] [-OperationTimeoutSec <UInt32>] [-Shallow] [-Filter <String>]
69+
[-Property <String[]>] [<CommonParameters>]
7070
```
7171

7272
### QueryComputerSet
@@ -144,7 +144,16 @@ the key property `@{ "Handle"=0 }` and stores it in a variable named `$x`. The v
144144
a CIM instance to the `Get-CimInstance` cmdlet to get a particular instance.
145145

146146
```powershell
147-
$x = New-CimInstance -ClassName Win32_Process -Namespace root\cimv2 -Property @{"Handle"=0} -Key Handle -ClientOnly
147+
$instance = @{
148+
ClassName = 'Win32_Process'
149+
Namespace = 'root\cimv2'
150+
Properties = @{
151+
Handle = 0
152+
}
153+
Key = 'Handle'
154+
ClientOnly = $true
155+
}
156+
$x = New-CimInstance @instance
148157
Get-CimInstance -CimInstance $x
149158
```
150159

@@ -155,7 +164,7 @@ the variables `$x` and `$y`. The variable `$x` is then formatted in a table cont
155164
**Name** and **KernelModeTime** properties, the table set to **AutoSize**.
156165

157166
```powershell
158-
$x,$y = Get-CimInstance -ClassName Win32_Process
167+
$x, $y = Get-CimInstance -ClassName Win32_Process
159168
$x | Format-Table -Property Name, KernelModeTime -AutoSize
160169
```
161170

reference/7.4/CimCmdlets/Get-CimSession.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Protocol : WSMAN
136136
This example gets the CIM session that has an **Id** of 2.
137137

138138
```powershell
139-
Get-CimSession -ID 2
139+
Get-CimSession -Id 2
140140
```
141141

142142
```Output

0 commit comments

Comments
 (0)