Skip to content

Commit

Permalink
MIsc MD rules
Browse files Browse the repository at this point in the history
  • Loading branch information
ArieHein committed Nov 6, 2024
1 parent 2472d5d commit 95bf932
Show file tree
Hide file tree
Showing 18 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions reference/7.5/Microsoft.PowerShell.Core/About/About.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ PowerShell provides the ability to dynamically add new properties and alter the

### [about_Calling_Generic_Methods](about_Calling_Generic_Methods.md)

A generic method is a method with two parameter lists: a list of generic types and a list of method arguments. The following examples show the new PowerShell syntax for accessing a generic method: ```Syntax # static generic methods [type_name]::MethodName[generic_type_arguments](method_arguments) # instance generic methods $object.MethodName[generic_type_arguments](method_arguments) ``` The `generic_type_arguments` can be a single type or comma-separated list of types, like `[string, int]`, including other generic types like `$obj.MethodName[string, System.Collections.Generic.Dictionary[string, int]]()` The `method_arguments` can be zero or more items. For more information, see [Generics in .NET](/dotnet/standard/generics/).
A generic method is a method with two parameter lists: a list of generic types and a list of method arguments. The following examples show the new PowerShell syntax for accessing a generic method: ```Syntax # static generic methods [type_name]::MethodName[generic_type_arguments](method_arguments) # instance generic methods $object.MethodName[generic_type_arguments](method_arguments)``` The `generic_type_arguments` can be a single type or comma-separated list of types, like `[string, int]`, including other generic types like `$obj.MethodName[string, System.Collections.Generic.Dictionary[string, int]]()` The `method_arguments` can be zero or more items. For more information, see [Generics in .NET](/dotnet/standard/generics/).

### [about_Case-Sensitivity](about_Case-Sensitivity.md)

Expand Down Expand Up @@ -155,7 +155,7 @@ Describes the PowerShell execution policies and explains how to manage them.

### [about_Experimental_Features](about_Experimental_Features.md)

Use the `Experimental` attribute to declare some code as experimental. Use the following syntax to declare the `Experimental` attribute providing the name of the experimental feature and the action to take if the experimental feature is enabled: ```csharp [Experimental(NameOfExperimentalFeature, ExperimentAction)] ``` For modules, the `NameOfExperimentalFeature` must follow the form of `<modulename>.<experimentname>`. The `ExperimentAction` parameter must be specified and the only valid values are: - `Show` means to show this experimental feature if the feature is enabled - `Hide` means to hide this experimental feature if the feature is enabled
Use the `Experimental` attribute to declare some code as experimental. Use the following syntax to declare the `Experimental` attribute providing the name of the experimental feature and the action to take if the experimental feature is enabled: ```csharp [Experimental(NameOfExperimentalFeature, ExperimentAction)]``` For modules, the `NameOfExperimentalFeature` must follow the form of `<modulename>.<experimentname>`. The `ExperimentAction` parameter must be specified and the only valid values are: - `Show` means to show this experimental feature if the feature is enabled - `Hide` means to hide this experimental feature if the feature is enabled

### [about_FileSystem_Provider](about_FileSystem_Provider.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ The syntax diagrams use the following symbols:

The placeholder inside the angle brackets identifies the .NET type of the
value that a parameter takes. For example, to use the **Name** parameter of
the `Get-Command ` cmdlet, you replace the `<string[]>` with one or more
the `Get-Command` cmdlet, you replace the `<string[]>` with one or more
strings separated by commas (`,`).

<!-- `[]` - also known as binkies -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ Both arguments are optional. If you don't specify any arguments, then

### PSTypeName attribute

You can't use extended type names in a type declaration. The *PSTypeName**
You can't use extended type names in a type declaration. The **PSTypeName**
attribute allows you to restrict the type of the parameter to the extended
type.

