Skip to content

Commit 99f6e3c

Browse files
sdwheelerDCtheGeek
authored andcommitted
Fix issues flagged in CATS report (#4381)
1 parent 220aed9 commit 99f6e3c

File tree

5 files changed

+21
-33
lines changed

5 files changed

+21
-33
lines changed

dsc/configurations/reboot-a-node.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
ms.date: 1/17/2019
2+
ms.date: 01/17/2019
33
keywords: dsc,powershell,configuration,setup
44
title: Reboot a Node
55
---

reference/docs-conceptual/samples/Creating-Get-WinEvent-queries-with-FilterHashtable.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
ms.date: 3/18/2019
2+
ms.date: 03/18/2019
33
title: Creating Get-WinEvent queries with FilterHashtable
44
---
55

reference/docs-conceptual/samples/Decode-PowerShell-Command-from-a-Running-Process.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ powershell.exe -Command {
3333
## View the process
3434

3535
The body of the command which PowerShell is executing is stored in the **CommandLine** property
36-
of the [Win32_Process][] class. If the command is an [encoded command][], the **CommandLine**
36+
of the [Win32_Process][] class. If the command is an encoded command, the **CommandLine**
3737
property contains the string "EncodedCommand". Using this information, the encoded command can
3838
be de-obfuscated via the following process.
3939

@@ -114,4 +114,3 @@ DecodedCommand :
114114
[Task Scheduler]: /windows/desktop/TaskSchd/task-scheduler-start-page
115115
[SQL Server Agent]: /sql/ssms/agent/sql-server-agent
116116
[Win32_Process]: /windows/desktop/CIMWin32Prov/win32-process
117-
[encoded command]: /powershell/scripting/core-powershell/console/powershell.exe-command-line-help#-encodedcommand-

reference/docs-conceptual/samples/Working-with-Objects.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

wmf/whats-new/class-overview.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ PowerShell artifacts (such as DSC resources), and accelerate coverage of managem
2020
- Debug types by using the PowerShell language
2121
- Generate and handle exceptions by using formal mechanisms, and at the right level
2222

23-
# Declare Base Class
23+
## Declare Base Class
2424

2525
You can declare a PowerShell class as a base type for another PowerShell class.
2626

@@ -53,7 +53,7 @@ $list.Add(100)
5353
$list[0] # return 100
5454
```
5555

56-
# Call Base Class Constructor
56+
### Call Base Class Constructor
5757

5858
To call a base class constructor from a subclass, use the keyword **base**:
5959

@@ -85,7 +85,7 @@ class C : B
8585
}
8686
```
8787

88-
# Call Base Class Method
88+
### Call Base Class Method
8989

9090
You can override existing methods in subclasses. To do this, declare methods by using the same name
9191
and signature:
@@ -137,7 +137,7 @@ $list.Add(100)
137137
$list[0] # return 200
138138
```
139139

140-
# Declare Implemented Interface
140+
### Declare Implemented Interface
141141

142142
You can declare implemented interfaces after base types, or immediately after a colon (:), if there
143143
is no base type specified. Separate all type names by using commas. It's similar to C# syntax.
@@ -160,11 +160,11 @@ class MyComparableBar : bar, system.IComparable
160160
}
161161
```
162162

163-
# New language features in PowerShell 5.0
163+
## New language features in PowerShell 5.0
164164

165165
PowerShell 5.0 introduces the following new language elements in PowerShell:
166166

167-
## Class keyword
167+
### Class keyword
168168

169169
The `class` keyword defines a new class. This is a true .NET Framework type. Class members are
170170
public, but only public within the module scope. You can't refer to the type name as a string (for
@@ -178,7 +178,7 @@ class MyClass
178178
}
179179
```
180180

181-
## Enum keyword and enumerations
181+
### Enum keyword and enumerations
182182

183183
Support for the `enum` keyword has been added, which uses newline as the delimiter. Currently, you
184184
cannot define an enumerator in terms of itself. However, you can initialize an enum in terms of
@@ -212,12 +212,12 @@ enum SomeEnum { Max = 42 }
212212
enum OtherEnum { Max = [SomeEnum]::Max + 1 }
213213
```
214214

215-
## Import-DscResource
215+
### Import-DscResource
216216

217217
`Import-DscResource` is now a true dynamic keyword. PowerShell parses the specified module's root
218218
module, searching for classes that contain the **DscResource** attribute.
219219

220-
## ImplementingAssembly
220+
### ImplementingAssembly
221221

222222
A new field, **ImplementingAssembly**, has been added to **ModuleInfo**. It is set to the dynamic
223223
assembly created for a script module if the script defines classes, or the loaded assembly for
@@ -247,7 +247,7 @@ $s = "hello"
247247

248248
All members are public.
249249

250-
## Constructors and instantiation
250+
### Constructors and instantiation
251251

252252
PowerShell classes can have constructors. They have the same name as their class. Constructors can
253253
be overloaded. Static constructors are supported. Properties with initialization expressions are
@@ -256,7 +256,7 @@ body of a static constructor, and instance properties are initialized before the
256256
non-static constructor. Currently, there is no syntax for calling a constructor from another
257257
constructor (like the C\# syntax ": this()"). The workaround is to define a common `Init()` method.
258258

259-
### Creating instances
259+
#### Creating instances
260260

261261
> [!NOTE]
262262
> In PowerShell 5.0, `New-Object` does not work with classes defined in PowerShell. Also, the type
@@ -288,7 +288,7 @@ The pseudo-static method `new()` works with .NET types, as shown in the followin
288288
[hashtable]::new()
289289
```
290290

291-
### Discovering constructors
291+
#### Discovering constructors
292292

293293
You can now see constructor overloads with `Get-Member`, or as shown in this example:
294294

@@ -304,7 +304,7 @@ hashtable new(int capacity, float loadFactor)
304304
`Get-Member -Static` lists constructors, so you can view overloads like any other method. The
305305
performance of this syntax is also considerably faster than `New-Object`.
306306

307-
## Methods
307+
### Methods
308308

309309
A PowerShell class method is implemented as a **ScriptBlock** that has only an end block. All
310310
methods are public. The following shows an example of defining a method named **DoSomething**.
@@ -329,15 +329,15 @@ $b.DoSomething(42)
329329

330330
Overloaded methods are also supported.
331331

332-
## Properties
332+
### Properties
333333

334334
All properties are public. Properties require either a newline or semicolon. If no object type is
335335
specified, the property type is object.
336336

337337
Properties that use validation or argument transformation attributes (like `[ValidateSet("aaa")]`)
338338
work as expected.
339339

340-
## Hidden
340+
### Hidden
341341

342342
A new keyword, `Hidden`, has been added. `Hidden` can be applied to properties and methods
343343
(including constructors).
@@ -349,17 +349,17 @@ the completion occurs in the class defining the hidden member.
349349
A new attribute, **System.Management.Automation.HiddenAttribute** has been added so that C\# code
350350
can have the same semantics within PowerShell.
351351

352-
## Return types
352+
### Return types
353353

354354
Return type is a contract. The return value is converted to the expected type. If no return type is
355355
specified, the return type is **void**. There is no streaming of objects. Objects cannot be written
356356
to the pipeline either intentionally or by accident.
357357

358-
## Attributes
358+
### Attributes
359359

360360
Two new attributes, **DscResource** and **DscProperty** have been added.
361361

362-
## Lexical scoping of variables
362+
### Lexical scoping of variables
363363

364364
The following shows an example of how lexical scoping works in this release.
365365

0 commit comments

Comments
 (0)