Skip to content

Commit 248c9ab

Browse files
Fix incorrect case/capitalization in ref docs (#11943)
This ensures the following components have the correct/consistent case throughout the reference documentation: Preference variable, PS environment variable, PS drive, PS provider, PS command name, PS command argument, PS module, PS file extension, PS host name/application, #Requires statement, parameter name, about_* topic, member name, scope modifier, keyword, operator, calculated property key/value, attribute, type accelerator, type literal/name, WMI namespace/class, variable name, special character, comment-based help keyword, product/company name, Windows drive letter/directory, Windows/Unix environment variable In addition, changes include fixes to incorrect terminology (e.g., referring to a keyword as a command) and formatting of PS syntax elements (non-exhaustive).
1 parent 84c9e05 commit 248c9ab

File tree

40 files changed

+541
-541
lines changed

40 files changed

+541
-541
lines changed

reference/docs-conceptual/developer/hosting/runspace-samples.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,36 @@ This section includes sample code that shows how to use different types of runsp
1414
> For samples of host applications that create custom host interfaces, see [Custom Host Samples](./custom-host-samples.md).
1515
1616
[Runspace01 Sample](./runspace01-sample.md)
17-
This sample shows how to use the [System.Management.Automation.Powershell](/dotnet/api/system.management.automation.powershell) class to run the [Get-Process](/powershell/module/Microsoft.PowerShell.Management/Get-Process) cmdlet synchronously and display its output in a console window.
17+
This sample shows how to use the [System.Management.Automation.PowerShell](/dotnet/api/system.management.automation.powershell) class to run the [Get-Process](/powershell/module/Microsoft.PowerShell.Management/Get-Process) cmdlet synchronously and display its output in a console window.
1818

1919
[Runspace02 Sample](./runspace02-sample.md)
20-
This sample shows how to use the [System.Management.Automation.Powershell](/dotnet/api/system.management.automation.powershell) class to run the [Get-Process](/powershell/module/Microsoft.PowerShell.Management/Get-Process) and [Sort-Object](/powershell/module/Microsoft.PowerShell.Utility/Sort-Object) cmdlets synchronously. The results of these commands is displayed by using a [System.Windows.Forms.Datagridview](/dotnet/api/System.Windows.Forms.DataGridView) control.
20+
This sample shows how to use the [System.Management.Automation.PowerShell](/dotnet/api/system.management.automation.powershell) class to run the [Get-Process](/powershell/module/Microsoft.PowerShell.Management/Get-Process) and [Sort-Object](/powershell/module/Microsoft.PowerShell.Utility/Sort-Object) cmdlets synchronously. The results of these commands is displayed by using a [System.Windows.Forms.DataGridView](/dotnet/api/System.Windows.Forms.DataGridView) control.
2121

2222
[Runspace03 Sample](./runspace03-sample.md)
23-
This sample shows how to use the [System.Management.Automation.Powershell](/dotnet/api/system.management.automation.powershell) class to run a script synchronously, and how to handle non-terminating errors. The script receives a list of process names and then retrieves those processes. The results of the script, including any non-terminating errors that were generated when running the script, are displayed in a console window.
23+
This sample shows how to use the [System.Management.Automation.PowerShell](/dotnet/api/system.management.automation.powershell) class to run a script synchronously, and how to handle non-terminating errors. The script receives a list of process names and then retrieves those processes. The results of the script, including any non-terminating errors that were generated when running the script, are displayed in a console window.
2424

2525
[Runspace04 Sample](./runspace04-sample.md)
26-
This sample shows how to use the [System.Management.Automation.Powershell](/dotnet/api/system.management.automation.powershell) class to run commands, and how to catch terminating errors that are thrown when running the commands. Two commands are run, and the last command is passed a parameter argument that is not valid. As a result no objects are returned and a terminating error is thrown.
26+
This sample shows how to use the [System.Management.Automation.PowerShell](/dotnet/api/system.management.automation.powershell) class to run commands, and how to catch terminating errors that are thrown when running the commands. Two commands are run, and the last command is passed a parameter argument that is not valid. As a result no objects are returned and a terminating error is thrown.
2727

2828
[Runspace05 Sample](./runspace05-sample.md)
29-
This sample shows how to add a snap-in to a [System.Management.Automation.Runspaces.Initialsessionstate](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object so that the cmdlet of the snap-in is available when the runspace is opened. The snap-in provides a Get-Proc cmdlet (defined by the [GetProcessSample01 Sample](../cmdlet/getprocesssample01-sample.md)) that is run synchronously using a [System.Management.Automation.Powershell](/dotnet/api/system.management.automation.powershell) object.
29+
This sample shows how to add a snap-in to a [System.Management.Automation.Runspaces.InitialSessionState](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object so that the cmdlet of the snap-in is available when the runspace is opened. The snap-in provides a Get-Proc cmdlet (defined by the [GetProcessSample01 Sample](../cmdlet/getprocesssample01-sample.md)) that is run synchronously using a [System.Management.Automation.PowerShell](/dotnet/api/system.management.automation.powershell) object.
3030

3131
[Runspace06 Sample](./runspace06-sample.md)
32-
This sample shows how to add a module to a [System.Management.Automation.Runspaces.Initialsessionstate](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object so that the module is loaded when the runspace is opened. The module provides a Get-Proc cmdlet (defined by the [GetProcessSample02 Sample](../cmdlet/getprocesssample02-sample.md)) that is run synchronously using a [System.Management.Automation.Powershell](/dotnet/api/system.management.automation.powershell) object.
32+
This sample shows how to add a module to a [System.Management.Automation.Runspaces.InitialSessionState](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object so that the module is loaded when the runspace is opened. The module provides a Get-Proc cmdlet (defined by the [GetProcessSample02 Sample](../cmdlet/getprocesssample02-sample.md)) that is run synchronously using a [System.Management.Automation.PowerShell](/dotnet/api/system.management.automation.powershell) object.
3333

3434
[Runspace07 Sample](./runspace07-sample.md)
35-
This sample shows how to create a runspace, and then use that runspace to run two cmdlets synchronously by using a [System.Management.Automation.Powershell](/dotnet/api/system.management.automation.powershell) object.
35+
This sample shows how to create a runspace, and then use that runspace to run two cmdlets synchronously by using a [System.Management.Automation.PowerShell](/dotnet/api/system.management.automation.powershell) object.
3636

3737
[Runspace08 Sample](./runspace08-sample.md)
38-
This sample shows how to add commands and arguments to the pipeline of a [System.Management.Automation.Powershell](/dotnet/api/system.management.automation.powershell) object and how to run the commands synchronously.
38+
This sample shows how to add commands and arguments to the pipeline of a [System.Management.Automation.PowerShell](/dotnet/api/system.management.automation.powershell) object and how to run the commands synchronously.
3939

4040
[Runspace09 Sample](./runspace09-sample.md)
41-
This sample shows how to add a script to the pipeline of a [System.Management.Automation.Powershell](/dotnet/api/system.management.automation.powershell) object and how to run the script asynchronously. Events are used to handle the output of the script.
41+
This sample shows how to add a script to the pipeline of a [System.Management.Automation.PowerShell](/dotnet/api/system.management.automation.powershell) object and how to run the script asynchronously. Events are used to handle the output of the script.
4242

4343
[Runspace10 Sample](./runspace10-sample.md)
44-
This sample shows how to create a default initial session state, how to add a cmdlet to the [System.Management.Automation.Runspaces.Initialsessionstate](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState), how to create a runspace that uses the initial session state, and how to run the command by using a [System.Management.Automation.Powershell](/dotnet/api/system.management.automation.powershell) object.
44+
This sample shows how to create a default initial session state, how to add a cmdlet to the [System.Management.Automation.Runspaces.InitialSessionState](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState), how to create a runspace that uses the initial session state, and how to run the command by using a [System.Management.Automation.PowerShell](/dotnet/api/system.management.automation.powershell) object.
4545

4646
[Runspace11 Sample](./runspace11-sample.md)
47-
This shows how to use the [System.Management.Automation.Proxycommand](/dotnet/api/System.Management.Automation.ProxyCommand) class to create a proxy command that calls an existing cmdlet, but restricts the set of available parameters. The proxy command is then added to an initial session state that is used to create a constrained runspace. This means that the user can access the functionality of the cmdlet only through the proxy command.
47+
This shows how to use the [System.Management.Automation.ProxyCommand](/dotnet/api/System.Management.Automation.ProxyCommand) class to create a proxy command that calls an existing cmdlet, but restricts the set of available parameters. The proxy command is then added to an initial session state that is used to create a constrained runspace. This means that the user can access the functionality of the cmdlet only through the proxy command.
4848

4949
## See Also

reference/docs-conceptual/developer/hosting/runspace05-sample.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: Runspace05 Sample
66
---
77
# Runspace05 Sample
88

9-
This sample shows how to add a snap-in to a [System.Management.Automation.Runspaces.Initialsessionstate](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object so that the cmdlet of the snap-in is available when the runspace is opened. The snap-in provides a Get-Proc cmdlet (defined by the [GetProcessSample01 Sample](../cmdlet/getprocesssample01-sample.md)) that is run synchronously by using a [System.Management.Automation.Powershell](/dotnet/api/system.management.automation.powershell) object.
9+
This sample shows how to add a snap-in to a [System.Management.Automation.Runspaces.InitialSessionState](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object so that the cmdlet of the snap-in is available when the runspace is opened. The snap-in provides a Get-Proc cmdlet (defined by the [GetProcessSample01 Sample](../cmdlet/getprocesssample01-sample.md)) that is run synchronously by using a [System.Management.Automation.PowerShell](/dotnet/api/system.management.automation.powershell) object.
1010

1111
## Requirements
1212

@@ -16,23 +16,23 @@ This sample requires Windows PowerShell 2.0.
1616

1717
This sample demonstrates the following.
1818

19-
- Creating a [System.Management.Automation.Runspaces.Initialsessionstate](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object.
19+
- Creating a [System.Management.Automation.Runspaces.InitialSessionState](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object.
2020

21-
- Adding the snap-in to the [System.Management.Automation.Runspaces.Initialsessionstate](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object.
21+
- Adding the snap-in to the [System.Management.Automation.Runspaces.InitialSessionState](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object.
2222

23-
- Creating a [System.Management.Automation.Runspaces.Runspace](/dotnet/api/System.Management.Automation.Runspaces.Runspace) object that uses the [System.Management.Automation.Runspaces.Initialsessionstate](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object.
23+
- Creating a [System.Management.Automation.Runspaces.Runspace](/dotnet/api/System.Management.Automation.Runspaces.Runspace) object that uses the [System.Management.Automation.Runspaces.InitialSessionState](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object.
2424

25-
- Creating a [System.Management.Automation.Powershell](/dotnet/api/system.management.automation.powershell) object that uses the runspace.
25+
- Creating a [System.Management.Automation.PowerShell](/dotnet/api/system.management.automation.powershell) object that uses the runspace.
2626

27-
- Adding the snap-in's get-proc cmdlet to the pipeline of the [System.Management.Automation.Powershell](/dotnet/api/system.management.automation.powershell) object.
27+
- Adding the snap-in's Get-Proc cmdlet to the pipeline of the [System.Management.Automation.PowerShell](/dotnet/api/system.management.automation.powershell) object.
2828

2929
- Running the command synchronously.
3030

3131
- Extracting properties from the [System.Management.Automation.PSObject](/dotnet/api/System.Management.Automation.PSObject) objects returned by the command.
3232

3333
## Example
3434

35-
This sample creates a runspace that uses a [System.Management.Automation.Runspaces.Initialsessionstate](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object to define the elements that are available when the runspace is opened. In this sample, a snap-in that defines a Get-Proc cmdlet is added to the initial session state.
35+
This sample creates a runspace that uses a [System.Management.Automation.Runspaces.InitialSessionState](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object to define the elements that are available when the runspace is opened. In this sample, a snap-in that defines a Get-Proc cmdlet is added to the initial session state.
3636

3737
```csharp
3838
namespace Microsoft.Samples.PowerShell.Runspaces
@@ -63,7 +63,7 @@ namespace Microsoft.Samples.PowerShell.Runspaces
6363
/// 2. Adding a snap-in to the initial session state.
6464
/// 3. Creating a runspace that uses the initial session state.
6565
/// 4. Creating a PowerShell object that uses the runspace.
66-
/// 5. Adding the snap-in's get-proc cmdlet to the PowerShell object.
66+
/// 5. Adding the snap-in's Get-Proc cmdlet to the PowerShell object.
6767
/// 6. Using PSObject objects to extract and display properties from
6868
/// the objects returned by the cmdlet.
6969
/// </remarks>
@@ -87,7 +87,7 @@ namespace Microsoft.Samples.PowerShell.Runspaces
8787
using (PowerShell powershell = PowerShell.Create())
8888
{
8989
// Add the snap-in cmdlet and specify the runspace.
90-
powershell.AddCommand("GetProcPSSnapIn01\\get-proc");
90+
powershell.AddCommand("GetProcPSSnapIn01\\Get-Proc");
9191
powershell.Runspace = myRunSpace;
9292

9393
// Run the cmdlet synchronously.

reference/docs-conceptual/developer/hosting/runspace06-sample.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: Runspace06 Sample
66
---
77
# Runspace06 Sample
88

9-
This sample shows how to add a module to a [System.Management.Automation.Runspaces.Initialsessionstate](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object so that the module is loaded when the runspace is opened. The module provides a Get-Proc cmdlet (defined by the [GetProcessSample02 Sample](../cmdlet/getprocesssample02-sample.md)) that is run synchronously by using a [System.Management.Automation.Powershell](/dotnet/api/system.management.automation.powershell) object.
9+
This sample shows how to add a module to a [System.Management.Automation.Runspaces.InitialSessionState](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object so that the module is loaded when the runspace is opened. The module provides a Get-Proc cmdlet (defined by the [GetProcessSample02 Sample](../cmdlet/getprocesssample02-sample.md)) that is run synchronously by using a [System.Management.Automation.PowerShell](/dotnet/api/system.management.automation.powershell) object.
1010

1111
## Requirements
1212

@@ -16,23 +16,23 @@ This sample requires Windows PowerShell 2.0.
1616

1717
This sample demonstrates the following.
1818

19-
- Creating a [System.Management.Automation.Runspaces.Initialsessionstate](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object.
19+
- Creating a [System.Management.Automation.Runspaces.InitialSessionState](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object.
2020

21-
- Adding the module to the [System.Management.Automation.Runspaces.Initialsessionstate](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object.
21+
- Adding the module to the [System.Management.Automation.Runspaces.InitialSessionState](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object.
2222

23-
- Creating a [System.Management.Automation.Runspaces.Runspace](/dotnet/api/System.Management.Automation.Runspaces.Runspace) object that uses the [System.Management.Automation.Runspaces.Initialsessionstate](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object.
23+
- Creating a [System.Management.Automation.Runspaces.Runspace](/dotnet/api/System.Management.Automation.Runspaces.Runspace) object that uses the [System.Management.Automation.Runspaces.InitialSessionState](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object.
2424

25-
- Creating a [System.Management.Automation.Powershell](/dotnet/api/system.management.automation.powershell) object that uses the runspace.
25+
- Creating a [System.Management.Automation.PowerShell](/dotnet/api/system.management.automation.powershell) object that uses the runspace.
2626

27-
- Adding the module's get-proc cmdlet to the pipeline of the [System.Management.Automation.Powershell](/dotnet/api/system.management.automation.powershell) object.
27+
- Adding the module's Get-Proc cmdlet to the pipeline of the [System.Management.Automation.PowerShell](/dotnet/api/system.management.automation.powershell) object.
2828

2929
- Running the command synchronously.
3030

3131
- Extracting properties from the [System.Management.Automation.PSObject](/dotnet/api/System.Management.Automation.PSObject) objects returned by the command.
3232

3333
## Example
3434

35-
This sample creates a runspace that uses a [System.Management.Automation.Runspaces.Initialsessionstate](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object to define the elements that are available when the runspace is opened. In this sample, a module that defines a Get-Proc cmdlet is added to the initial session state.
35+
This sample creates a runspace that uses a [System.Management.Automation.Runspaces.InitialSessionState](/dotnet/api/System.Management.Automation.Runspaces.InitialSessionState) object to define the elements that are available when the runspace is opened. In this sample, a module that defines a Get-Proc cmdlet is added to the initial session state.
3636

3737
```csharp
3838
namespace Microsoft.Samples.PowerShell.Runspaces
@@ -63,7 +63,7 @@ namespace Microsoft.Samples.PowerShell.Runspaces
6363
/// 2. Adding a module to the initial session state.
6464
/// 3. Creating a runspace that uses the initial session state.
6565
/// 4. Creating a PowerShell object that uses the runspace.
66-
/// 5. Adding the module's get-proc cmdlet to the PowerShell object.
66+
/// 5. Adding the module's Get-Proc cmdlet to the PowerShell object.
6767
/// 6. Running the command synchronously.
6868
/// 7. Using PSObject objects to extract and display properties from
6969
/// the objects returned by the cmdlet.
@@ -85,7 +85,7 @@ namespace Microsoft.Samples.PowerShell.Runspaces
8585
using (PowerShell powershell = PowerShell.Create())
8686
{
8787
// Add the cmdlet and specify the runspace.
88-
powershell.AddCommand(@"GetProcessSample02\get-proc");
88+
powershell.AddCommand(@"GetProcessSample02\Get-Proc");
8989
powershell.Runspace = myRunSpace;
9090

9191
Collection<PSObject> results = powershell.Invoke();

0 commit comments

Comments
 (0)