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

typo: Psobject -> PSObject #3958

Merged
merged 2 commits into from
Mar 14, 2019
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
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ When this parameter is specified, the cmdlet uses the default parameter set `Pat

This cmdlet defines the following support parameters that can be used to modify the search capabilities of the cmdlet.

The `Script` parameter specifies a script block that can be used to provide an alternate search mechanism for the cmdlet. The script must contain the patterns used for matching and return a [System.Management.Automation.Psobject](/dotnet/api/System.Management.Automation.PSObject) object. Note that this parameter is also the unique parameter that identifies the `ScriptParameterSet` parameter set. When the Windows PowerShell runtime sees this parameter, it uses only parameters that belong to the `ScriptParameterSet` parameter set.
The `Script` parameter specifies a script block that can be used to provide an alternate search mechanism for the cmdlet. The script must contain the patterns used for matching and return a [System.Management.Automation.PSObject](/dotnet/api/System.Management.Automation.PSObject) object. Note that this parameter is also the unique parameter that identifies the `ScriptParameterSet` parameter set. When the Windows PowerShell runtime sees this parameter, it uses only parameters that belong to the `ScriptParameterSet` parameter set.

```csharp
[Parameter(
Expand Down
4 changes: 2 additions & 2 deletions developer/cmdlet/how-to-invoke-scripts-within-a-cmdlet.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ caps.latest.revision: 9
---
# How to Invoke Scripts Within a Cmdlet

This example shows how to invoke a script that is supplied to a cmdlet. The script is executed by the cmdlet, and its results are returned to the cmdlet as a collection of [System.Management.Automation.Psobject](/dotnet/api/System.Management.Automation.PSObject) objects.
This example shows how to invoke a script that is supplied to a cmdlet. The script is executed by the cmdlet, and its results are returned to the cmdlet as a collection of [System.Management.Automation.PSObject](/dotnet/api/System.Management.Automation.PSObject) objects.

## To invoke a script block

Expand All @@ -31,7 +31,7 @@ This example shows how to invoke a script that is supplied to a cmdlet. The scri
);
```

2. Then, the script iterates through the returned collection of [System.Management.Automation.Psobject](/dotnet/api/System.Management.Automation.PSObject) objects and perform the necessary operations.
2. Then, the script iterates through the returned collection of [System.Management.Automation.PSObject](/dotnet/api/System.Management.Automation.PSObject) objects and perform the necessary operations.

```c
foreach (PSObject psObject in psObjects)
Expand Down
2 changes: 1 addition & 1 deletion developer/hosting/runspace01-sample.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This sample shows how to use the [System.Management.Automation.Powershell](/dotn

- Running the command synchronously.

- Using [System.Management.Automation.Psobject](/dotnet/api/System.Management.Automation.PSObject) objects to extract properties from the objects returned by the command.
- Using [System.Management.Automation.PSObject](/dotnet/api/System.Management.Automation.PSObject) objects to extract properties from the objects returned by the command.

## Example

Expand Down
2 changes: 1 addition & 1 deletion developer/hosting/runspace03-sample.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This sample demonstrates the following.

- Running the script synchronously.

- Using [System.Management.Automation.Psobject](/dotnet/api/System.Management.Automation.PSObject) objects to extract and display properties from the objects returned by the script.
- Using [System.Management.Automation.PSObject](/dotnet/api/System.Management.Automation.PSObject) objects to extract and display properties from the objects returned by the script.

- Retrieving and displaying error records that were generated when the script was run.

Expand Down
2 changes: 1 addition & 1 deletion developer/hosting/runspace04-sample.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This sample demonstrates the following.

- Invoking the commands synchronously.

- Using [System.Management.Automation.Psobject](/dotnet/api/System.Management.Automation.PSObject) objects to extract and display properties from the objects returned by the commands.
- Using [System.Management.Automation.PSObject](/dotnet/api/System.Management.Automation.PSObject) objects to extract and display properties from the objects returned by the commands.

- Retrieving and displaying error records that were generated during the running of the commands.

Expand Down
2 changes: 1 addition & 1 deletion developer/hosting/runspace05-sample.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This sample demonstrates the following.

- Running the command synchronously.

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

## Example

Expand Down
2 changes: 1 addition & 1 deletion developer/hosting/runspace06-sample.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This sample demonstrates the following.

- Running the command synchronously.

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

## Example

Expand Down
4 changes: 2 additions & 2 deletions developer/hosting/runspace07-sample.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ This sample demonstrates the following.

- Running the cmdlets synchronously.

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

## Example

This sample creates a runspace that used by a [System.Management.Automation.Psobject](/dotnet/api/System.Management.Automation.PSObject) object to run the [Get-Process](/powershell/module/Microsoft.PowerShell.Management/Get-Process) and [Measure-Object](/powershell/module/microsoft.powershell.utility/measure-object) cmdlets.
This sample creates a runspace that used by a [System.Management.Automation.PSObject](/dotnet/api/System.Management.Automation.PSObject) object to run the [Get-Process](/powershell/module/Microsoft.PowerShell.Management/Get-Process) and [Measure-Object](/powershell/module/microsoft.powershell.utility/measure-object) cmdlets.

```csharp
namespace Microsoft.Samples.PowerShell.Runspaces
Expand Down
2 changes: 1 addition & 1 deletion developer/hosting/runspace08-sample.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This sample demonstrates the following.

- Running the cmdlets synchronously.

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

## Example

Expand Down
2 changes: 1 addition & 1 deletion developer/hosting/runspace10-sample.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This sample demonstrates the following.

- Adding the command to the pipeline of the [System.Management.Automation.Powershell](/dotnet/api/system.management.automation.powershell) object.

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

## Example

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The [System.Management.Automation.Provider.Ipropertycmdletprovider](/dotnet/api/

To retrieve properties, the provider must implement the [System.Management.Automation.Provider.Ipropertycmdletprovider.Getproperty*](/dotnet/api/System.Management.Automation.Provider.IPropertyCmdletProvider.GetProperty) method to support calls from the `Get-ItemProperty` cmdlet. This method retrieves the properties of the item located at the specified provider-internal path (fully-qualified).

The `providerSpecificPickList` parameter indicates which properties to retrieve. If this parameter is `null` or empty, the method should retrieve all properties. In addition, [System.Management.Automation.Provider.Ipropertycmdletprovider.Getproperty*](/dotnet/api/System.Management.Automation.Provider.IPropertyCmdletProvider.GetProperty) writes an instance of a [System.Management.Automation.Psobject](/dotnet/api/System.Management.Automation.PSObject) object that represents a property bag of the retrieved properties. The method should return nothing.
The `providerSpecificPickList` parameter indicates which properties to retrieve. If this parameter is `null` or empty, the method should retrieve all properties. In addition, [System.Management.Automation.Provider.Ipropertycmdletprovider.Getproperty*](/dotnet/api/System.Management.Automation.Provider.IPropertyCmdletProvider.GetProperty) writes an instance of a [System.Management.Automation.PSObject](/dotnet/api/System.Management.Automation.PSObject) object that represents a property bag of the retrieved properties. The method should return nothing.

It is recommended that the implementation of [System.Management.Automation.Provider.Ipropertycmdletprovider.Getproperty*](/dotnet/api/System.Management.Automation.Provider.IPropertyCmdletProvider.GetProperty) supports the wildcard expansion of property names for each element in the pick list. To do this, use the [System.Management.Automation.Wildcardpattern](/dotnet/api/System.Management.Automation.WildcardPattern) class to perform the wildcard pattern matching.

Expand All @@ -86,7 +86,7 @@ Here is the default implementation of [System.Management.Automation.Provider.Ipr

## Setting Properties

To set properties, the Windows PowerShell property provider must implement the [System.Management.Automation.Provider.Ipropertycmdletprovider.Setproperty*](/dotnet/api/System.Management.Automation.Provider.IPropertyCmdletProvider.SetProperty) method to support calls from the `Set-ItemProperty` cmdlet. This method sets one or more properties of the item at the specified path, and overwrites the supplied properties as required. [System.Management.Automation.Provider.Ipropertycmdletprovider.Setproperty*](/dotnet/api/System.Management.Automation.Provider.IPropertyCmdletProvider.SetProperty) also writes an instance of a [System.Management.Automation.Psobject](/dotnet/api/System.Management.Automation.PSObject) object that represents a property bag of the updated properties.
To set properties, the Windows PowerShell property provider must implement the [System.Management.Automation.Provider.Ipropertycmdletprovider.Setproperty*](/dotnet/api/System.Management.Automation.Provider.IPropertyCmdletProvider.SetProperty) method to support calls from the `Set-ItemProperty` cmdlet. This method sets one or more properties of the item at the specified path, and overwrites the supplied properties as required. [System.Management.Automation.Provider.Ipropertycmdletprovider.Setproperty*](/dotnet/api/System.Management.Automation.Provider.IPropertyCmdletProvider.SetProperty) also writes an instance of a [System.Management.Automation.PSObject](/dotnet/api/System.Management.Automation.PSObject) object that represents a property bag of the updated properties.

Here is the default implementation of [System.Management.Automation.Provider.Ipropertycmdletprovider.Setproperty*](/dotnet/api/System.Management.Automation.Provider.IPropertyCmdletProvider.SetProperty) from the TemplateProvider.cs file provided by Windows PowerShell.

Expand Down