Expand Down
1 change: 0 additions & 1 deletion reference/7.5/Microsoft.PowerShell.Core/About/about_If.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ $service.Status -eq 'Running' ? (Stop-Service $service) : (Start-Service $servic
In this example, if the service is running, it's stopped, and if its status is
not **Running**, it's started.


If a `<condition>`, `<if-true>`, or `<if-false>` expression calls a command,
you must wrap it in parentheses. If you don't, PowerShell raises an argument
exception for the command in the `<condition>` expression and parsing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ The following examples are based on the current working directory being set to
When using a path in a command, you can use a fully qualified path or a
relative one. For example, suppose that your current working directory is
`C:\Windows`. The following `Get-ChildItem` command retrieves all items in the
`C:\TechDocs `directory:
`C:\TechDocs` directory:

```powershell
Get-ChildItem \TechDocs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ drive:\location\child-location\...
```

For example, to change your location to the `HKLM\Software` registry key, type
a `Set-Location `command, such as:
a `Set-Location` command, such as:

```powershell
Set-Location HKLM:\SOFTWARE\
Expand Down
8 changes: 4 additions & 4 deletions reference/7.5/Microsoft.PowerShell.Core/About/about_Ref.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ of a variable that is passed to it.

## Long description

You can pass variables to functions *by reference* or *by value*.
You can pass variables to functions _by reference_ or _by value_.

When you pass a variable *by value*, you are passing a copy of the data.
When you pass a variable _by value_, you are passing a copy of the data.

In the following example, the function changes the value of the variable passed
to it. In PowerShell, integers are value types so they are passed by value.
Expand All @@ -41,9 +41,9 @@ $var

In the following example, a variable containing a `Hashtable` is passed to a
function. `Hashtable` is an object type so by default it is passed to the
function *by reference*.
function _by reference_.

When passing a variable *by reference*, the function can change the data and
When passing a variable _by reference_, the function can change the data and
that change persists after the function executes.

```powershell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ The RegexMatch options are:
RegexMatch.
- **Multiline**: Multiline mode forces `^` and `$` to match the beginning
end of every line instead of the beginning and end of the input string.
- **Singleline**: Singleline mode treats the input string as a *SingleLine*.
- **Singleline**: Singleline mode treats the input string as a _SingleLine_.
It forces the `.` character to match every character (including newlines),
instead of matching every character EXCEPT the newline `\n`.
- **ExplicitCapture**: Ignores non-named match groups so that only
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ from newest to oldest.

Event Tracing for Windows (ETW) writes events to the log as events occur. The events are stored in
the order of oldest to newest. An archived ETW file is saved as an `.etl` such as **TraceLog.etl**.
The events are listed in the order in which they are written to the log, so the *Oldest* parameter
The events are listed in the order in which they are written to the log, so the _Oldest_ parameter
is required.

```powershell
Expand Down
2 changes: 1 addition & 1 deletion reference/7.5/Microsoft.PowerShell.Management/Join-Path.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ In this example, no parameter names are used, thus "a" binds to `Path`, "b" to `

### -AdditionalChildPath

Specifies additional elements to append to the value of the *Path* parameter. The `ChildPath`
Specifies additional elements to append to the value of the _Path_ parameter. The `ChildPath`
parameter is still mandatory and must be specified as well.

This parameter is specified with the `ValueFromRemainingArguments` property which enables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Status : OK
This command uses `Get-CimInstance` to get the **Win32_Service** object for the new service. This
object includes the start mode and the service description.

### Example 4: Set the SecurityDescriptor of a service when creating.
### Example 4: Set the SecurityDescriptor of a service when creating

This example adds the **SecurityDescriptor** of the service being created.

Expand Down
2 changes: 1 addition & 1 deletion reference/7.5/Microsoft.PowerShell.Management/Set-Item.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ Forces the cmdlet to set items that cannot otherwise be changed, such as read-on
variables. The cmdlet cannot change constant aliases or variables.
Implementation varies from provider to provider.
For more information, see [about_Providers](../Microsoft.PowerShell.Core/About/about_Providers.md).
Even using the *Force* parameter, the cmdlet cannot override security restrictions.
Even using the _Force_ parameter, the cmdlet cannot override security restrictions.

```yaml
Type: System.Management.Automation.SwitchParameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ policy. The policy is set for the default scope, `LocalMachine`.
The `Get-ExecutionPolicy` cmdlet shows that `RemoteSigned` is the effective execution policy for
the current PowerShell session.

The `Start-ActivityTracker.ps1 script is executed from the current directory. The script is blocked
The `Start-ActivityTracker.ps1` script is executed from the current directory. The script is blocked
by `RemoteSigned` because the script isn't digitally signed.

For this example, the script's code was reviewed and verified as safe to run. The `Unblock-File`
Expand Down
8 changes: 4 additions & 4 deletions reference/7.5/Microsoft.PowerShell.Utility/Measure-Object.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ Property : num
### Example 11: Measure the Standard Deviation

Beginning in PowerShell 6, `Measure-Object` supports the `-StandardDeviation` parameter. The
following example determines the *standard deviation* for the CPU used by all processes. A large
following example determines the _standard deviation_ for the CPU used by all processes. A large
deviation would indicate a small number of processes consuming the most CPU.

```powershell
Expand Down Expand Up @@ -344,7 +344,7 @@ Accept wildcard characters: False
Indicates that the cmdlet counts the number of characters in the input objects.
> [!NOTE]
> The **Word**, **Char** and **Line** switches count *inside* each input object, as well as *across*
> The **Word**, **Char** and **Line** switches count _inside_ each input object, as well as _across_
> input objects. See Example 7.
```yaml
Expand Down Expand Up @@ -404,7 +404,7 @@ Accept wildcard characters: False
Indicates that the cmdlet counts the number of lines in the input objects.

> [!NOTE]
> The **Word**, **Char** and **Line** switches count *inside* each input object, as well as *across*
> The **Word**, **Char** and **Line** switches count _inside_ each input object, as well as _across_
> input objects. See Example 7.

```yaml
Expand Down Expand Up @@ -509,7 +509,7 @@ Accept wildcard characters: False
Indicates that the cmdlet counts the number of words in the input objects.

> [!NOTE]
> The **Word**, **Char** and **Line** switches count *inside* each input object, as well as *across*
> The **Word**, **Char** and **Line** switches count _inside_ each input object, as well as _across_
> input objects. See Example 7.

```yaml
Expand Down
2 changes: 1 addition & 1 deletion reference/7.5/Microsoft.PowerShell.Utility/Out-String.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ parameter to find matches for the text **gcm**.
> If you omit the **Stream** parameter, the command displays all the aliases because `Select-String`
> finds the text **gcm** in the single string that `Out-String` returns.
### Example 3: Use the Width parameter to prevent truncation.
### Example 3: Use the Width parameter to prevent truncation

While most output from `Out-String` is wrapped to the next line, there are scenarios where the
output is truncated by the formatting system before being passed to `Out-String`. You can avoid
Expand Down
2 changes: 1 addition & 1 deletion reference/7.5/Microsoft.PowerShell.Utility/Unblock-File.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ PS C:\> dir C:\Downloads\*PowerShell* | Unblock-File

This command shows how to find and unblock PowerShell scripts.

The first command uses the **Stream** parameter of the *Get-Item* cmdlet get files with the
The first command uses the **Stream** parameter of the _Get-Item_ cmdlet get files with the
**Zone.Identifier** stream.

The second command shows what happens when you run a blocked script in a PowerShell session in which
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ line 13.
In this example, the `Wait-Debugger` command was inserted in the `CopyFile` method of a DSC
resource. This is similar to using `Enable-RunspaceDebug -BreakAll` in a DSC resource but breaks at
a specific point in the script.

```
[DscResource()]
class FileResource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ Set-Item WSMAN:\localhost\Client\TrustedHosts *.domain2.com -Concatenate

The `New-Item` cmdlet creates items within a provider drive. Each provider
has different item types that you can create. In the `WSMAN:` drive, you can
create *Listeners* which you configure to receive and respond to remote
create _Listeners_ which you configure to receive and respond to remote
requests. The following command creates a new HTTP listener using the `New-Item`
cmdlet.

Expand Down Expand Up @@ -300,7 +300,7 @@ of the following:

### Capability \<Enumeration\>

When working with *Plug-ins* this parameter specifies an operation that is
When working with _Plug-ins_ this parameter specifies an operation that is
supported on this Uniform Resource Identifier (URI). You have to create one
entry for each type of operation that the URI supports. You can specify
any valid attributes for a given operation, if the operation supports it.
Expand Down

0 comments on commit 95bf932

Please sign in to comment.