From 4ca46e85efdb1d70452d25489e27c00895b6ed82 Mon Sep 17 00:00:00 2001 From: Matt Gucci Date: Sat, 14 Jul 2018 18:35:52 +0900 Subject: [PATCH] Remove duplicate sentences in developer\cmdlet\creating-a-cmdlet-*.md --- .../cmdlet/creating-a-cmdlet-that-modifies-the-system.md | 3 --- developer/cmdlet/creating-a-cmdlet-to-access-a-data-store.md | 1 - developer/cmdlet/creating-a-cmdlet-without-parameters.md | 4 ---- 3 files changed, 8 deletions(-) diff --git a/developer/cmdlet/creating-a-cmdlet-that-modifies-the-system.md b/developer/cmdlet/creating-a-cmdlet-that-modifies-the-system.md index 7ba2147b6a11..be96321b01cd 100644 --- a/developer/cmdlet/creating-a-cmdlet-that-modifies-the-system.md +++ b/developer/cmdlet/creating-a-cmdlet-that-modifies-the-system.md @@ -294,18 +294,15 @@ For the complete C# sample code, see [StopProcessSample01 Sample](./stopprocesss ## Defining Object Types and Formatting -Windows PowerShell passes information between cmdlets using .Net objects. Consequently, a cmdlet may need to define its own type, or the cmdlet may need to extend an existing type provided by another cmdlet. For more information about defining new types or extending existing types, see [Extending Object Types and Formatting](https://msdn.microsoft.com/en-us/da976d91-a3d6-44e8-affa-466b1e2bd351). Windows PowerShell passes information between cmdlets using .Net objects. Consequently, a cmdlet may need to define its own type, or the cmdlet may need to extend an existing type provided by another cmdlet. For more information about defining new types or extending existing types, see [Extending Object Types and Formatting](https://msdn.microsoft.com/en-us/da976d91-a3d6-44e8-affa-466b1e2bd351). ## Building the Cmdlet -After implementing a cmdlet, it must be registered with Windows PowerShell through a Windows PowerShell snap-in. For more information about registering cmdlets, see [How to Register Cmdlets, Providers, and Host Applications](https://msdn.microsoft.com/en-us/a41e9054-29c8-40ab-bf2b-8ce4e7ec1c8c). After implementing a cmdlet, it must be registered with Windows PowerShell through a Windows PowerShell snap-in. For more information about registering cmdlets, see [How to Register Cmdlets, Providers, and Host Applications](https://msdn.microsoft.com/en-us/a41e9054-29c8-40ab-bf2b-8ce4e7ec1c8c). ## Testing the Cmdlet When your cmdlet has been registered with Windows PowerShell, you can test it by running it on the command line. Here are several tests that test the Stop-Proc cmdlet. For more information about using cmdlets from the command line, see the [Getting Started with Windows PowerShell](/powershell/scripting/getting-started/getting-started-with-windows-powershell). -When your cmdlet has been registered with Windows PowerShell, you can test it by running it on the command line. Here are several tests that test the Stop-Proc cmdlet. For more information about using cmdlets from the command line, see the [Getting Started with Windows PowerShell](https://msdn.microsoft.com/en-us/69555d95-b481-43e1-86e7-b46d68b3e2dd). - Start Windows PowerShell and use the Stop-Proc cmdlet to stop processing as shown below. Because the cmdlet specifies the `Name` parameter as mandatory, the cmdlet queries for the parameter. diff --git a/developer/cmdlet/creating-a-cmdlet-to-access-a-data-store.md b/developer/cmdlet/creating-a-cmdlet-to-access-a-data-store.md index 120776d30825..3cba2af11ebd 100644 --- a/developer/cmdlet/creating-a-cmdlet-to-access-a-data-store.md +++ b/developer/cmdlet/creating-a-cmdlet-to-access-a-data-store.md @@ -1102,7 +1102,6 @@ namespace Microsoft.Samples.PowerShell.Commands ## Building the Cmdlet -After implementing a cmdlet, you must register it with Windows PowerShell through a Windows PowerShell snap-in. For more information about registering cmdlets, see [How to Register Cmdlets, Providers, and Host Applications](https://msdn.microsoft.com/en-us/a41e9054-29c8-40ab-bf2b-8ce4e7ec1c8c). After implementing a cmdlet, you must register it with Windows PowerShell through a Windows PowerShell snap-in. For more information about registering cmdlets, see [How to Register Cmdlets, Providers, and Host Applications](https://msdn.microsoft.com/en-us/a41e9054-29c8-40ab-bf2b-8ce4e7ec1c8c). ## Testing the Cmdlet diff --git a/developer/cmdlet/creating-a-cmdlet-without-parameters.md b/developer/cmdlet/creating-a-cmdlet-without-parameters.md index bc89e9ce13b2..db617a6755d5 100644 --- a/developer/cmdlet/creating-a-cmdlet-without-parameters.md +++ b/developer/cmdlet/creating-a-cmdlet-without-parameters.md @@ -83,7 +83,6 @@ Windows PowerShell uses the [Microsoft.Powershell.Commands](/dotnet/api/Microsof ## Overriding an Input Processing Method -The [System.Management.Automation.Cmdlet](/dotnet/api/System.Management.Automation.Cmdlet) class provides three main input processing methods, at least one of which your cmdlet must override. For more information about how Windows PowerShell processes records, see [How Windows PowerShell Works](https://msdn.microsoft.com/en-us/ced30e23-10af-4700-8933-49873bd84d58). The [System.Management.Automation.Cmdlet](/dotnet/api/System.Management.Automation.Cmdlet) class provides three main input processing methods, at least one of which your cmdlet must override. For more information about how Windows PowerShell processes records, see [How Windows PowerShell Works](https://msdn.microsoft.com/en-us/ced30e23-10af-4700-8933-49873bd84d58). For all types of input, the Windows PowerShell runtime calls [System.Management.Automation.Cmdlet.Beginprocessing*](/dotnet/api/System.Management.Automation.Cmdlet.BeginProcessing) to enable processing. If your cmdlet must perform some preprocessing or setup, it can do this by overriding this method. @@ -148,18 +147,15 @@ For the complete C# sample code, see [GetProcessSample01 Sample](./getprocesssam ## Defining Object Types and Formatting -Windows PowerShell passes information between cmdlets using .NET objects. Consequently, a cmdlet might need to define its own type, or the cmdlet might need to extend an existing type provided by another cmdlet. For more information about defining new types or extending existing types, see [Extending Object Types and Formatting](https://msdn.microsoft.com/en-us/da976d91-a3d6-44e8-affa-466b1e2bd351). Windows PowerShell passes information between cmdlets using .NET objects. Consequently, a cmdlet might need to define its own type, or the cmdlet might need to extend an existing type provided by another cmdlet. For more information about defining new types or extending existing types, see [Extending Object Types and Formatting](https://msdn.microsoft.com/en-us/da976d91-a3d6-44e8-affa-466b1e2bd351). ## Building the Cmdlet -After implementing a cmdlet, you must register it with Windows PowerShell through a Windows PowerShell snap-in. For more information about registering cmdlets, see [How to Register Cmdlets, Providers, and Host Applications](https://msdn.microsoft.com/en-us/a41e9054-29c8-40ab-bf2b-8ce4e7ec1c8c). After implementing a cmdlet, you must register it with Windows PowerShell through a Windows PowerShell snap-in. For more information about registering cmdlets, see [How to Register Cmdlets, Providers, and Host Applications](https://msdn.microsoft.com/en-us/a41e9054-29c8-40ab-bf2b-8ce4e7ec1c8c). ## Testing the Cmdlet When your cmdlet has been registered with Windows PowerShell, you can test it by running it on the command line. The code for our sample Get-Proc cmdlet is small, but it still uses the Windows PowerShell runtime and an existing .NET object, which is enough to make it useful. Let's test it to better understand what Get-Proc can do and how its output can be used. For more information about using cmdlets from the command line, see the [Getting Started with Windows PowerShell](/powershell/scripting/getting-started/getting-started-with-windows-powershell). -When your cmdlet has been registered with Windows PowerShell, you can test it by running it on the command line. The code for our sample Get-Proc cmdlet is small, but it still uses the Windows PowerShell runtime and an existing .NET object, which is enough to make it useful. Let's test it to better understand what Get-Proc can do and how its output can be used. For more information about using cmdlets from the command line, see the [Getting Started with Windows PowerShell](https://msdn.microsoft.com/en-us/69555d95-b481-43e1-86e7-b46d68b3e2dd). 1. Start Windows PowerShell, and get the current processes running on the computer.