From 64c3709c74ebb316671a55a05d3813084aad54dd Mon Sep 17 00:00:00 2001 From: Arie Heinrich Date: Wed, 16 Oct 2024 15:54:32 +0200 Subject: [PATCH 1/2] Update about_Functions_Advanced_Methods.md to include clean block in example as well (#11476) * Update about_Functions_Advanced_Methods.md add clean block to first example * Copy changes to other versions --------- Co-authored-by: Sean Wheeler --- .../About/about_Functions_Advanced_Methods.md | 4 ++-- .../About/about_Functions_Advanced_Methods.md | 4 ++-- .../About/about_Functions_Advanced_Methods.md | 5 +++-- .../About/about_Functions_Advanced_Methods.md | 5 +++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Methods.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Methods.md index 38fa85be4ff0..20ddd6c7baf2 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Methods.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Methods.md @@ -1,7 +1,7 @@ --- description: Describes how functions that specify the `CmdletBinding` attribute can use the methods and properties that are available to compiled cmdlets. Locale: en-US -ms.date: 03/12/2024 +ms.date: 10/16/2024 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions_advanced_methods?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_Functions_Advanced_Methods @@ -54,7 +54,7 @@ processing, and an `end` block for one-time post-processing. Function Test-ScriptCmdlet { [CmdletBinding(SupportsShouldProcess=$True)] - Param ($Parameter1) + param ($Parameter1) begin{} process{} end{} diff --git a/reference/7.2/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Methods.md b/reference/7.2/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Methods.md index 0b299e2f516c..ec09b3767f4c 100644 --- a/reference/7.2/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Methods.md +++ b/reference/7.2/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Methods.md @@ -1,7 +1,7 @@ --- description: Describes how functions that specify the `CmdletBinding` attribute can use the methods and properties that are available to compiled cmdlets. Locale: en-US -ms.date: 03/12/2024 +ms.date: 10/16/2024 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions_advanced_methods?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_Functions_Advanced_Methods @@ -54,7 +54,7 @@ processing, and an `end` block for one-time post-processing. Function Test-ScriptCmdlet { [CmdletBinding(SupportsShouldProcess=$True)] - Param ($Parameter1) + param ($Parameter1) begin{} process{} end{} diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Methods.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Methods.md index 3c405f3f7059..ceb8158d787a 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Methods.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Methods.md @@ -1,7 +1,7 @@ --- description: Describes how functions that specify the `CmdletBinding` attribute can use the methods and properties that are available to compiled cmdlets. Locale: en-US -ms.date: 05/20/2024 +ms.date: 10/16/2024 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions_advanced_methods?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_Functions_Advanced_Methods @@ -55,10 +55,11 @@ processing, and an `end` block for one-time post-processing. Function Test-ScriptCmdlet { [CmdletBinding(SupportsShouldProcess=$True)] - Param ($Parameter1) + param ($Parameter1) begin{} process{} end{} + clean{} } ``` diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Methods.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Methods.md index 1d06bea20486..e95bac57d805 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Methods.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Methods.md @@ -1,7 +1,7 @@ --- description: Describes how functions that specify the `CmdletBinding` attribute can use the methods and properties that are available to compiled cmdlets. Locale: en-US -ms.date: 05/20/2024 +ms.date: 10/16/2024 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions_advanced_methods?view=powershell-7.5&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_Functions_Advanced_Methods @@ -55,10 +55,11 @@ processing, and an `end` block for one-time post-processing. Function Test-ScriptCmdlet { [CmdletBinding(SupportsShouldProcess=$True)] - Param ($Parameter1) + param ($Parameter1) begin{} process{} end{} + clean{} } ``` From dd153b858cb461e6d08cebbd59903b21b5d9eb04 Mon Sep 17 00:00:00 2001 From: Colin Webster <152209080+colinwebster-hc@users.noreply.github.com> Date: Wed, 16 Oct 2024 10:15:19 -0500 Subject: [PATCH 2/2] Update approved-verbs-for-windows-powershell-commands.md (#11477) add Update as a synonym to avoid for Set --- .../cmdlet/approved-verbs-for-windows-powershell-commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/docs-conceptual/developer/cmdlet/approved-verbs-for-windows-powershell-commands.md b/reference/docs-conceptual/developer/cmdlet/approved-verbs-for-windows-powershell-commands.md index a085d98a1e8d..66f085f6c5d9 100644 --- a/reference/docs-conceptual/developer/cmdlet/approved-verbs-for-windows-powershell-commands.md +++ b/reference/docs-conceptual/developer/cmdlet/approved-verbs-for-windows-powershell-commands.md @@ -113,7 +113,7 @@ lists most of the defined verbs. | [Resize](/dotnet/api/System.Management.Automation.VerbsCommon.Resize)(rz) | Changes the size of a resource. | | | [Search](/dotnet/api/System.Management.Automation.VerbsCommon.Search) (sr) | Creates a reference to a resource in a container. | Find, Locate | | [Select](/dotnet/api/System.Management.Automation.VerbsCommon.Select) (sc) | Locates a resource in a container. For example, the `Select-String` cmdlet finds text in strings and files. | Find, Locate | -| [Set](/dotnet/api/System.Management.Automation.VerbsCommon.Set) (s) | Replaces data on an existing resource or creates a resource that contains some data. For example, the `Set-Date` cmdlet changes the system time on the local computer. (The `New` verb can also be used to create a resource.) This verb is paired with `Get`. | Write, Reset, Assign, Configure | +| [Set](/dotnet/api/System.Management.Automation.VerbsCommon.Set) (s) | Replaces data on an existing resource or creates a resource that contains some data. For example, the `Set-Date` cmdlet changes the system time on the local computer. (The `New` verb can also be used to create a resource.) This verb is paired with `Get`. | Write, Reset, Assign, Configure, Update | | [Show](/dotnet/api/System.Management.Automation.VerbsCommon.Show) (sh) | Makes a resource visible to the user. This verb is paired with `Hide`. | Display, Produce | | [Skip](/dotnet/api/System.Management.Automation.VerbsCommon.Skip) (sk) | Bypasses one or more resources or points in a sequence. | Bypass, Jump | | [Split](/dotnet/api/System.Management.Automation.VerbsCommon.Split) (sl) | Separates parts of a resource. For example, the `Split-Path` cmdlet returns different parts of a path. This verb is paired with `Join`. | Separate |