From d5b398e5e5c68d8836e4298d5946365d73099b9f Mon Sep 17 00:00:00 2001 From: surfingoldelephant <151538956+surfingoldelephant@users.noreply.github.com> Date: Sun, 23 Mar 2025 14:50:36 +0000 Subject: [PATCH] Fix incorrect case/capitalization in ref docs 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). --- ...to-invoke-a-cmdlet-from-within-a-cmdlet.md | 2 +- .../developer/cmdlet/how-to-support-jobs.md | 4 ++-- .../how-to-validate-an-argument-count.md | 2 +- .../how-to-validate-an-argument-pattern.md | 2 +- .../how-to-validate-an-argument-range.md | 2 +- .../cmdlet/how-to-validate-an-argument-set.md | 4 ++-- .../how-to-validate-the-argument-length.md | 2 +- .../interpreting-errorrecord-objects.md | 2 +- .../cmdlet/parameter-attribute-declaration.md | 2 +- .../requesting-confirmation-from-cmdlets.md | 6 +++--- .../cmdlet/required-development-guidelines.md | 14 ++++++------- .../cmdlet/stopprocesssample01-sample.md | 4 ++-- .../cmdlet/stopprocesssample02-sample.md | 4 ++-- .../cmdlet/stopprocesssample03-sample.md | 4 ++-- .../cmdlet/stopprocesssample04-sample.md | 4 ++-- ...ongly-encouraged-development-guidelines.md | 2 +- ...ildcard-characters-in-cmdlet-parameters.md | 6 +++--- .../developer/cmdlet/terminating-errors.md | 14 ++++++------- .../cmdlet/types-of-cmdlet-output.md | 2 +- .../cmdlet/types-of-cmdlet-parameters.md | 10 +++++----- .../validatelength-attribute-declaration.md | 4 ++-- .../validatepattern-attribute-declaration.md | 8 ++++---- .../validaterange-attribute-declaration.md | 4 ++-- .../validateset-attribute-declaration.md | 4 ++-- .../windows-powershell-error-records.md | 20 +++++++++---------- .../windows-powershell-session-state.md | 6 +++--- .../developer/ets/errors-exceptions.md | 2 +- .../docs-conceptual/developer/ets/overview.md | 2 +- .../developer/format/creating-a-list-view.md | 12 +++++------ .../developer/format/creating-a-table-view.md | 8 ++++---- .../developer/format/creating-a-wide-view.md | 6 +++--- .../format/creating-custom-controls.md | 2 +- ...ent-for-listitem-for-listcontrol-format.md | 2 +- ...tablecolumnitem-for-tablecontrol-format.md | 2 +- ...ent-for-wideitem-for-widecontrol-format.md | 2 +- .../format/formatting-file-overview.md | 2 +- .../developer/format/list-view-basic.md | 10 +++++----- .../format/listcontrol-element-format.md | 2 +- ...tentries-element-for-listcontrol-format.md | 2 +- ...istentry-element-for-listcontrol-format.md | 2 +- 40 files changed, 97 insertions(+), 97 deletions(-) diff --git a/reference/docs-conceptual/developer/cmdlet/how-to-invoke-a-cmdlet-from-within-a-cmdlet.md b/reference/docs-conceptual/developer/cmdlet/how-to-invoke-a-cmdlet-from-within-a-cmdlet.md index e9a2e2468f2a..4838e7c2040a 100644 --- a/reference/docs-conceptual/developer/cmdlet/how-to-invoke-a-cmdlet-from-within-a-cmdlet.md +++ b/reference/docs-conceptual/developer/cmdlet/how-to-invoke-a-cmdlet-from-within-a-cmdlet.md @@ -14,7 +14,7 @@ computer. The call to the `Get-Process` cmdlet is equivalent to the following co retrieves all the processes whose names start with the characters "a" through "t". ```powershell -Get-Process -name [a-t]* +Get-Process -Name [a-t]* ``` > [!IMPORTANT] diff --git a/reference/docs-conceptual/developer/cmdlet/how-to-support-jobs.md b/reference/docs-conceptual/developer/cmdlet/how-to-support-jobs.md index 684e350be543..d2fb7d855ba0 100644 --- a/reference/docs-conceptual/developer/cmdlet/how-to-support-jobs.md +++ b/reference/docs-conceptual/developer/cmdlet/how-to-support-jobs.md @@ -30,7 +30,7 @@ information about background jobs, see [Background Jobs](./background-jobs.md). 1. Create an object that derives from the [System.Management.Automation.Job](/dotnet/api/System.Management.Automation.Job) class. This object can be a custom job object or one of the job objects provided by Windows PowerShell, such - a [System.Management.Automation.Pseventjob](/dotnet/api/System.Management.Automation.PSEventJob) + a [System.Management.Automation.PSEventJob](/dotnet/api/System.Management.Automation.PSEventJob) object. The following example shows a custom job object. @@ -172,7 +172,7 @@ using System.Diagnostics; // Diagnostics namespace for retrieving // user/documents/WindowsPowerShell/modules/GetProcessSample06 // // To import the module, run the following command: Import-Module GetProcessSample06. -// To test the cmdlet, run the following command: Get-Proc -name +// To test the cmdlet, run the following command: Get-Proc -Name // // diff --git a/reference/docs-conceptual/developer/cmdlet/how-to-validate-an-argument-count.md b/reference/docs-conceptual/developer/cmdlet/how-to-validate-an-argument-count.md index e86882fc3c35..569e0ee1d699 100644 --- a/reference/docs-conceptual/developer/cmdlet/how-to-validate-an-argument-count.md +++ b/reference/docs-conceptual/developer/cmdlet/how-to-validate-an-argument-count.md @@ -9,7 +9,7 @@ title: How to Validate an Argument Count This example shows how to specify a validation rule that the Windows PowerShell runtime can use to check the number of arguments (the count) that a parameter accepts before the cmdlet is run. You set this validation rule by declaring the ValidateCount attribute. > [!NOTE] -> For more information about the class that defines this attribute, see [System.Management.Automation.Validatecountattribute](/dotnet/api/System.Management.Automation.ValidateCountAttribute). +> For more information about the class that defines this attribute, see [System.Management.Automation.ValidateCountAttribute](/dotnet/api/System.Management.Automation.ValidateCountAttribute). ## To validate an argument count diff --git a/reference/docs-conceptual/developer/cmdlet/how-to-validate-an-argument-pattern.md b/reference/docs-conceptual/developer/cmdlet/how-to-validate-an-argument-pattern.md index 363f8b108982..084895f17a6c 100644 --- a/reference/docs-conceptual/developer/cmdlet/how-to-validate-an-argument-pattern.md +++ b/reference/docs-conceptual/developer/cmdlet/how-to-validate-an-argument-pattern.md @@ -9,7 +9,7 @@ title: How to Validate an Argument Pattern This example shows how to specify a validation rule that the Windows PowerShell runtime can use to check the character pattern of the parameter argument before the cmdlet is run. You set this validation rule by declaring the ValidatePattern attribute. > [!NOTE] -> For more information about the class that defines this attribute, see [System.Management.Automation.Validatepatternattribute](/dotnet/api/System.Management.Automation.ValidatePatternAttribute). +> For more information about the class that defines this attribute, see [System.Management.Automation.ValidatePatternAttribute](/dotnet/api/System.Management.Automation.ValidatePatternAttribute). ## To validate an argument pattern diff --git a/reference/docs-conceptual/developer/cmdlet/how-to-validate-an-argument-range.md b/reference/docs-conceptual/developer/cmdlet/how-to-validate-an-argument-range.md index 5bb178bbad01..20880fb74e37 100644 --- a/reference/docs-conceptual/developer/cmdlet/how-to-validate-an-argument-range.md +++ b/reference/docs-conceptual/developer/cmdlet/how-to-validate-an-argument-range.md @@ -9,7 +9,7 @@ title: How to Validate an Argument Range This example shows how to specify a validation rule that the Windows PowerShell runtime can use to check the minimum and maximum values of the parameter argument before the cmdlet is run. You set this validation rule by declaring the ValidateRange attribute. > [!NOTE] -> For more information about the class that defines this attribute, see [System.Management.Automation.Validaterangeattribute](/dotnet/api/System.Management.Automation.ValidateRangeAttribute). +> For more information about the class that defines this attribute, see [System.Management.Automation.ValidateRangeAttribute](/dotnet/api/System.Management.Automation.ValidateRangeAttribute). ### To validate an argument range diff --git a/reference/docs-conceptual/developer/cmdlet/how-to-validate-an-argument-set.md b/reference/docs-conceptual/developer/cmdlet/how-to-validate-an-argument-set.md index c45df11a3850..3320963c85a3 100644 --- a/reference/docs-conceptual/developer/cmdlet/how-to-validate-an-argument-set.md +++ b/reference/docs-conceptual/developer/cmdlet/how-to-validate-an-argument-set.md @@ -9,7 +9,7 @@ title: How to Validate an Argument Set This example shows how to specify a validation rule that the Windows PowerShell runtime can use to check the parameter argument before the cmdlet is run. This validation rule provides a set of the valid values for the parameter argument. > [!NOTE] -> For more information about the class that defines this attribute, see [System.Management.Automation.Validatesetattribute](/dotnet/api/System.Management.Automation.ValidateSetAttribute). +> For more information about the class that defines this attribute, see [System.Management.Automation.ValidateSetAttribute](/dotnet/api/System.Management.Automation.ValidateSetAttribute). ## To validate an argument set @@ -31,7 +31,7 @@ For more information about how to declare this attribute, see [ValidateSet Attri ## See Also -[System.Management.Automation.Validatesetattribute](/dotnet/api/System.Management.Automation.ValidateSetAttribute) +[System.Management.Automation.ValidateSetAttribute](/dotnet/api/System.Management.Automation.ValidateSetAttribute) [ValidateSet Attribute Declaration](./validateset-attribute-declaration.md) diff --git a/reference/docs-conceptual/developer/cmdlet/how-to-validate-the-argument-length.md b/reference/docs-conceptual/developer/cmdlet/how-to-validate-the-argument-length.md index 12130fabb26b..ea6027f3b345 100644 --- a/reference/docs-conceptual/developer/cmdlet/how-to-validate-the-argument-length.md +++ b/reference/docs-conceptual/developer/cmdlet/how-to-validate-the-argument-length.md @@ -9,7 +9,7 @@ title: How to Validate the Argument Length This example shows how to specify a validation rule that the Windows PowerShell runtime can use to check the number of characters (the length) of the parameter argument before the cmdlet is run. You set this validation rule by declaring the ValidateLength attribute. > [!NOTE] -> For more information about the class that defines this attribute, see [System.Management.Automation.Validatelengthattribute](/dotnet/api/System.Management.Automation.ValidateLengthAttribute). +> For more information about the class that defines this attribute, see [System.Management.Automation.ValidateLengthAttribute](/dotnet/api/System.Management.Automation.ValidateLengthAttribute). ## To validate the argument length diff --git a/reference/docs-conceptual/developer/cmdlet/interpreting-errorrecord-objects.md b/reference/docs-conceptual/developer/cmdlet/interpreting-errorrecord-objects.md index 6c2789eddb1f..78fb266c0deb 100644 --- a/reference/docs-conceptual/developer/cmdlet/interpreting-errorrecord-objects.md +++ b/reference/docs-conceptual/developer/cmdlet/interpreting-errorrecord-objects.md @@ -121,7 +121,7 @@ used to identify the error. This information is available through the following - [System.Management.Automation.Cmdlet.WriteError][4] -- [System.Management.Automation.Cmdlet.Throwterminatingerror*][3] +- [System.Management.Automation.Cmdlet.ThrowTerminatingError*][3] - [Adding Non-Terminating Error Reporting to Your Cmdlet](./adding-non-terminating-error-reporting-to-your-cmdlet.md) diff --git a/reference/docs-conceptual/developer/cmdlet/parameter-attribute-declaration.md b/reference/docs-conceptual/developer/cmdlet/parameter-attribute-declaration.md index be9113ee8938..2c363d8a1468 100644 --- a/reference/docs-conceptual/developer/cmdlet/parameter-attribute-declaration.md +++ b/reference/docs-conceptual/developer/cmdlet/parameter-attribute-declaration.md @@ -101,7 +101,7 @@ hidden from the user for tab expansion and IntelliSense. The default is `false`. ## See Also -- [System.Management.Automation.Parameterattribute][05] +- [System.Management.Automation.ParameterAttribute][05] - [Cmdlet Parameter Names][07] - [Writing a Windows PowerShell Cmdlet][02] diff --git a/reference/docs-conceptual/developer/cmdlet/requesting-confirmation-from-cmdlets.md b/reference/docs-conceptual/developer/cmdlet/requesting-confirmation-from-cmdlets.md index 21291be8451a..08eda2f211e7 100644 --- a/reference/docs-conceptual/developer/cmdlet/requesting-confirmation-from-cmdlets.md +++ b/reference/docs-conceptual/developer/cmdlet/requesting-confirmation-from-cmdlets.md @@ -67,11 +67,11 @@ If the cmdlet or provider must send a message but not request confirmation, it c Cmdlets and providers first call the following methods to request confirmation before they attempt to perform an operation that changes a system outside of Windows PowerShell: -- [System.Management.Automation.Cmdlet.Shouldprocess](/dotnet/api/System.Management.Automation.Cmdlet.ShouldProcess) +- [System.Management.Automation.Cmdlet.ShouldProcess](/dotnet/api/System.Management.Automation.Cmdlet.ShouldProcess) -- [System.Management.Automation.Provider.Cmdletprovider.Shouldprocess](/dotnet/api/System.Management.Automation.Provider.CmdletProvider.ShouldProcess) +- [System.Management.Automation.Provider.CmdletProvider.ShouldProcess](/dotnet/api/System.Management.Automation.Provider.CmdletProvider.ShouldProcess) -They do so by calling the [System.Management.Automation.Cmdlet.Shouldprocess](/dotnet/api/System.Management.Automation.Cmdlet.ShouldProcess) method, which prompts the user to confirm the operation based on how the user invoked the command. +They do so by calling the [System.Management.Automation.Cmdlet.ShouldProcess](/dotnet/api/System.Management.Automation.Cmdlet.ShouldProcess) method, which prompts the user to confirm the operation based on how the user invoked the command. ## See Also diff --git a/reference/docs-conceptual/developer/cmdlet/required-development-guidelines.md b/reference/docs-conceptual/developer/cmdlet/required-development-guidelines.md index 058fe38567d5..174ca7ec8e78 100644 --- a/reference/docs-conceptual/developer/cmdlet/required-development-guidelines.md +++ b/reference/docs-conceptual/developer/cmdlet/required-development-guidelines.md @@ -56,7 +56,7 @@ The verb specified in the Cmdlet attribute must come from the recognized set of - [System.Management.Automation.VerbsDiagnostic](/dotnet/api/System.Management.Automation.VerbsDiagnostic) -- [System.Management.Automation.VerbsLifeCycle](/dotnet/api/System.Management.Automation.VerbsLifeCycle) +- [System.Management.Automation.VerbsLifecycle](/dotnet/api/System.Management.Automation.VerbsLifecycle) - [System.Management.Automation.VerbsSecurity](/dotnet/api/System.Management.Automation.VerbsSecurity) @@ -64,7 +64,7 @@ The verb specified in the Cmdlet attribute must come from the recognized set of For more information about the approved verb names, see [Cmdlet Verbs](./approved-verbs-for-windows-powershell-commands.md). -Users need a set of discoverable and expected cmdlet names. Use the appropriate verb so that the user can make a quick assessment of what a cmdlet does and to easily discover the capabilities of the system. For example, the following command-line command gets a list of all the commands on the system whose names begin with "start": `get-command start-*`. Use the nouns in your cmdlets to differentiate your cmdlets from other cmdlets. The noun indicates the resource on which the operation will be performed. The operation itself is represented by the verb. +Users need a set of discoverable and expected cmdlet names. Use the appropriate verb so that the user can make a quick assessment of what a cmdlet does and to easily discover the capabilities of the system. For example, the following command-line command gets a list of all the commands on the system whose names begin with "Start": `Get-Command Start-*`. Use the nouns in your cmdlets to differentiate your cmdlets from other cmdlets. The noun indicates the resource on which the operation will be performed. The operation itself is represented by the verb. ### Cmdlet Names: Characters that cannot be Used (RD02) @@ -123,15 +123,15 @@ If your cmdlet is used interactively, always provide a Force parameter to overri - [System.Management.Automation.Host.PSHostUserInterface.Prompt*](/dotnet/api/System.Management.Automation.Host.PSHostUserInterface.Prompt) -- [System.Management.Automation.Host.Pshostuserinterface.PromptForChoice](/dotnet/api/System.Management.Automation.Host.PSHostUserInterface.PromptForChoice) +- [System.Management.Automation.Host.PSHostUserInterface.PromptForChoice](/dotnet/api/System.Management.Automation.Host.PSHostUserInterface.PromptForChoice) -- [System.Management.Automation.Host.Ihostuisupportsmultiplechoiceselection.PromptForChoice](/dotnet/api/System.Management.Automation.Host.IHostUISupportsMultipleChoiceSelection.PromptForChoice) +- [System.Management.Automation.Host.IHostUISupportsMultipleChoiceSelection.PromptForChoice](/dotnet/api/System.Management.Automation.Host.IHostUISupportsMultipleChoiceSelection.PromptForChoice) -- [System.Management.Automation.Host.Pshostuserinterface.PromptForCredential*](/dotnet/api/System.Management.Automation.Host.PSHostUserInterface.PromptForCredential) +- [System.Management.Automation.Host.PSHostUserInterface.PromptForCredential*](/dotnet/api/System.Management.Automation.Host.PSHostUserInterface.PromptForCredential) -- [System.Management.Automation.Host.Pshostuserinterface.ReadLine*](/dotnet/api/System.Management.Automation.Host.PSHostUserInterface.ReadLine) +- [System.Management.Automation.Host.PSHostUserInterface.ReadLine*](/dotnet/api/System.Management.Automation.Host.PSHostUserInterface.ReadLine) -- [System.Management.Automation.Host.Pshostuserinterface.ReadLineAsSecureString*](/dotnet/api/System.Management.Automation.Host.PSHostUserInterface.ReadLineAsSecureString) +- [System.Management.Automation.Host.PSHostUserInterface.ReadLineAsSecureString*](/dotnet/api/System.Management.Automation.Host.PSHostUserInterface.ReadLineAsSecureString) ### Document Output Objects (RD06) diff --git a/reference/docs-conceptual/developer/cmdlet/stopprocesssample01-sample.md b/reference/docs-conceptual/developer/cmdlet/stopprocesssample01-sample.md index fd32201966c0..50fe7a780086 100644 --- a/reference/docs-conceptual/developer/cmdlet/stopprocesssample01-sample.md +++ b/reference/docs-conceptual/developer/cmdlet/stopprocesssample01-sample.md @@ -39,7 +39,7 @@ PowerShell 2.0. 1. Run the following command to run the cmdlet: - `stop-proc` + `Stop-Proc` ## Requirements @@ -77,7 +77,7 @@ namespace Microsoft.Samples.PowerShell.Commands #region StopProcCommand /// - /// This class implements the stop-proc cmdlet. + /// This class implements the Stop-Proc cmdlet. /// [Cmdlet(VerbsLifecycle.Stop, "Proc", SupportsShouldProcess = true)] diff --git a/reference/docs-conceptual/developer/cmdlet/stopprocesssample02-sample.md b/reference/docs-conceptual/developer/cmdlet/stopprocesssample02-sample.md index 398e747def6b..ca8465d0f093 100644 --- a/reference/docs-conceptual/developer/cmdlet/stopprocesssample02-sample.md +++ b/reference/docs-conceptual/developer/cmdlet/stopprocesssample02-sample.md @@ -41,7 +41,7 @@ similar to the `Stop-Process` cmdlet provided by Windows PowerShell 2.0. 1. Run the following command to run the cmdlet: - `stop-proc` + `Stop-Proc` ## Requirements @@ -82,7 +82,7 @@ namespace Microsoft.Samples.PowerShell.Commands #region StopProcCommand /// - /// This class implements the stop-proc cmdlet. + /// This class implements the Stop-Proc cmdlet. /// [Cmdlet(VerbsLifecycle.Stop, "Proc", SupportsShouldProcess = true)] diff --git a/reference/docs-conceptual/developer/cmdlet/stopprocesssample03-sample.md b/reference/docs-conceptual/developer/cmdlet/stopprocesssample03-sample.md index d4904af5ab4e..76a7da6afafc 100644 --- a/reference/docs-conceptual/developer/cmdlet/stopprocesssample03-sample.md +++ b/reference/docs-conceptual/developer/cmdlet/stopprocesssample03-sample.md @@ -38,7 +38,7 @@ PowerShell 2.0. 1. Run the following command to run the cmdlet: - `stop-proc` + `Stop-Proc` ## Requirements @@ -74,7 +74,7 @@ namespace Microsoft.Samples.PowerShell.Commands #region StopProcCommand /// - /// This class implements the stop-proc cmdlet. + /// This class implements the Stop-Proc cmdlet. /// [Cmdlet(VerbsLifecycle.Stop, "Proc", SupportsShouldProcess = true)] diff --git a/reference/docs-conceptual/developer/cmdlet/stopprocesssample04-sample.md b/reference/docs-conceptual/developer/cmdlet/stopprocesssample04-sample.md index d62be4e77804..d8853de6cda1 100644 --- a/reference/docs-conceptual/developer/cmdlet/stopprocesssample04-sample.md +++ b/reference/docs-conceptual/developer/cmdlet/stopprocesssample04-sample.md @@ -38,7 +38,7 @@ provided by Windows PowerShell 2.0. 1. Run the following command to run the cmdlet: - `stop-proc` + `Stop-Proc` ## Requirements @@ -79,7 +79,7 @@ namespace Microsoft.Samples.PowerShell.Commands #region StopProcCommand /// - /// This class implements the stop-proc cmdlet. + /// This class implements the Stop-Proc cmdlet. /// [Cmdlet(VerbsLifecycle.Stop, "Proc", DefaultParameterSetName = "ProcessId", diff --git a/reference/docs-conceptual/developer/cmdlet/strongly-encouraged-development-guidelines.md b/reference/docs-conceptual/developer/cmdlet/strongly-encouraged-development-guidelines.md index be33dc386fdb..ac6eec52d1f6 100644 --- a/reference/docs-conceptual/developer/cmdlet/strongly-encouraged-development-guidelines.md +++ b/reference/docs-conceptual/developer/cmdlet/strongly-encouraged-development-guidelines.md @@ -258,7 +258,7 @@ characters is not required, define a `LiteralPath` parameter. If the data that the cmdlet reads or writes has to be a file, the cmdlet should accept Windows PowerShell path input, and the cmdlet should use the -[System.Management.Automation.Sessionstate.Path](/dotnet/api/System.Management.Automation.SessionState.Path) +[System.Management.Automation.SessionState.Path](/dotnet/api/System.Management.Automation.SessionState.Path) property to translate the Windows PowerShell paths into paths that the file system recognizes. The specific mechanisms include the following methods: diff --git a/reference/docs-conceptual/developer/cmdlet/supporting-wildcard-characters-in-cmdlet-parameters.md b/reference/docs-conceptual/developer/cmdlet/supporting-wildcard-characters-in-cmdlet-parameters.md index d334628a82ae..062eef12abda 100644 --- a/reference/docs-conceptual/developer/cmdlet/supporting-wildcard-characters-in-cmdlet-parameters.md +++ b/reference/docs-conceptual/developer/cmdlet/supporting-wildcard-characters-in-cmdlet-parameters.md @@ -38,9 +38,9 @@ Windows PowerShell supports the following wildcard characters. When you design cmdlets that support wildcard characters, allow for combinations of wildcard characters. For example, the following command uses the `Get-ChildItem` cmdlet to retrieve all the -.txt files that are in the c:\Techdocs folder and that begin with the letters "a" through "l." +.txt files that are in the C:\Techdocs folder and that begin with the letters "a" through "l." -`Get-ChildItem c:\techdocs\[a-l]\*.txt` +`Get-ChildItem C:\techdocs\[a-l]\*.txt` The previous command uses the range wildcard `[a-l]` to specify that the file name should begin with the characters "a" through "l" and uses the `*` wildcard character as a placeholder @@ -49,7 +49,7 @@ for any characters between the first letter of the filename and the **.txt** ext The following example uses a range wildcard pattern that excludes the letter "d" but includes all the other letters from "a" through "f." -`Get-ChildItem c:\techdocs\[a-cef]\*.txt` +`Get-ChildItem C:\techdocs\[a-cef]\*.txt` ## Handling Literal Characters in Wildcard Patterns diff --git a/reference/docs-conceptual/developer/cmdlet/terminating-errors.md b/reference/docs-conceptual/developer/cmdlet/terminating-errors.md index 7dbe36d8aba5..3c831dfcb8ee 100644 --- a/reference/docs-conceptual/developer/cmdlet/terminating-errors.md +++ b/reference/docs-conceptual/developer/cmdlet/terminating-errors.md @@ -8,17 +8,17 @@ title: Terminating Errors This topic discusses the method used to report terminating errors. It also discusses how to call the method from within the cmdlet, and it discusses the exceptions that can be returned by the Windows PowerShell runtime when the method is called. -When a terminating error occurs, the cmdlet should report the error by calling the [System.Management.Automation.Cmdlet.Throwterminatingerror*](/dotnet/api/System.Management.Automation.Cmdlet.ThrowTerminatingError) method. This method allows the cmdlet to send an error record that describes the condition that caused the terminating error. For more information about error records, see [Windows PowerShell Error Records](./windows-powershell-error-records.md). +When a terminating error occurs, the cmdlet should report the error by calling the [System.Management.Automation.Cmdlet.ThrowTerminatingError*](/dotnet/api/System.Management.Automation.Cmdlet.ThrowTerminatingError) method. This method allows the cmdlet to send an error record that describes the condition that caused the terminating error. For more information about error records, see [Windows PowerShell Error Records](./windows-powershell-error-records.md). -When the [System.Management.Automation.Cmdlet.Throwterminatingerror*](/dotnet/api/System.Management.Automation.Cmdlet.ThrowTerminatingError) method is called, the Windows PowerShell runtime permanently stops the execution of the pipeline and throws a [System.Management.Automation.Pipelinestoppedexception](/dotnet/api/System.Management.Automation.PipelineStoppedException) exception. Any subsequent attempts to call [System.Management.Automation.Cmdlet.WriteObject](/dotnet/api/System.Management.Automation.Cmdlet.WriteObject), [System.Management.Automation.Cmdlet.WriteError](/dotnet/api/System.Management.Automation.Cmdlet.WriteError), or several other APIs causes those calls to throw a [System.Management.Automation.Pipelinestoppedexception](/dotnet/api/System.Management.Automation.PipelineStoppedException) exception. +When the [System.Management.Automation.Cmdlet.ThrowTerminatingError*](/dotnet/api/System.Management.Automation.Cmdlet.ThrowTerminatingError) method is called, the Windows PowerShell runtime permanently stops the execution of the pipeline and throws a [System.Management.Automation.PipelineStoppedException](/dotnet/api/System.Management.Automation.PipelineStoppedException) exception. Any subsequent attempts to call [System.Management.Automation.Cmdlet.WriteObject](/dotnet/api/System.Management.Automation.Cmdlet.WriteObject), [System.Management.Automation.Cmdlet.WriteError](/dotnet/api/System.Management.Automation.Cmdlet.WriteError), or several other APIs causes those calls to throw a [System.Management.Automation.PipelineStoppedException](/dotnet/api/System.Management.Automation.PipelineStoppedException) exception. -The [System.Management.Automation.Pipelinestoppedexception](/dotnet/api/System.Management.Automation.PipelineStoppedException) exception can also occur if another cmdlet in the pipeline reports a terminating error, if the user has asked to stop the pipeline, or if the pipeline has been halted before completion for any reason. The cmdlet does not need to catch the [System.Management.Automation.Pipelinestoppedexception](/dotnet/api/System.Management.Automation.PipelineStoppedException) exception unless it must clean up open resources or its internal state. +The [System.Management.Automation.PipelineStoppedException](/dotnet/api/System.Management.Automation.PipelineStoppedException) exception can also occur if another cmdlet in the pipeline reports a terminating error, if the user has asked to stop the pipeline, or if the pipeline has been halted before completion for any reason. The cmdlet does not need to catch the [System.Management.Automation.PipelineStoppedException](/dotnet/api/System.Management.Automation.PipelineStoppedException) exception unless it must clean up open resources or its internal state. Cmdlets can write any number of output objects or non-terminating errors before reporting a terminating error. However, the terminating error permanently stops the pipeline, and no further output, terminating errors, or non-terminating errors can be reported. -Cmdlets can call [System.Management.Automation.Cmdlet.Throwterminatingerror*](/dotnet/api/System.Management.Automation.Cmdlet.ThrowTerminatingError) only from the thread that called the [System.Management.Automation.Cmdlet.BeginProcessing](/dotnet/api/System.Management.Automation.Cmdlet.BeginProcessing), [System.Management.Automation.Cmdlet.ProcessRecord](/dotnet/api/System.Management.Automation.Cmdlet.ProcessRecord), or [System.Management.Automation.Cmdlet.EndProcessing](/dotnet/api/System.Management.Automation.Cmdlet.EndProcessing) input processing method. Do not attempt to call [System.Management.Automation.Cmdlet.Throwterminatingerror*](/dotnet/api/System.Management.Automation.Cmdlet.ThrowTerminatingError) or [System.Management.Automation.Cmdlet.WriteError](/dotnet/api/System.Management.Automation.Cmdlet.WriteError) from another thread. Instead, errors must be communicated back to the main thread. +Cmdlets can call [System.Management.Automation.Cmdlet.ThrowTerminatingError*](/dotnet/api/System.Management.Automation.Cmdlet.ThrowTerminatingError) only from the thread that called the [System.Management.Automation.Cmdlet.BeginProcessing](/dotnet/api/System.Management.Automation.Cmdlet.BeginProcessing), [System.Management.Automation.Cmdlet.ProcessRecord](/dotnet/api/System.Management.Automation.Cmdlet.ProcessRecord), or [System.Management.Automation.Cmdlet.EndProcessing](/dotnet/api/System.Management.Automation.Cmdlet.EndProcessing) input processing method. Do not attempt to call [System.Management.Automation.Cmdlet.ThrowTerminatingError*](/dotnet/api/System.Management.Automation.Cmdlet.ThrowTerminatingError) or [System.Management.Automation.Cmdlet.WriteError](/dotnet/api/System.Management.Automation.Cmdlet.WriteError) from another thread. Instead, errors must be communicated back to the main thread. -It is possible for a cmdlet to throw an exception in its implementation of the [System.Management.Automation.Cmdlet.BeginProcessing](/dotnet/api/System.Management.Automation.Cmdlet.BeginProcessing), [System.Management.Automation.Cmdlet.ProcessRecord](/dotnet/api/System.Management.Automation.Cmdlet.ProcessRecord), or [System.Management.Automation.Cmdlet.EndProcessing](/dotnet/api/System.Management.Automation.Cmdlet.EndProcessing) method. Any exception thrown from these methods (except for a few severe error conditions that stop the Windows PowerShell host) is interpreted as a terminating error which stops the pipeline, but not Windows PowerShell as a whole. (This applies only to the main cmdlet thread. Uncaught exceptions in threads spawned by the cmdlet, in general, halt the Windows PowerShell host.) We recommend that you use [System.Management.Automation.Cmdlet.Throwterminatingerror*](/dotnet/api/System.Management.Automation.Cmdlet.ThrowTerminatingError) rather than throwing an exception because the error record provides additional information about the error condition, which is useful to the end-user. Cmdlets should honor the managed code guideline against catching and handling all exceptions (`catch (Exception e)`). Convert only exceptions of known and expected types into error records. +It is possible for a cmdlet to throw an exception in its implementation of the [System.Management.Automation.Cmdlet.BeginProcessing](/dotnet/api/System.Management.Automation.Cmdlet.BeginProcessing), [System.Management.Automation.Cmdlet.ProcessRecord](/dotnet/api/System.Management.Automation.Cmdlet.ProcessRecord), or [System.Management.Automation.Cmdlet.EndProcessing](/dotnet/api/System.Management.Automation.Cmdlet.EndProcessing) method. Any exception thrown from these methods (except for a few severe error conditions that stop the Windows PowerShell host) is interpreted as a terminating error which stops the pipeline, but not Windows PowerShell as a whole. (This applies only to the main cmdlet thread. Uncaught exceptions in threads spawned by the cmdlet, in general, halt the Windows PowerShell host.) We recommend that you use [System.Management.Automation.Cmdlet.ThrowTerminatingError*](/dotnet/api/System.Management.Automation.Cmdlet.ThrowTerminatingError) rather than throwing an exception because the error record provides additional information about the error condition, which is useful to the end-user. Cmdlets should honor the managed code guideline against catching and handling all exceptions (`catch (Exception e)`). Convert only exceptions of known and expected types into error records. ## See Also @@ -28,9 +28,9 @@ It is possible for a cmdlet to throw an exception in its implementation of the [ [System.Management.Automation.Cmdlet.ProcessRecord](/dotnet/api/System.Management.Automation.Cmdlet.ProcessRecord) -[System.Management.Automation.Pipelinestoppedexception](/dotnet/api/System.Management.Automation.PipelineStoppedException) +[System.Management.Automation.PipelineStoppedException](/dotnet/api/System.Management.Automation.PipelineStoppedException) -[System.Management.Automation.Cmdlet.Throwterminatingerror*](/dotnet/api/System.Management.Automation.Cmdlet.ThrowTerminatingError) +[System.Management.Automation.Cmdlet.ThrowTerminatingError*](/dotnet/api/System.Management.Automation.Cmdlet.ThrowTerminatingError) [System.Management.Automation.Cmdlet.WriteError](/dotnet/api/System.Management.Automation.Cmdlet.WriteError) diff --git a/reference/docs-conceptual/developer/cmdlet/types-of-cmdlet-output.md b/reference/docs-conceptual/developer/cmdlet/types-of-cmdlet-output.md index 8f70fb14baa3..169fda627f9c 100644 --- a/reference/docs-conceptual/developer/cmdlet/types-of-cmdlet-output.md +++ b/reference/docs-conceptual/developer/cmdlet/types-of-cmdlet-output.md @@ -91,7 +91,7 @@ You can also design a cmdlet to directly access the output functionality of a ho through the PowerShell runtime. Using the host APIs provided by PowerShell instead of [System.Console](/dotnet/api/System.Console) or [System.Windows.Forms](/dotnet/api/System.Windows.Forms) ensures that your cmdlet will work with a -variety of hosts. For example: the **powershell.exe** console host, the **powershell_ise.exe** +variety of hosts. For example: the `powershell.exe` console host, the `powershell_ise.exe` graphical host, the PowerShell remoting host, and third-party hosts. ## See also diff --git a/reference/docs-conceptual/developer/cmdlet/types-of-cmdlet-parameters.md b/reference/docs-conceptual/developer/cmdlet/types-of-cmdlet-parameters.md index 34197af12aa4..2c0a433dc278 100644 --- a/reference/docs-conceptual/developer/cmdlet/types-of-cmdlet-parameters.md +++ b/reference/docs-conceptual/developer/cmdlet/types-of-cmdlet-parameters.md @@ -57,14 +57,14 @@ positional parameters. The following commands show the different ways in which you can specify single and multiple arguments for the parameters of the `Get-Command` cmdlet. Notice that in the last two samples, -**-name** doesn't need to be specified because the `Name` parameter is defined as a positional +`-Name` doesn't need to be specified because the **Name** parameter is defined as a positional parameter. ```powershell -Get-Command -Name get-service -Get-Command -Name get-service,set-service -Get-Command get-service -Get-Command get-service,set-service +Get-Command -Name Get-Service +Get-Command -Name Get-Service,Set-Service +Get-Command Get-Service +Get-Command Get-Service,Set-Service ``` ## Mandatory and Optional Parameters diff --git a/reference/docs-conceptual/developer/cmdlet/validatelength-attribute-declaration.md b/reference/docs-conceptual/developer/cmdlet/validatelength-attribute-declaration.md index d6477b060d74..086566c98622 100644 --- a/reference/docs-conceptual/developer/cmdlet/validatelength-attribute-declaration.md +++ b/reference/docs-conceptual/developer/cmdlet/validatelength-attribute-declaration.md @@ -36,10 +36,10 @@ Required. Specifies the maximum number of characters allowed. - When the argument is not a string. -- The ValidateLength attribute is defined by the [System.Management.Automation.Validatelengthattribute](/dotnet/api/System.Management.Automation.ValidateLengthAttribute) class. +- The ValidateLength attribute is defined by the [System.Management.Automation.ValidateLengthAttribute](/dotnet/api/System.Management.Automation.ValidateLengthAttribute) class. ## See Also -[System.Management.Automation.Validatelengthattribute](/dotnet/api/System.Management.Automation.ValidateLengthAttribute) +[System.Management.Automation.ValidateLengthAttribute](/dotnet/api/System.Management.Automation.ValidateLengthAttribute) [Writing a Windows PowerShell Cmdlet](./writing-a-windows-powershell-cmdlet.md) diff --git a/reference/docs-conceptual/developer/cmdlet/validatepattern-attribute-declaration.md b/reference/docs-conceptual/developer/cmdlet/validatepattern-attribute-declaration.md index c9c7bebf022e..6b457d1fb977 100644 --- a/reference/docs-conceptual/developer/cmdlet/validatepattern-attribute-declaration.md +++ b/reference/docs-conceptual/developer/cmdlet/validatepattern-attribute-declaration.md @@ -22,8 +22,8 @@ When ValidatePattern is invoked within a cmdlet, the Windows PowerShell runtime `RegexString` ([System.String](/dotnet/api/System.String)) Required. Specifies a regular expression that validates the parameter argument. -Options ([System.Text.Regularexpressions.Regexoptions](/dotnet/api/System.Text.RegularExpressions.RegexOptions)) -Optional named parameter. Specifies a bitwise combination of [System.Text.Regularexpressions.Regexoptions](/dotnet/api/System.Text.RegularExpressions.RegexOptions) flags that specify regular expression options. +Options ([System.Text.RegularExpressions.RegexOptions](/dotnet/api/System.Text.RegularExpressions.RegexOptions)) +Optional named parameter. Specifies a bitwise combination of [System.Text.RegularExpressions.RegexOptions](/dotnet/api/System.Text.RegularExpressions.RegexOptions) flags that specify regular expression options. ## Remarks @@ -33,10 +33,10 @@ Optional named parameter. Specifies a bitwise combination of [System.Text.Regula - If this attribute is applied to a collection, each element in the collection must match the pattern. -- The ValidatePattern attribute is defined by the [System.Management.Automation.Validatepatternattribute](/dotnet/api/System.Management.Automation.ValidatePatternAttribute) class. +- The ValidatePattern attribute is defined by the [System.Management.Automation.ValidatePatternAttribute](/dotnet/api/System.Management.Automation.ValidatePatternAttribute) class. ## See Also -[System.Management.Automation.Validatepatternattribute](/dotnet/api/System.Management.Automation.ValidatePatternAttribute) +[System.Management.Automation.ValidatePatternAttribute](/dotnet/api/System.Management.Automation.ValidatePatternAttribute) [Writing a Windows PowerShell Cmdlet](./writing-a-windows-powershell-cmdlet.md) diff --git a/reference/docs-conceptual/developer/cmdlet/validaterange-attribute-declaration.md b/reference/docs-conceptual/developer/cmdlet/validaterange-attribute-declaration.md index 065584850769..39c02b8153c1 100644 --- a/reference/docs-conceptual/developer/cmdlet/validaterange-attribute-declaration.md +++ b/reference/docs-conceptual/developer/cmdlet/validaterange-attribute-declaration.md @@ -32,10 +32,10 @@ Required. Specifies the maximum value allowed. - When the argument is not of the same type as the `MinRange` and the `MaxRange` parameters. -- The ValidateRange attribute is defined by the [System.Management.Automation.Validaterangeattribute](/dotnet/api/System.Management.Automation.ValidateRangeAttribute) class. +- The ValidateRange attribute is defined by the [System.Management.Automation.ValidateRangeAttribute](/dotnet/api/System.Management.Automation.ValidateRangeAttribute) class. ## See Also -[System.Management.Automation.Validaterangeattribute](/dotnet/api/System.Management.Automation.ValidateRangeAttribute) +[System.Management.Automation.ValidateRangeAttribute](/dotnet/api/System.Management.Automation.ValidateRangeAttribute) [Writing a Windows PowerShell Cmdlet](./writing-a-windows-powershell-cmdlet.md) diff --git a/reference/docs-conceptual/developer/cmdlet/validateset-attribute-declaration.md b/reference/docs-conceptual/developer/cmdlet/validateset-attribute-declaration.md index 90cb2a3cd174..d8604956e69c 100644 --- a/reference/docs-conceptual/developer/cmdlet/validateset-attribute-declaration.md +++ b/reference/docs-conceptual/developer/cmdlet/validateset-attribute-declaration.md @@ -36,10 +36,10 @@ Optional named parameter. The default value of `true` indicates that case is ign - If the parameter value is an array, every element of the array must match an element of the attribute set. -- The ValidateSetAttribute attribute is defined by the [System.Management.Automation.Validatesetattribute](/dotnet/api/System.Management.Automation.ValidateSetAttribute) class. +- The ValidateSetAttribute attribute is defined by the [System.Management.Automation.ValidateSetAttribute](/dotnet/api/System.Management.Automation.ValidateSetAttribute) class. ## See Also -[System.Management.Automation.Validatesetattribute](/dotnet/api/System.Management.Automation.ValidateSetAttribute) +[System.Management.Automation.ValidateSetAttribute](/dotnet/api/System.Management.Automation.ValidateSetAttribute) [Writing a Windows PowerShell Cmdlet](./writing-a-windows-powershell-cmdlet.md) diff --git a/reference/docs-conceptual/developer/cmdlet/windows-powershell-error-records.md b/reference/docs-conceptual/developer/cmdlet/windows-powershell-error-records.md index 4f850b58fb2f..d508bcd76971 100644 --- a/reference/docs-conceptual/developer/cmdlet/windows-powershell-error-records.md +++ b/reference/docs-conceptual/developer/cmdlet/windows-powershell-error-records.md @@ -39,8 +39,8 @@ object. - The target object that was being processed when the error occurred. This might be the input object, or it might be another object that your cmdlet was processing. For example, for the - command `remove-item -recurse c:\somedirectory`, the error might be an instance of a FileInfo - object for "c:\somedirectory\lockedfile". The target object information is optional. + command `Remove-Item -Recurse C:\somedirectory`, the error might be an instance of a FileInfo + object for "C:\somedirectory\lockedfile". The target object information is optional. ## Error Identifier @@ -66,7 +66,7 @@ Use the following guidelines to generate error identifiers when you create error specific identifiers. Often, each code path that calls [System.Management.Automation.Cmdlet.WriteError](/dotnet/api/System.Management.Automation.Cmdlet.WriteError) or - [System.Management.Automation.Cmdlet.Throwterminatingerror*](/dotnet/api/System.Management.Automation.Cmdlet.ThrowTerminatingError) + [System.Management.Automation.Cmdlet.ThrowTerminatingError*](/dotnet/api/System.Management.Automation.Cmdlet.ThrowTerminatingError) has its own identifier. As a rule, define a new identifier when you define a new template string for the error message, and vice-versa. Do not use the error message as an identifier. @@ -104,7 +104,7 @@ category is not a perfect match. The information displayed by Windows PowerShell is referred to as the category-view string and is built from the properties of the -[System.Management.Automation.Errorcategoryinfo](/dotnet/api/System.Management.Automation.ErrorCategoryInfo) +[System.Management.Automation.ErrorCategoryInfo](/dotnet/api/System.Management.Automation.ErrorCategoryInfo) class. (This class is accessed through the error [System.Management.Automation.ErrorRecord.CategoryInfo](/dotnet/api/System.Management.Automation.ErrorRecord.CategoryInfo) property.) @@ -158,7 +158,7 @@ developers. These replacement messages should be written for the cmdlet user. The replacement error message must be added before the [System.Management.Automation.Cmdlet.WriteError](/dotnet/api/System.Management.Automation.Cmdlet.WriteError) or -[System.Management.Automation.Cmdlet.Throwterminatingerror*](/dotnet/api/System.Management.Automation.Cmdlet.ThrowTerminatingError) +[System.Management.Automation.Cmdlet.ThrowTerminatingError*](/dotnet/api/System.Management.Automation.Cmdlet.ThrowTerminatingError) methods are called. To add a replacement message, set the [System.Management.Automation.ErrorRecord.ErrorDetails](/dotnet/api/System.Management.Automation.ErrorRecord.ErrorDetails) property of the error record. When this property is set, Windows PowerShell displays the @@ -176,10 +176,10 @@ object can also provide information about what actions are recommended when the When a cmdlet uses [System.Management.Automation.Cmdlet.WriteError](/dotnet/api/System.Management.Automation.Cmdlet.WriteError) or -[System.Management.Automation.Cmdlet.Throwterminatingerror*](/dotnet/api/System.Management.Automation.Cmdlet.ThrowTerminatingError) +[System.Management.Automation.Cmdlet.ThrowTerminatingError*](/dotnet/api/System.Management.Automation.Cmdlet.ThrowTerminatingError) to report an error record, Windows PowerShell automatically adds information that describes the command that was invoked when the error occurred. This information is provided by a -[System.Management.Automation.Invocationinfo](/dotnet/api/System.Management.Automation.InvocationInfo) +[System.Management.Automation.InvocationInfo](/dotnet/api/System.Management.Automation.InvocationInfo) object that contains the name of the cmdlet that was invoked by the command, the command itself, and information about the pipeline or script. This property is read-only. @@ -187,17 +187,17 @@ information about the pipeline or script. This property is read-only. [System.Management.Automation.Cmdlet.WriteError](/dotnet/api/System.Management.Automation.Cmdlet.WriteError) -[System.Management.Automation.Cmdlet.Throwterminatingerror*](/dotnet/api/System.Management.Automation.Cmdlet.ThrowTerminatingError) +[System.Management.Automation.Cmdlet.ThrowTerminatingError*](/dotnet/api/System.Management.Automation.Cmdlet.ThrowTerminatingError) [System.Management.Automation.ErrorCategory](/dotnet/api/System.Management.Automation.ErrorCategory) -[System.Management.Automation.Errorcategoryinfo](/dotnet/api/System.Management.Automation.ErrorCategoryInfo) +[System.Management.Automation.ErrorCategoryInfo](/dotnet/api/System.Management.Automation.ErrorCategoryInfo) [System.Management.Automation.ErrorRecord](/dotnet/api/System.Management.Automation.ErrorRecord) [System.Management.Automation.ErrorDetails](/dotnet/api/System.Management.Automation.ErrorDetails) -[System.Management.Automation.Invocationinfo](/dotnet/api/System.Management.Automation.InvocationInfo) +[System.Management.Automation.InvocationInfo](/dotnet/api/System.Management.Automation.InvocationInfo) [Windows PowerShell Error Reporting](./error-reporting-concepts.md) diff --git a/reference/docs-conceptual/developer/cmdlet/windows-powershell-session-state.md b/reference/docs-conceptual/developer/cmdlet/windows-powershell-session-state.md index 01de4687579b..69e7d27c48ea 100644 --- a/reference/docs-conceptual/developer/cmdlet/windows-powershell-session-state.md +++ b/reference/docs-conceptual/developer/cmdlet/windows-powershell-session-state.md @@ -32,13 +32,13 @@ Session-state data is stored by the current instance of the execution engine wit ## Accessing Session-State Data Within Cmdlets -Cmdlets can access session-state data either indirectly through the [System.Management.Automation.PSCmdlet.Sessionstate*](/dotnet/api/System.Management.Automation.PSCmdlet.SessionState) property of the cmdlet class or directly through the [System.Management.Automation.Sessionstate](/dotnet/api/System.Management.Automation.SessionState) class. The [System.Management.Automation.Sessionstate](/dotnet/api/System.Management.Automation.SessionState) class provides properties that can be used to investigate different types of session-state data. +Cmdlets can access session-state data either indirectly through the [System.Management.Automation.PSCmdlet.SessionState*](/dotnet/api/System.Management.Automation.PSCmdlet.SessionState) property of the cmdlet class or directly through the [System.Management.Automation.SessionState](/dotnet/api/System.Management.Automation.SessionState) class. The [System.Management.Automation.SessionState](/dotnet/api/System.Management.Automation.SessionState) class provides properties that can be used to investigate different types of session-state data. ## See Also -[System.Management.Automation.PSCmdlet.Sessionstate](/dotnet/api/System.Management.Automation.PSCmdlet.SessionState) +[System.Management.Automation.PSCmdlet.SessionState](/dotnet/api/System.Management.Automation.PSCmdlet.SessionState) -[System.Management.Automation.Sessionstate?Displayproperty=Fullname](/dotnet/api/System.Management.Automation.SessionState) +[System.Management.Automation.SessionState](/dotnet/api/System.Management.Automation.SessionState) [Windows PowerShell Cmdlets](./cmdlet-overview.md) diff --git a/reference/docs-conceptual/developer/ets/errors-exceptions.md b/reference/docs-conceptual/developer/ets/errors-exceptions.md index 2c1b27aca600..3e02008389b9 100644 --- a/reference/docs-conceptual/developer/ets/errors-exceptions.md +++ b/reference/docs-conceptual/developer/ets/errors-exceptions.md @@ -14,7 +14,7 @@ Errors can occur in ETS during the initialization of type data and when accessin With one exception, when casting, all exceptions thrown from ETS during runtime are either an **ExtendedTypeSystemException** exception or an exception derived from the **ExtendedTypeSystemException** class. This allows script developers to trap these exceptions using -the `Trap` statement in their script. +the `trap` statement in their script. ## Errors getting member values diff --git a/reference/docs-conceptual/developer/ets/overview.md b/reference/docs-conceptual/developer/ets/overview.md index 49f5655d8a68..651b4edd4f8a 100644 --- a/reference/docs-conceptual/developer/ets/overview.md +++ b/reference/docs-conceptual/developer/ets/overview.md @@ -146,7 +146,7 @@ PowerShell, a **PSObject** may also define extended members that extend the orig with additional information that is useful in the scripting environment. For example, all the core cmdlets provided by PowerShell, such as the Get-Content and Set-Content -cmdlets, take a path parameter. To ensure that these cmdlets, and others, can work against objects +cmdlets, take a Path parameter. To ensure that these cmdlets, and others, can work against objects of different types, a Path member can be added to those objects so that they all state their information in a common way. This extended Path member ensures that the cmdlets can work against all those types even though there base class might not have a Path member. diff --git a/reference/docs-conceptual/developer/format/creating-a-list-view.md b/reference/docs-conceptual/developer/format/creating-a-list-view.md index eb5ce1f6e14d..bdc06fc0eb10 100644 --- a/reference/docs-conceptual/developer/format/creating-a-list-view.md +++ b/reference/docs-conceptual/developer/format/creating-a-list-view.md @@ -10,10 +10,10 @@ A list view displays data in a single column (in sequential order). The data dis ## A List View Display -The following output shows how Windows PowerShell displays the properties of [System.Serviceprocess.Servicecontroller?Displayproperty=Fullname](/dotnet/api/System.ServiceProcess.ServiceController) objects that are returned by the [Get-Service](/powershell/module/microsoft.powershell.management/get-service) cmdlet. In this example, three objects were returned, with each object separated from the preceding object by a blank line. +The following output shows how Windows PowerShell displays the properties of [System.ServiceProcess.ServiceController](/dotnet/api/System.ServiceProcess.ServiceController) objects that are returned by the [Get-Service](/powershell/module/microsoft.powershell.management/get-service) cmdlet. In this example, three objects were returned, with each object separated from the preceding object by a blank line. ```powershell -Get-Service | format-list +Get-Service | Format-List ``` ```output @@ -51,7 +51,7 @@ ServiceType : Win32OwnProcess ## Defining the List View -The following XML shows the list view schema for displaying several properties of the [System.Serviceprocess.Servicecontroller?Displayproperty=Fullname](/dotnet/api/System.ServiceProcess.ServiceController) object. You must specify each property that you want displayed in the list view. +The following XML shows the list view schema for displaying several properties of the [System.ServiceProcess.ServiceController](/dotnet/api/System.ServiceProcess.ServiceController) object. You must specify each property that you want displayed in the list view. ```xml @@ -100,7 +100,7 @@ For an example of a complete formatting file that defines a simple list view, se ## Providing Definitions for Your List View -List views can provide one or more definitions by using the child elements of the [ListControl](./listcontrol-element-format.md) element. Typically, a view will have only one definition. In the following example, the view provides a single definition that displays several properties of the [System.Diagnostics.Process?Displayproperty=Fullname](/dotnet/api/System.Diagnostics.Process) object. A list view can display the value of a property or the value of a script (not shown in the example). +List views can provide one or more definitions by using the child elements of the [ListControl](./listcontrol-element-format.md) element. Typically, a view will have only one definition. In the following example, the view provides a single definition that displays several properties of the [System.Diagnostics.Process](/dotnet/api/System.Diagnostics.Process) object. A list view can display the value of a property or the value of a script (not shown in the example). ```xml @@ -216,7 +216,7 @@ The following XML elements can be used to specify the objects that are used by a ## Displaying Groups of Objects in a List View -You can separate the objects that are displayed by the list view into groups. This does not mean that you define a group, only that Windows PowerShell starts a new group whenever the value of a specific property or script changes. In the following example, a new group is started whenever the value of the [System.Serviceprocess.Servicecontroller.Servicetype](/dotnet/api/System.ServiceProcess.ServiceController.ServiceType) property changes. +You can separate the objects that are displayed by the list view into groups. This does not mean that you define a group, only that Windows PowerShell starts a new group whenever the value of a specific property or script changes. In the following example, a new group is started whenever the value of the [System.ServiceProcess.ServiceController.ServiceType](/dotnet/api/System.ServiceProcess.ServiceController.ServiceType) property changes. ```xml @@ -268,7 +268,7 @@ In the following example, the `ToString` method is called to format the value of ```xml - [String]::Format("{0,-10} {1,-8}", $_.LastWriteTime.ToString("d"), $_.LastWriteTime.ToString("t")) + [string]::Format("{0,-10} {1,-8}", $_.LastWriteTime.ToString("d"), $_.LastWriteTime.ToString("t")) ``` diff --git a/reference/docs-conceptual/developer/format/creating-a-table-view.md b/reference/docs-conceptual/developer/format/creating-a-table-view.md index 35b78b66042b..e0425a24acab 100644 --- a/reference/docs-conceptual/developer/format/creating-a-table-view.md +++ b/reference/docs-conceptual/developer/format/creating-a-table-view.md @@ -10,7 +10,7 @@ A table view displays data in one or more columns. Each row in the table represe ## A Table View Display -The following example shows how Windows PowerShell displays the [System.Serviceprocess.Servicecontroller](/dotnet/api/System.ServiceProcess.ServiceController) object that is returned by the [Get-Service](/powershell/module/microsoft.powershell.management/get-service) cmdlet. For this object, Windows PowerShell has defined a table view that displays the `Status` property, the `Name` property (this property is an alias property for the `ServiceName` property), and the `DisplayName` property. Each row in the table represents an object returned by the cmdlet. +The following example shows how Windows PowerShell displays the [System.ServiceProcess.ServiceController](/dotnet/api/System.ServiceProcess.ServiceController) object that is returned by the [Get-Service](/powershell/module/microsoft.powershell.management/get-service) cmdlet. For this object, Windows PowerShell has defined a table view that displays the `Status` property, the `Name` property (this property is an alias property for the `ServiceName` property), and the `DisplayName` property. Each row in the table represents an object returned by the cmdlet. ```output Status Name DisplayName @@ -23,7 +23,7 @@ Running Appinfo Application Information ## Defining the Table View -The following XML shows the table view schema for displaying the [System.Serviceprocess.Servicecontroller?Displayproperty=Fullname](/dotnet/api/System.ServiceProcess.ServiceController) object. You must specify each property that you want displayed in the table view. +The following XML shows the table view schema for displaying the [System.ServiceProcess.ServiceController](/dotnet/api/System.ServiceProcess.ServiceController) object. You must specify each property that you want displayed in the table view. ```xml @@ -96,7 +96,7 @@ The following XML elements are used to define a list view: Table views can provide one or more definitions that specify what data is displayed in the rows of the table by using the child elements of the [TableRowEntries](./tablerowentries-element-for-tablecontrol-format.md) element. Notice that you can specify multiple definitions for the rows of the table, but the headers for the rows remains the same, regardless of what row definition is used. Typically, a table will have only one definition. -In the following example, the view provides a single definition that displays the values of several properties of the [System.Diagnostics.Process?Displayproperty=Fullname](/dotnet/api/System.Diagnostics.Process) object. A table view can display the value of a property or the value of a script (not shown in the example) in its rows. +In the following example, the view provides a single definition that displays the values of several properties of the [System.Diagnostics.Process](/dotnet/api/System.Diagnostics.Process) object. A table view can display the value of a property or the value of a script (not shown in the example) in its rows. ```xml @@ -226,7 +226,7 @@ In the following example, the `ToString` method is called to format the value of ```xml - [String]::Format("{0,-10} {1,-8}", $_.LastWriteTime.ToString("d"), $_.LastWriteTime.ToString("t")) + [string]::Format("{0,-10} {1,-8}", $_.LastWriteTime.ToString("d"), $_.LastWriteTime.ToString("t")) ``` diff --git a/reference/docs-conceptual/developer/format/creating-a-wide-view.md b/reference/docs-conceptual/developer/format/creating-a-wide-view.md index f43a5d6c5d43..48fcc9f8f892 100644 --- a/reference/docs-conceptual/developer/format/creating-a-wide-view.md +++ b/reference/docs-conceptual/developer/format/creating-a-wide-view.md @@ -19,7 +19,7 @@ example, the two columns are used to display the name of the process for each re name of the object's property isn't displayed, only the value of the property. ```powershell -Get-Process | format-wide +Get-Process | Format-Wide ``` ```Output @@ -225,7 +225,7 @@ of the wide view: You can separate the objects that are displayed by the wide view into groups. This doesn't mean that you define a group, only that Windows PowerShell starts a new group whenever the value of a specific property or script changes. In the following example, a new group is started whenever the value of -the [System.Serviceprocess.Servicecontroller.Servicetype][34] property changes. +the [System.ServiceProcess.ServiceController.ServiceType][34] property changes. ```xml @@ -283,7 +283,7 @@ formatting parameters, the script can call that method to format the output valu ```xml - [String]::Format("{0,-10} {1,-8}", $_.LastWriteTime.ToString("d"), $_.LastWriteTime.ToString("t")) + [string]::Format("{0,-10} {1,-8}", $_.LastWriteTime.ToString("d"), $_.LastWriteTime.ToString("t")) ``` diff --git a/reference/docs-conceptual/developer/format/creating-custom-controls.md b/reference/docs-conceptual/developer/format/creating-custom-controls.md index 359fea5ccc41..b2ef8e028446 100644 --- a/reference/docs-conceptual/developer/format/creating-custom-controls.md +++ b/reference/docs-conceptual/developer/format/creating-custom-controls.md @@ -26,7 +26,7 @@ The following example shows a custom control that is defined in the Certificates - split-path $_.Path + Split-Path $_.Path diff --git a/reference/docs-conceptual/developer/format/formatstring-element-for-listitem-for-listcontrol-format.md b/reference/docs-conceptual/developer/format/formatstring-element-for-listitem-for-listcontrol-format.md index 0b7bd77393fc..269639909114 100644 --- a/reference/docs-conceptual/developer/format/formatstring-element-for-listitem-for-listcontrol-format.md +++ b/reference/docs-conceptual/developer/format/formatstring-element-for-listitem-for-listcontrol-format.md @@ -48,7 +48,7 @@ None. ## Text Value Specify the pattern that is used to format the data. For example, you can use this pattern to format -the value of any property that is of type [System.Timespan](/dotnet/api/System.TimeSpan): +the value of any property that is of type [System.TimeSpan](/dotnet/api/System.TimeSpan): {0:MMM}{0:dd}{0:HH}:{0:mm}. ## Remarks diff --git a/reference/docs-conceptual/developer/format/formatstring-element-for-tablecolumnitem-for-tablecontrol-format.md b/reference/docs-conceptual/developer/format/formatstring-element-for-tablecolumnitem-for-tablecontrol-format.md index aa2bd1d246a6..2b75875eb98e 100644 --- a/reference/docs-conceptual/developer/format/formatstring-element-for-tablecolumnitem-for-tablecontrol-format.md +++ b/reference/docs-conceptual/developer/format/formatstring-element-for-tablecolumnitem-for-tablecontrol-format.md @@ -48,7 +48,7 @@ None. ## Text Value Specify the pattern that is used to format the data. For example, this pattern can be used to format -the value of any property that is of type [System.Timespan](/dotnet/api/System.TimeSpan): +the value of any property that is of type [System.TimeSpan](/dotnet/api/System.TimeSpan): {0:MMM}{0:dd}{0:HH}:{0:mm}. ## Remarks diff --git a/reference/docs-conceptual/developer/format/formatstring-element-for-wideitem-for-widecontrol-format.md b/reference/docs-conceptual/developer/format/formatstring-element-for-wideitem-for-widecontrol-format.md index c1bb7bef9b01..6e6d0591d511 100644 --- a/reference/docs-conceptual/developer/format/formatstring-element-for-wideitem-for-widecontrol-format.md +++ b/reference/docs-conceptual/developer/format/formatstring-element-for-wideitem-for-widecontrol-format.md @@ -47,7 +47,7 @@ None. ## Text Value Specify the pattern that is used to format the data. For example, you can use this pattern to format -the value of any property that is of type [System.Timespan](/dotnet/api/System.TimeSpan): +the value of any property that is of type [System.TimeSpan](/dotnet/api/System.TimeSpan): {0:MMM}{0:dd}{0:HH}:{0:mm}. ## Remarks diff --git a/reference/docs-conceptual/developer/format/formatting-file-overview.md b/reference/docs-conceptual/developer/format/formatting-file-overview.md index 0879abbd2940..9d0aa92f9b57 100644 --- a/reference/docs-conceptual/developer/format/formatting-file-overview.md +++ b/reference/docs-conceptual/developer/format/formatting-file-overview.md @@ -7,7 +7,7 @@ title: Formatting File Overview # Formatting File Overview The display format for the objects that are returned by commands (cmdlets, functions, and scripts) -are defined by using formatting files (format.ps1xml files). Several of these files are provided by +are defined by using formatting files (`format.ps1xml`). Several of these files are provided by PowerShell to define the display format for those objects returned by PowerShell-provided commands, such as the [System.Diagnostics.Process][12] object returned by the `Get-Process` cmdlet. However, you can also create your own custom formatting files to overwrite the default display formats or you diff --git a/reference/docs-conceptual/developer/format/list-view-basic.md b/reference/docs-conceptual/developer/format/list-view-basic.md index cda4c086ec70..6c46ba49e62f 100644 --- a/reference/docs-conceptual/developer/format/list-view-basic.md +++ b/reference/docs-conceptual/developer/format/list-view-basic.md @@ -6,7 +6,7 @@ title: List View (Basic) --- # List View (Basic) -This example shows how to implement a basic list view that displays the [System.Serviceprocess.Servicecontroller?Displayproperty=Fullname](/dotnet/api/System.ServiceProcess.ServiceController) +This example shows how to implement a basic list view that displays the [System.ServiceProcess.ServiceController](/dotnet/api/System.ServiceProcess.ServiceController) objects returned by the [Get-Service](/powershell/module/microsoft.powershell.management/get-service) cmdlet. For more information about the components of a list view, see [Creating a List View](./creating-a-list-view.md). @@ -18,11 +18,11 @@ cmdlet. For more information about the components of a list view, see [Creating formatting file. 1. Open Windows PowerShell, and run the following command to load the formatting file into the - current session: `Update-formatdata -prependpath PathToFormattingFile`. + current session: `Update-FormatData -PrependPath PathToFormattingFile`. > [!WARNING] > This formatting file defines the display of an object that is already defined by a Windows -> PowerShell formatting file. You must use the `prependPath` parameter when you run the cmdlet, and +> PowerShell formatting file. You must use the `PrependPath` parameter when you run the cmdlet, and > you cannot load this formatting file as a module. ## Demonstrates @@ -45,7 +45,7 @@ This formatting file demonstrates the following XML elements: ## Example -The following XML defines a list view that displays four properties of the [System.Serviceprocess.Servicecontroller?Displayproperty=Fullname](/dotnet/api/System.ServiceProcess.ServiceController) +The following XML defines a list view that displays four properties of the [System.ServiceProcess.ServiceController](/dotnet/api/System.ServiceProcess.ServiceController) object. In each row, the name of the property is displayed followed by the value of the property. ```xml @@ -79,7 +79,7 @@ object. In each row, the name of the property is displayed followed by the value ``` -The following example shows how Windows PowerShell displays the [System.Serviceprocess.Servicecontroller?Displayproperty=Fullname](/dotnet/api/System.ServiceProcess.ServiceController) +The following example shows how Windows PowerShell displays the [System.ServiceProcess.ServiceController](/dotnet/api/System.ServiceProcess.ServiceController) objects after this format file is loaded. ```powershell diff --git a/reference/docs-conceptual/developer/format/listcontrol-element-format.md b/reference/docs-conceptual/developer/format/listcontrol-element-format.md index 15128231ba2d..2509081ef56e 100644 --- a/reference/docs-conceptual/developer/format/listcontrol-element-format.md +++ b/reference/docs-conceptual/developer/format/listcontrol-element-format.md @@ -51,7 +51,7 @@ For more information about creating a list view, see [Creating a List View](./cr ## Example -This example shows a list view for the [System.Serviceprocess.Servicecontroller](/dotnet/api/System.ServiceProcess.ServiceController) +This example shows a list view for the [System.ServiceProcess.ServiceController](/dotnet/api/System.ServiceProcess.ServiceController) object. ``` diff --git a/reference/docs-conceptual/developer/format/listentries-element-for-listcontrol-format.md b/reference/docs-conceptual/developer/format/listentries-element-for-listcontrol-format.md index 96fa101e1fae..7f5a0c6107c3 100644 --- a/reference/docs-conceptual/developer/format/listentries-element-for-listcontrol-format.md +++ b/reference/docs-conceptual/developer/format/listentries-element-for-listcontrol-format.md @@ -51,7 +51,7 @@ For more information about list views, see [List View](./creating-a-list-view.md ## Example -This example shows the XML elements that define the list view for the [System.Serviceprocess.Servicecontroller](/dotnet/api/System.ServiceProcess.ServiceController) +This example shows the XML elements that define the list view for the [System.ServiceProcess.ServiceController](/dotnet/api/System.ServiceProcess.ServiceController) object. ```xml diff --git a/reference/docs-conceptual/developer/format/listentry-element-for-listcontrol-format.md b/reference/docs-conceptual/developer/format/listentry-element-for-listcontrol-format.md index eeb6a9f07986..3743b5b6418f 100644 --- a/reference/docs-conceptual/developer/format/listentry-element-for-listcontrol-format.md +++ b/reference/docs-conceptual/developer/format/listentry-element-for-listcontrol-format.md @@ -53,7 +53,7 @@ more information about list views, see [Creating a List View](./creating-a-list- ## Example -This example shows the XML elements that define the list view for the [System.Serviceprocess.Servicecontroller](/dotnet/api/System.ServiceProcess.ServiceController) +This example shows the XML elements that define the list view for the [System.ServiceProcess.ServiceController](/dotnet/api/System.ServiceProcess.ServiceController) object. ```xml