diff --git a/.github/actions/.pwsh/module/functions/api/Add-PullRequestComment.ps1 b/.github/actions/.pwsh/module/functions/api/Add-PullRequestComment.ps1 index 524d74c2ec18..c558bbfef4ca 100644 --- a/.github/actions/.pwsh/module/functions/api/Add-PullRequestComment.ps1 +++ b/.github/actions/.pwsh/module/functions/api/Add-PullRequestComment.ps1 @@ -16,7 +16,7 @@ .PARAMETER BodyText The raw markdown text to write as a comment on the PR. .PARAMETER BodyFile - The path to the markdown file to write as a comment on the PR. Due to the way GitHub mistreats + The path to the markdown file to write as a comment on the PR. Due to the way GitHub mistreats soft line breaks as hard line breaks in comments (unlike files), the markdown in a body file is converted to HTML when writing the comment. From the user perspective, it's a normal comment. .EXAMPLE diff --git a/.github/actions/.pwsh/module/functions/utility/Add-VersionedContentTable.ps1 b/.github/actions/.pwsh/module/functions/utility/Add-VersionedContentTable.ps1 index a4490a5de261..76bf4ece4afa 100644 --- a/.github/actions/.pwsh/module/functions/utility/Add-VersionedContentTable.ps1 +++ b/.github/actions/.pwsh/module/functions/utility/Add-VersionedContentTable.ps1 @@ -37,9 +37,9 @@ [PSCustomObject]@{ VersionRelativePath = 'foo.md' Versions = @( - @{ Version = '1.1'; ChangeType = 'N/A' } - @{ Version = '1.2'; ChangeType = 'unchanged' } - @{ Version = '1.3'; ChangeType = 'modified' } + @{ Version = '1.1'; ChangeType = 'N/A' } + @{ Version = '1.2'; ChangeType = 'unchanged' } + @{ Version = '1.3'; ChangeType = 'modified' } ) } [PSCustomObject]@{ @@ -56,7 +56,7 @@ $Summary.ToString() ``` - ```output + ```Output | Version-Relative Path | 1.1 | 1.2 | 1.3 | |:-----------------------------|:----------:|:----------:|:----------:| | `foo.md` | N/A | Unchanged | Modified | @@ -70,11 +70,11 @@ - The file `bar/baz.md` was added in all three versions. The second command creates a new **StringBuilder** object to write the table to. - + The third command uses this cmdlet to write a versioned content summary table to `$Summary`. Because neither **RelativePathWidth** nor **VersionWidth** were passed to the cmdlet, it - calculates the required column withs dynamically. - + calculates the required column widths dynamically. + The final command displays the string the third command has built. #> function Add-VersionedContentTable { @@ -99,7 +99,7 @@ function Add-VersionedContentTable { } } process { - #region Column Widths + #region Column Widths if (($RelativePathWidth -eq 0) -and ($VersionWidth -eq 0)) { $RelativePathWidth, $VersionWidth = Get-VersionedContentTableColumnWidth @WidthParams } elseif ($RelativePathWidth -eq 0) { @@ -109,8 +109,8 @@ function Add-VersionedContentTable { $WidthParams.Add('Version', $true) $VersionWidth = Get-VersionedContentTableColumnWidth @WidthParams } - #endregion ColumnWidths - #region Setup the table header + #endregion Column Widths + #region Setup the table header $null = $Summary.Append("|$(' Version-Relative Path'.PadRight($RelativePathWidth))") # Retrieve the list of unique versions $VersionList = $ChangeSet.Versions.Version | Select-Object -Unique diff --git a/.github/actions/.pwsh/module/functions/utility/Format-ConsoleStyle.ps1 b/.github/actions/.pwsh/module/functions/utility/Format-ConsoleStyle.ps1 index ed75538cbcae..49d13a0e114a 100644 --- a/.github/actions/.pwsh/module/functions/utility/Format-ConsoleStyle.ps1 +++ b/.github/actions/.pwsh/module/functions/utility/Format-ConsoleStyle.ps1 @@ -27,7 +27,7 @@ Format-ConsoleStyle -Text 'hooray!' -DefinedStyle Success ``` - The cmdlet returns the string `hooray!` in bright blue and bolded. + The cmdlet returns the string `hooray!` in bright blue and bolded. #> function Format-ConsoleStyle { [CmdletBinding(DefaultParameterSetName='Components')] @@ -67,4 +67,4 @@ function Format-ConsoleStyle { } end {} -} \ No newline at end of file +} diff --git a/.github/actions/.pwsh/module/functions/utility/Format-GHAConsoleText.ps1 b/.github/actions/.pwsh/module/functions/utility/Format-GHAConsoleText.ps1 index 50d9acabf355..37962e6ad960 100644 --- a/.github/actions/.pwsh/module/functions/utility/Format-GHAConsoleText.ps1 +++ b/.github/actions/.pwsh/module/functions/utility/Format-GHAConsoleText.ps1 @@ -22,7 +22,7 @@ Format-GHAConsoleText -Text $Text ``` - ```output + ```Output This is a very long string with multiple paragraphs. It will certainly need to be reflowed in a few different places. It's not always easy to read long lines like this in the console. @@ -95,4 +95,4 @@ function Format-GHAConsoleText { } end {} -} \ No newline at end of file +} diff --git a/.github/actions/.pwsh/module/functions/utility/Get-ActionScriptParameter.ps1 b/.github/actions/.pwsh/module/functions/utility/Get-ActionScriptParameter.ps1 index 49d6820faddc..75cfc9bbf4ec 100644 --- a/.github/actions/.pwsh/module/functions/utility/Get-ActionScriptParameter.ps1 +++ b/.github/actions/.pwsh/module/functions/utility/Get-ActionScriptParameter.ps1 @@ -7,7 +7,7 @@ .PARAMETER ParameterHandler Specify one or more parameter handlers, such as those as kept in an action's `Parameters.psd1` file. Make sure the hashtable in those data files is converted to a **PSCustomObject**. - + Parameter handlers have the following properties: - **Name:** The name of the _input_ parameter to the action. This is @@ -75,7 +75,7 @@ function Get-ActionScriptParameter { process { $Stringified = $ScriptBlock.Ast.EndBlock.Extent.Text?.Trim() # Scriptblocks from data files get wrapped in extra curly braces, preventing them - # from being invokable. Normally just the contents shows up when calling ToString() + # from being invocable. Normally just the contents shows up when calling ToString() # on a scriptblock, so this is one way to tell. if ($Stringified -match '^\{') { $NestedBlock = $ScriptBlock.Ast.FindAll($Predicate, $true) @@ -144,4 +144,4 @@ function Get-ActionScriptParameter { end { $ActionParameters } -} \ No newline at end of file +} diff --git a/.github/actions/.pwsh/module/functions/utility/Get-GHAConsoleError.ps1 b/.github/actions/.pwsh/module/functions/utility/Get-GHAConsoleError.ps1 index c4b88bd391d2..d7fcc0fabf2d 100644 --- a/.github/actions/.pwsh/module/functions/utility/Get-GHAConsoleError.ps1 +++ b/.github/actions/.pwsh/module/functions/utility/Get-GHAConsoleError.ps1 @@ -31,7 +31,7 @@ function Get-GHAConsoleError { [parameter(ValueFromPipeline)] [psobject]$InputObject ) - + begin { $Properties = @( 'FullyQualifiedErrorId' @@ -50,10 +50,10 @@ function Get-GHAConsoleError { 'ScriptStackTrace' ) } - + process { Get-Error @PSBoundParameters | Select-Object -Property $Properties } - + end {} -} \ No newline at end of file +} diff --git a/.github/actions/.pwsh/module/functions/utility/Get-VersionedContentChangeStatus.ps1 b/.github/actions/.pwsh/module/functions/utility/Get-VersionedContentChangeStatus.ps1 index 8ccbf50dbd8b..b60561c65f41 100644 --- a/.github/actions/.pwsh/module/functions/utility/Get-VersionedContentChangeStatus.ps1 +++ b/.github/actions/.pwsh/module/functions/utility/Get-VersionedContentChangeStatus.ps1 @@ -47,7 +47,7 @@ Get-VersionedContentChangeStatus -ChangedContent $Changes | ConvertTo-Json -Depth 3 ``` - ```output + ```Output [ { "VersionRelativePath": "Microsoft.PowerShell.Core/About/about_Pwsh.md", @@ -123,7 +123,7 @@ function Get-VersionedContentChangeStatus { break } } - + if ($AddEntry) { $VersionedContent += [pscustomobject]@{ VersionRelativePath = $VersionRelativePath @@ -191,4 +191,4 @@ function Get-VersionedContentChangeStatus { } end {} -} \ No newline at end of file +} diff --git a/.github/actions/.pwsh/module/functions/utility/Get-VersionedContentTableColumnWidth.ps1 b/.github/actions/.pwsh/module/functions/utility/Get-VersionedContentTableColumnWidth.ps1 index 7ac6d23ac6ca..04deec36f2e8 100644 --- a/.github/actions/.pwsh/module/functions/utility/Get-VersionedContentTableColumnWidth.ps1 +++ b/.github/actions/.pwsh/module/functions/utility/Get-VersionedContentTableColumnWidth.ps1 @@ -41,9 +41,9 @@ [PSCustomObject]@{ VersionRelativePath = 'foo.md' Versions = @( - @{ Version = '1.1'; ChangeType = 'N/A' } - @{ Version = '1.2'; ChangeType = 'unchanged' } - @{ Version = '1.3'; ChangeType = 'modified' } + @{ Version = '1.1'; ChangeType = 'N/A' } + @{ Version = '1.2'; ChangeType = 'unchanged' } + @{ Version = '1.3'; ChangeType = 'modified' } ) } [PSCustomObject]@{ @@ -60,7 +60,7 @@ "Version Column Width: $VersionWidth" ``` - ```output + ```Output Relative Path Column Width: 30 Version Column Width: 12 ``` @@ -83,9 +83,9 @@ [PSCustomObject]@{ VersionRelativePath = 'foo.md' Versions = @( - @{ Version = '1.1'; ChangeType = 'N/A' } - @{ Version = '1.2'; ChangeType = 'unchanged' } - @{ Version = '1.3'; ChangeType = 'modified' } + @{ Version = '1.1'; ChangeType = 'N/A' } + @{ Version = '1.2'; ChangeType = 'unchanged' } + @{ Version = '1.3'; ChangeType = 'modified' } ) } [PSCustomObject]@{ @@ -100,10 +100,10 @@ Get-VersionedContentTableColumnWidth -ChangeSet $ChangeSet -RelativePath -DefaultWidth 5 ``` - ```output + ```Output 14 ``` - + The first command constructs an arbitrary changeset. The second command uses this cmdlet to determine the width of the **RelativePath** column for a @@ -141,7 +141,7 @@ function Get-VersionedContentTableColumnWidth { ) process { - #region RelativePath + #region RelativePath if ($RelativePath -or !$Version) { # Set the default width for RelativePath unless specified by user $RelativePathWidth = ($DefaultWidth -lt 1) ? 30 : $DefaultWidth diff --git a/.github/actions/.pwsh/module/functions/utility/New-CliErrorRecord.ps1 b/.github/actions/.pwsh/module/functions/utility/New-CliErrorRecord.ps1 index 685c375130c6..abdd8ae1d45d 100644 --- a/.github/actions/.pwsh/module/functions/utility/New-CliErrorRecord.ps1 +++ b/.github/actions/.pwsh/module/functions/utility/New-CliErrorRecord.ps1 @@ -16,7 +16,7 @@ record so a user can understand what was called when the command failed. .PARAMETER Intent Specifies what the `gh` command was supposed to do at a high level. This becomes part of the - expection messge. + exception message. .PARAMETER ErrorID Specifies an identifier for the error record. .EXAMPLE @@ -32,10 +32,10 @@ New-CliErrorRecord @ErrorInfo ``` - ```output - Exception : + ```Output + Exception : Type : System.ApplicationException - TargetSite : + TargetSite : Name : ThrowTerminatingError DeclaringType : System.Management.Automation.MshCommandRuntime, System.Management.Automation, Version=7.2.4.500, Culture=neutral, PublicKeyToken=31bf3856ad364e35 MemberType : Method @@ -46,11 +46,11 @@ Source : System.Management.Automation HResult : -2146232832 - StackTrace : + StackTrace : at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord) CategoryInfo : PermissionDenied: (:String) [Test-Authorization.ps1], ApplicationException FullyQualifiedErrorId : GHA.NotPermittedToTarget,Test-Authorization.ps1 - InvocationInfo : + InvocationInfo : MyCommand : Test-Authorization.ps1 ScriptLineNumber : 1 OffsetInLine : 1 @@ -74,7 +74,7 @@ function New-CliErrorRecord { [string]$Intent, [string]$ErrorID ) - + begin { $AcceptableErrors = @( @{ @@ -83,7 +83,7 @@ function New-CliErrorRecord { } ) } - + process { foreach ($AcceptableError in $AcceptableErrors) { if ($ResultString -match $AcceptableError.Pattern) { @@ -104,6 +104,6 @@ function New-CliErrorRecord { $TargetObject ) } - + end {} -} \ No newline at end of file +} diff --git a/.github/actions/.pwsh/module/gha.psd1 b/.github/actions/.pwsh/module/gha.psd1 index f38c0f3ed88c..8d73e878c7a9 100644 --- a/.github/actions/.pwsh/module/gha.psd1 +++ b/.github/actions/.pwsh/module/gha.psd1 @@ -101,4 +101,4 @@ } # End of PSData hashtable } # End of PrivateData hashtable - } +} diff --git a/.github/actions/.pwsh/scripts/Add-Expectations.md b/.github/actions/.pwsh/scripts/Add-Expectations.md index f2c4041a5d14..4d24e4a5266e 100644 --- a/.github/actions/.pwsh/scripts/Add-Expectations.md +++ b/.github/actions/.pwsh/scripts/Add-Expectations.md @@ -8,7 +8,7 @@ Ensures all open community PRs have an expectations comment. ### __AllParameterSets (default) -```syntax +```Syntax .\Add-Expectations.ps1 [-Owner] [-Repo] diff --git a/.github/actions/.pwsh/scripts/Test-Authorization.md b/.github/actions/.pwsh/scripts/Test-Authorization.md index e26e6b92f27b..4b695d076f09 100644 --- a/.github/actions/.pwsh/scripts/Test-Authorization.md +++ b/.github/actions/.pwsh/scripts/Test-Authorization.md @@ -178,4 +178,4 @@ Accept wildcard characters: False The **TargetBranch** and **TargetPath** parameters are for convenience; GitHub repositories do not have a built-in way to define permissions for branches or folders except for branch protection, which isn't enough for this purpose. To ensure this script is effective, use the **branches** -and **paths** settings in the workflow when defining a **pull_request_target** job trigger. \ No newline at end of file +and **paths** settings in the workflow when defining a **pull_request_target** job trigger. diff --git a/.github/actions/.pwsh/scripts/Test-Checklist.md b/.github/actions/.pwsh/scripts/Test-Checklist.md index e7a737a3a290..6ccd15ce530e 100644 --- a/.github/actions/.pwsh/scripts/Test-Checklist.md +++ b/.github/actions/.pwsh/scripts/Test-Checklist.md @@ -8,7 +8,7 @@ Inspects Markdown to find checklist items and their status ### __AllParameterSets (Default) -```syntax +```Syntax .\Test-Checklist.ps1 [-Body] [[-ReferenceUrl] ] diff --git a/.github/actions/.pwsh/scripts/readme.md b/.github/actions/.pwsh/scripts/readme.md index ed24ba06cfeb..e33d77fe3f03 100644 --- a/.github/actions/.pwsh/scripts/readme.md +++ b/.github/actions/.pwsh/scripts/readme.md @@ -1,7 +1,7 @@ # Action Scripts -This folder contains the scripts used by the GitHub Actions (GHA). Each script is used by a different -action: +This folder contains the scripts used by the GitHub Actions (GHA). Each script is used by a +different action: | Script | Action | | :----------------------------------------- | :------------------------------------------------- | diff --git a/.github/actions/reporting/stale-content/v1/Parameters.psd1 b/.github/actions/reporting/stale-content/v1/Parameters.psd1 index fe59d94d820a..56a419e1b539 100644 --- a/.github/actions/reporting/stale-content/v1/Parameters.psd1 +++ b/.github/actions/reporting/stale-content/v1/Parameters.psd1 @@ -105,7 +105,7 @@ } # Because DaysUntilStale and StaleSinceDate belong to different - # parameter sets, remove DaysUntilStale before adding StaleSinceDate. + # parameter sets, remove DaysUntilStale before adding StaleSinceDate. if ($Parameters.ContainsKey('DaysUntilStale')) { $Message = @( 'Specified both days_until_stale and stale_since_date parameters;' @@ -133,7 +133,7 @@ } Process = { param($Parameters, $Value, $ErrorTarget) - + if ([string]::IsNullOrEmpty($Value)) { return $Parameters } @@ -142,7 +142,7 @@ $Message = @( 'Specified both export_as_csv and upload_artifact parameters;' 'upload_artifact implies export_as_csv, so you do not need to' - 'specify both. The stale content report willbe exported as a' + 'specify both. The stale content report will be exported as a' 'CSV and uploaded as an artifact in this action.' ) -join ' ' Write-Warning $Message @@ -183,7 +183,7 @@ $Message = @( 'Specified both export_as_csv and upload_artifact parameters;' 'upload_artifact implies export_as_csv, so you do not need to' - 'specify both. The stale content report willbe exported as a' + 'specify both. The stale content report will be exported as a' 'CSV and uploaded as an artifact in this action.' ) -join ' ' Write-Warning $Message @@ -241,4 +241,4 @@ } } ) -} \ No newline at end of file +} diff --git a/.github/actions/verification/authorization/v1/action.yml b/.github/actions/verification/authorization/v1/action.yml index da3cb149b2e4..fee05609d9bd 100644 --- a/.github/actions/verification/authorization/v1/action.yml +++ b/.github/actions/verification/authorization/v1/action.yml @@ -8,7 +8,7 @@ inputs: description: | The permissions a user requires to perform a given task. Must be a comma-separated string of valid permissions. Valid permissions are (case-insensitive): - + - `Admin` - `Maintain` - `Pull` @@ -38,7 +38,7 @@ inputs: `pull_request` or `pull_request_target` trigger. You can use those settings together. For more information, see the documentation for the [branches][syntax-docs-branches] and [paths][syntax-docs-paths] settings for workflows in GitHub's documentation. - + To specify multiple branches, separate each branch by a comma and/or newline, like `branch: live, production`. To specify a filepath, specify one or more path separated by a comma and/or a newline, like `path: foo/**/*.md, bar/*.json`. @@ -80,7 +80,7 @@ runs: steps: - shell: pwsh env: - INPUT_REPOSITORY: ${{ inputs.repository }} + INPUT_REPOSITORY: ${{ inputs.repository }} INPUT_PERMISSIONS: ${{ inputs.permissions }} INPUT_TARGET: ${{ inputs.target }} INPUT_USER: ${{ inputs.user }} @@ -99,7 +99,7 @@ runs: $ActionRootPath = Split-Path -Parent -Path $ActionRootPath } "Action Root Path: $ActionRootPath" - + $JoinPathParams = @{ Path = $ActionRootPath ChildPath = '.pwsh' diff --git a/.github/actions/verification/checklist/v1/action.yml b/.github/actions/verification/checklist/v1/action.yml index dadb2a3d1beb..151acc589aef 100644 --- a/.github/actions/verification/checklist/v1/action.yml +++ b/.github/actions/verification/checklist/v1/action.yml @@ -58,7 +58,7 @@ runs: - shell: pwsh env: INPUT_REFERENCE_URL: ${{ inputs.reference_url }} - INPUT_BODY: ${{ inputs.body }} + INPUT_BODY: ${{ inputs.body }} run: | Write-Output "::group::Generic Setup" $ActionPath = Resolve-Path '${{ github.action_path }}' | Select-Object -ExpandProperty Path @@ -73,7 +73,7 @@ runs: $ActionRootPath = Split-Path -Parent -Path $ActionRootPath } "Action Root Path: $ActionRootPath" - + $JoinPathParams = @{ Path = $ActionRootPath ChildPath = '.pwsh' @@ -96,7 +96,7 @@ runs: Write-Output "::group::Parameter Validation" $Parameters = Get-ActionScriptParameter -ParameterHandler $ParameterHandlers Write-Output "::endgroup::" - + Write-Output "::group::Verify Checklist" . $ScriptPath @Parameters Write-Output "::endgroup::" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 88fc0a1d6e73..866e2906df7a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,4 +3,4 @@ Thank you for your interest in contributing to quality documentations. As an open source project, we welcome input and updates from the community. -Please see our Contributor's Guide at +Please see our Contributor's Guide at [https://aka.ms/PSDocsContributor](https://aka.ms/PSDocsContributor) diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/About.md b/reference/5.1/Microsoft.PowerShell.Core/About/About.md index 8258ca1cefb7..c9bc27a45a8e 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/About.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/About.md @@ -2,7 +2,7 @@ description: About topics cover a range of concepts about PowerShell. Help Version: 6.0 Locale: en-US -ms.date: 11/06/2024 +ms.date: 01/14/2025 title: About topics --- # About topics @@ -23,7 +23,8 @@ Describes how to use alternate names for cmdlets and commands in PowerShell. ### [about_ANSI_Terminals](about_ANSI_Terminals.md) -Describes the support available for ANSI escape sequences in Windows PowerShell. +Describes the support available for ANSI escape sequences in Windows +PowerShell. ### [about_Arithmetic_Operators](about_Arithmetic_Operators.md) @@ -31,7 +32,8 @@ Describes the operators that perform arithmetic in PowerShell. ### [about_Arrays](about_Arrays.md) -Describes arrays, which are data structures designed to store collections of items. +Describes arrays, which are data structures designed to store collections of +items. ### [about_Assignment_Operators](about_Assignment_Operators.md) @@ -39,8 +41,8 @@ Describes how to use operators to assign values to variables. ### [about_Automatic_Variables](about_Automatic_Variables.md) -Describes variables that store state information for PowerShell. These variables are created and -maintained by PowerShell. +Describes variables that store state information for PowerShell. These +variables are created and maintained by PowerShell. ### [about_Booleans](about_Booleans.md) @@ -48,7 +50,8 @@ Describes how boolean expressions are evaluated. ### [about_Break](about_Break.md) -Describes the `break` statement, which provides a way to exit the current control block. +Describes the `break` statement, which provides a way to exit the current +control block. ### [about_Built-in_Functions](about_Built-in_Functions.md) @@ -56,8 +59,8 @@ Describes the built-in functions in PowerShell. ### [about_Calculated_Properties](about_Calculated_Properties.md) -PowerShell provides the ability to dynamically add new properties and alter the formatting of -objects output to the pipeline. +PowerShell provides the ability to dynamically add new properties and alter the +formatting of objects output to the pipeline. ### [about_Case-Sensitivity](about_Case-Sensitivity.md) @@ -65,11 +68,13 @@ PowerShell is as case-insensitive as possible while preserving case. ### [about_Character_Encoding](about_Character_Encoding.md) -Describes how PowerShell uses character encoding for input and output of string data. +Describes how PowerShell uses character encoding for input and output of string +data. ### [about_CimSession](about_CimSession.md) -Describes a **CimSession** object and the difference between CIM sessions and PowerShell sessions. +Describes a **CimSession** object and the difference between CIM sessions and +PowerShell sessions. ### [about_Classes](about_Classes.md) @@ -99,6 +104,10 @@ Describes how PowerShell determines which command to run. Describes the syntax diagrams that are used in PowerShell. +### [about_Comments](about_Comments.md) + +Describes how to use PowerShell comments and lists special use cases. + ### [about_Comment_Based_Help](about_Comment_Based_Help.md) Describes how to write comment-based help topics for functions and scripts. @@ -109,13 +118,13 @@ Describes the parameters that can be used with any cmdlet. ### [about_Comparison_Operators](about_Comparison_Operators.md) -The comparison operators in PowerShell can either compare two values or filter elements of a -collection against an input value. +The comparison operators in PowerShell can either compare two values or filter +elements of a collection against an input value. ### [about_Continue](about_Continue.md) -Describes how the `continue` statement immediately returns the program flow to the top of a program -loop, a `switch` statement, or a `trap` statement. +Describes how the `continue` statement immediately returns the program flow to +the top of a program loop, a `switch` statement, or a `trap` statement. ### [about_Core_Commands](about_Core_Commands.md) @@ -127,7 +136,8 @@ PowerShell data files are used to store arbitrary data using PowerShell syntax. ### [about_Data_Sections](about_Data_Sections.md) -Explains Data sections, which isolate text strings and other read-only data from script logic. +Explains Data sections, which isolate text strings and other read-only data +from script logic. ### [about_Debuggers](about_Debuggers.md) @@ -139,12 +149,14 @@ Provides a brief introduction to the PowerShell Desired State Configuration (DSC ### [about_Do](about_Do.md) -Runs a statement list one or more times, subject to a `While` or `Until` condition. +Runs a statement list one or more times, subject to a `While` or `Until` +condition. ### [about_Enum](about_Enum.md) -The `enum` statement is used to declare an enumeration. An enumeration is a distinct type that -consists of a set of named labels called the enumerator list. +The `enum` statement is used to declare an enumeration. An enumeration is a +distinct type that consists of a set of named labels called the enumerator +list. ### [about_Environment_Provider](about_Environment_Provider.md) @@ -168,16 +180,18 @@ Provides access to files and directories. ### [about_For](about_For.md) -Describes a language command you can use to run statements based on a conditional test. +Describes a language command you can use to run statements based on a +conditional test. ### [about_Foreach](about_Foreach.md) -Describes a language command you can use to traverse all the items in a collection of items. +Describes a language command you can use to traverse all the items in a +collection of items. ### [about_Format.ps1xml](about_Format.ps1xml.md) -The `Format.ps1xml` files in PowerShell define the default display of objects in the PowerShell -console. +The `Format.ps1xml` files in PowerShell define the default display of objects +in the PowerShell console. ### [about_Function_Provider](about_Function_Provider.md) @@ -185,8 +199,8 @@ Provides access to the functions defined in PowerShell. ### [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) -Describes how functions that specify the `CmdletBinding` attribute can use the methods and -properties that are available to compiled cmdlets. +Describes how functions that specify the `CmdletBinding` attribute can use the +methods and properties that are available to compiled cmdlets. ### [about_Functions_Advanced_Parameters](about_Functions_Advanced_Parameters.md) @@ -198,8 +212,8 @@ Introduces advanced functions that are a way to create cmdlets using scripts. ### [about_Functions_Argument_Completion](about_Functions_Argument_Completion.md) -Argument completion is a feature of PowerShell that provide hints, enables discovery, and speeds up -input entry of argument values. +Argument completion is a feature of PowerShell that provide hints, enables +discovery, and speeds up input entry of argument values. ### [about_Functions_CmdletBindingAttribute](about_Functions_CmdletBindingAttribute.md) @@ -215,7 +229,7 @@ Describes how to create and use functions in PowerShell. ### [about_Group_Policy_Settings](about_Group_Policy_Settings.md) -Describes the Group Policy settings for Windows PowerShell +Describes the Group Policy settings for PowerShell ### [about_Hash_Tables](about_Hash_Tables.md) @@ -223,7 +237,8 @@ Describes how to create, use, and sort hashtables in PowerShell. ### [about_Hidden](about_Hidden.md) -Describes the `hidden` keyword, which hides class members from default `Get-Member` results. +Describes the `hidden` keyword, which hides class members from default +`Get-Member` results. ### [about_History](about_History.md) @@ -231,13 +246,13 @@ Describes how to get and run commands in the command history. ### [about_If](about_If.md) -Describes a language command you can use to run statement lists based on the results of one or more -conditional tests. +Describes a language command you can use to run statement lists based on the +results of one or more conditional tests. ### [about_Intrinsic_Members](about_Intrinsic_Members.md) -Provides information about PowerShell's intrinsic members that are available to all PowerShell -objects. +Provides information about PowerShell's intrinsic members that are available to +all PowerShell objects. ### [about_Job_Details](about_Job_Details.md) @@ -245,12 +260,13 @@ Provides details about background jobs on local and remote computers. ### [about_Jobs](about_Jobs.md) -Provides information about how PowerShell background jobs run a command or expression in the -background without interacting with the current session. +Provides information about how PowerShell background jobs run a command or +expression in the background without interacting with the current session. ### [about_Join](about_Join.md) -Describes how the join operator (-join) combines multiple strings into a single string. +Describes how the join operator (-join) combines multiple strings into a single +string. ### [about_Language_Keywords](about_Language_Keywords.md) @@ -278,7 +294,8 @@ Describes the operators that connect statements in PowerShell. ### [about_Member-Access_Enumeration](about_Member-Access_Enumeration.md) -Describes the automatic enumeration of list collection items when using the member-access operator. +Describes the automatic enumeration of list collection items when using the +member-access operator. ### [about_Methods](about_Methods.md) @@ -320,13 +337,20 @@ Explains the availability and purpose of output streams in PowerShell. PackageManagement is an aggregator for software package managers. +### [about_Parameter_Binding](about_Parameter_Binding.md) + +Parameter binding is the process that PowerShell uses to determine which +parameter set is being used and to associate (bind) values to the parameters of +a command. + ### [about_Parameter_Sets](about_Parameter_Sets.md) Describes how to define and use parameter sets in advanced functions. ### [about_Parameters_Default_Values](about_Parameters_Default_Values.md) -Describes how to set custom default values for cmdlet parameters and advanced functions. +Describes how to set custom default values for cmdlet parameters and advanced +functions. ### [about_Parameters](about_Parameters.md) @@ -362,7 +386,8 @@ Describes how to create and use a PowerShell profile. ### [about_Prompts](about_Prompts.md) -Describes the `Prompt` function and demonstrates how to create a custom `Prompt` function. +Describes the `Prompt` function and demonstrates how to create a custom +`Prompt` function. ### [about_Properties](about_Properties.md) @@ -370,16 +395,18 @@ Describes how to use object properties in PowerShell. ### [about_Providers](about_Providers.md) -PowerShell providers provide access to data and components, presented in a consistent format that -resembles a file system drive. +PowerShell providers provide access to data and components, presented in a +consistent format that resembles a file system drive. ### [about_PSConsoleHostReadLine](about_PSConsoleHostReadLine.md) -Explains how to create a customize how PowerShell reads input at the console prompt. +Explains how to create a customize how PowerShell reads input at the console +prompt. ### [about_PSCustomObject](about_PSCustomObject.md) -Explains the differences between the `[psobject]` and `[pscustomobject]` type accelerators. +Explains the differences between the `[psobject]` and `[pscustomobject]` type +accelerators. ### [about_PSItem](about_PSItem.md) @@ -387,16 +414,18 @@ The automatic variable that contains the current object in the pipeline object. ### [about_PSModulePath](about_PSModulePath.md) -This article the purpose and usage of the `$env:PSModulePath` environment variable. +This article the purpose and usage of the `$env:PSModulePath` environment +variable. ### [about_PSSession_Details](about_PSSession_Details.md) -Provides detailed information about PowerShell sessions and the role they play in remote commands. +Provides detailed information about PowerShell sessions and the role they play +in remote commands. ### [about_PSSessions](about_PSSessions.md) -Describes PowerShell sessions (PSSessions) and explains how to establish a persistent connection to -a remote computer. +Describes PowerShell sessions (PSSessions) and explains how to establish a +persistent connection to a remote computer. ### [about_PSSnapins](about_PSSnapins.md) @@ -412,8 +441,9 @@ Explains how to redirect output from PowerShell to text files. ### [about_Ref](about_Ref.md) -Describes how to create and use a reference type variable. You can use reference type variables to -permit a function to change the value of a variable that is passed to it. +Describes how to create and use a reference type variable. You can use +reference type variables to permit a function to change the value of a variable +that is passed to it. ### [about_Registry_Provider](about_Registry_Provider.md) @@ -437,8 +467,8 @@ Describes how to interpret and format the output of remote commands. ### [about_Remote_Requirements](about_Remote_Requirements.md) -Describes the system requirements and configuration requirements for running remote commands in -PowerShell. +Describes the system requirements and configuration requirements for running +remote commands in PowerShell. ### [about_Remote_Troubleshooting](about_Remote_Troubleshooting.md) @@ -458,8 +488,8 @@ Prevents a script from running without the required elements. ### [about_Reserved_Words](about_Reserved_Words.md) -Lists the reserved words that cannot be used as identifiers because they have a special meaning in -PowerShell. +Lists the reserved words that cannot be used as identifiers because they have a +special meaning in PowerShell. ### [about_Return](about_Return.md) @@ -467,20 +497,24 @@ Exits the current scope, which can be a function, script, or script block. ### [about_Run_With_PowerShell](about_Run_With_PowerShell.md) -Explains how to use the "Run with PowerShell" feature to run a script from a file system drive. +Explains how to use the "Run with PowerShell" feature to run a script from a +file system drive. ### [about_Scopes](about_Scopes.md) -Explains the concept of scope in PowerShell and shows how to set and change the scope of elements. +Explains the concept of scope in PowerShell and shows how to set and change the +scope of elements. ### [about_Script_Blocks](about_Script_Blocks.md) -Defines what a script block is and explains how to use script blocks in the PowerShell programming language. +Defines what a script block is and explains how to use script blocks in the +PowerShell programming language. ### [about_Script_Internationalization](about_Script_Internationalization.md) -Describes the script internationalization features that make it easy for scripts to display messages -and instructions to users in their user interface (UI) language. +Describes the script internationalization features that make it easy for +scripts to display messages and instructions to users in their user interface +(UI) language. ### [about_Scripts](about_Scripts.md) @@ -488,26 +522,29 @@ Describes how to run and write scripts in PowerShell. ### [about_Session_Configuration_Files](about_Session_Configuration_Files.md) -Describes session configuration files, which are used in a session configuration (also known as an -"endpoint") to define the environment of sessions that use the session configuration. +Describes session configuration files, which are used in a session +configuration (also known as an "endpoint") to define the environment of +sessions that use the session configuration. ### [about_Session_Configurations](about_Session_Configurations.md) -Describes session configurations, which determine the users who can connect to the computer remotely -and the commands they can run. +Describes session configurations, which determine the users who can connect to +the computer remotely and the commands they can run. ### [about_Signing](about_Signing.md) -Explains how to sign scripts so that they comply with the PowerShell execution policies. +Explains how to sign scripts so that they comply with the PowerShell execution +policies. ### [about_Simplified_Syntax](about_Simplified_Syntax.md) -Describes easier, more natural-language ways of scripting filters for collections of objects. +Describes easier, more natural-language ways of scripting filters for +collections of objects. ### [about_Special_Characters](about_Special_Characters.md) -Describes the special character sequences that control how PowerShell interprets the next characters -in the sequence. +Describes the special character sequences that control how PowerShell +interprets the next characters in the sequence. ### [about_Splatting](about_Splatting.md) @@ -515,7 +552,8 @@ Describes how to use splatting to pass parameters to commands in PowerShell. ### [about_Split](about_Split.md) -Explains how to use the Split operator to split one or more strings into substrings. +Explains how to use the Split operator to split one or more strings into +substrings. ### [about_Switch](about_Switch.md) @@ -523,8 +561,8 @@ Explains how to use a switch to handle multiple `if` statements. ### [about_Tab_Expansion](about_Tab_Expansion.md) -PowerShell provides completions on input to provide hints, enable discovery, and speed up input -entry by pressing the Tab key. +PowerShell provides completions on input to provide hints, enable discovery, +and speed up input entry by pressing the Tab key. ### [about_Throw](about_Throw.md) @@ -540,19 +578,26 @@ Describes a keyword that handles a terminating error. ### [about_Try_Catch_Finally](about_Try_Catch_Finally.md) -Describes how to use the `try`, `catch`, and `finally` blocks to handle terminating errors. +Describes how to use the `try`, `catch`, and `finally` blocks to handle +terminating errors. ### [about_Type_Accelerators](about_Type_Accelerators.md) Describes the Type accelerators available for .NET framework classes +### [about_Type_Conversion](about_Type_Conversion.md) + +PowerShell has a flexible type system that makes it easier to use. However, you +must understand how it works to avoid unexpected results. + ### [about_Type_Operators](about_Type_Operators.md) Describes the operators that work with Microsoft .NET types. ### [about_Types.ps1xml](about_Types.ps1xml.md) -Explains how to use `Types.ps1xml` files to extend the types of objects that are used in PowerShell. +Explains how to use `Types.ps1xml` files to extend the types of objects that +are used in PowerShell. ### [about_Updatable_Help](about_Updatable_Help.md) @@ -572,8 +617,8 @@ Describes how variables store values that can be used in PowerShell. ### [about_While](about_While.md) -Describes a language statement that you can use to run a command block based on the results of a -conditional test. +Describes a language statement that you can use to run a command block based on +the results of a conditional test. ### [about_Wildcards](about_Wildcards.md) diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/About.md b/reference/7.4/Microsoft.PowerShell.Core/About/About.md index 4cc9179b9b55..62b3763bc7ac 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/About.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/About.md @@ -2,7 +2,7 @@ description: About topics cover a range of concepts about PowerShell. Help Version: 7.4.0.0 Locale: en-US -ms.date: 11/06/2024 +ms.date: 01/14/2025 title: About topics --- # About topics @@ -23,7 +23,8 @@ Describes how to use alternate names for cmdlets and commands in PowerShell. ### [about_ANSI_Terminals](about_ANSI_Terminals.md) -Describes the support available for ANSI escape sequences in Windows PowerShell. +Describes the support available for ANSI escape sequences in Windows +PowerShell. ### [about_Arithmetic_Operators](about_Arithmetic_Operators.md) @@ -31,7 +32,8 @@ Describes the operators that perform arithmetic in PowerShell. ### [about_Arrays](about_Arrays.md) -Describes arrays, which are data structures designed to store collections of items. +Describes arrays, which are data structures designed to store collections of +items. ### [about_Assignment_Operators](about_Assignment_Operators.md) @@ -39,8 +41,8 @@ Describes how to use operators to assign values to variables. ### [about_Automatic_Variables](about_Automatic_Variables.md) -Describes variables that store state information for PowerShell. These variables are created and -maintained by PowerShell. +Describes variables that store state information for PowerShell. These +variables are created and maintained by PowerShell. ### [about_Booleans](about_Booleans.md) @@ -48,7 +50,8 @@ Describes how boolean expressions are evaluated. ### [about_Break](about_Break.md) -Describes the `break` statement, which provides a way to exit the current control block. +Describes the `break` statement, which provides a way to exit the current +control block. ### [about_Built-in_Functions](about_Built-in_Functions.md) @@ -56,13 +59,13 @@ Describes the built-in functions in PowerShell. ### [about_Calculated_Properties](about_Calculated_Properties.md) -PowerShell provides the ability to dynamically add new properties and alter the formatting of -objects output to the pipeline. +PowerShell provides the ability to dynamically add new properties and alter the +formatting of objects output to the pipeline. ### [about_Calling_Generic_Methods](about_Calling_Generic_Methods.md) -Generics let you tailor a method, class, structure, or interface to the precise data type it acts -upon. +Generics let you tailor a method, class, structure, or interface to the precise +data type it acts upon. ### [about_Case-Sensitivity](about_Case-Sensitivity.md) @@ -70,11 +73,13 @@ PowerShell is as case-insensitive as possible while preserving case. ### [about_Character_Encoding](about_Character_Encoding.md) -Describes how PowerShell uses character encoding for input and output of string data. +Describes how PowerShell uses character encoding for input and output of string +data. ### [about_CimSession](about_CimSession.md) -Describes a **CimSession** object and the difference between CIM sessions and PowerShell sessions. +Describes a **CimSession** object and the difference between CIM sessions and +PowerShell sessions. ### [about_Classes](about_Classes.md) @@ -104,6 +109,10 @@ Describes how PowerShell determines which command to run. Describes the syntax diagrams that are used in PowerShell. +### [about_Comments](about_Comments.md) + +Describes how to use PowerShell comments and lists special use cases. + ### [about_Comment_Based_Help](about_Comment_Based_Help.md) Describes how to write comment-based help topics for functions and scripts. @@ -114,13 +123,13 @@ Describes the parameters that can be used with any cmdlet. ### [about_Comparison_Operators](about_Comparison_Operators.md) -The comparison operators in PowerShell can either compare two values or filter elements of a -collection against an input value. +The comparison operators in PowerShell can either compare two values or filter +elements of a collection against an input value. ### [about_Continue](about_Continue.md) -Describes how the `continue` statement immediately returns the program flow to the top of a program -loop, a `switch` statement, or a `trap` statement. +Describes how the `continue` statement immediately returns the program flow to +the top of a program loop, a `switch` statement, or a `trap` statement. ### [about_Core_Commands](about_Core_Commands.md) @@ -132,7 +141,8 @@ PowerShell data files are used to store arbitrary data using PowerShell syntax. ### [about_Data_Sections](about_Data_Sections.md) -Explains Data sections, which isolate text strings and other read-only data from script logic. +Explains Data sections, which isolate text strings and other read-only data +from script logic. ### [about_Debuggers](about_Debuggers.md) @@ -140,12 +150,14 @@ Describes the PowerShell debugger. ### [about_Do](about_Do.md) -Runs a statement list one or more times, subject to a `While` or `Until` condition. +Runs a statement list one or more times, subject to a `While` or `Until` +condition. ### [about_Enum](about_Enum.md) -The `enum` statement is used to declare an enumeration. An enumeration is a distinct type that -consists of a set of named labels called the enumerator list. +The `enum` statement is used to declare an enumeration. An enumeration is a +distinct type that consists of a set of named labels called the enumerator +list. ### [about_Environment_Provider](about_Environment_Provider.md) @@ -161,8 +173,8 @@ Describes the PowerShell execution policies and explains how to manage them. ### [about_Experimental_Features](about_Experimental_Features.md) -The PowerShell provides a mechanism for experimental features to coexist with existing stable -features in the PowerShell engine or in a PowerShell module. +The PowerShell provides a mechanism for experimental features to coexist with +existing stable features in the PowerShell engine or in a PowerShell module. ### [about_FileSystem_Provider](about_FileSystem_Provider.md) @@ -170,16 +182,18 @@ Provides access to files and directories. ### [about_For](about_For.md) -Describes a language command you can use to run statements based on a conditional test. +Describes a language command you can use to run statements based on a +conditional test. ### [about_Foreach](about_Foreach.md) -Describes a language command you can use to traverse all the items in a collection of items. +Describes a language command you can use to traverse all the items in a +collection of items. ### [about_Format.ps1xml](about_Format.ps1xml.md) -The `Format.ps1xml` files in PowerShell define the default display of objects in the PowerShell -console. +The `Format.ps1xml` files in PowerShell define the default display of objects +in the PowerShell console. ### [about_Function_Provider](about_Function_Provider.md) @@ -187,8 +201,8 @@ Provides access to the functions defined in PowerShell. ### [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) -Describes how functions that specify the `CmdletBinding` attribute can use the methods and -properties that are available to compiled cmdlets. +Describes how functions that specify the `CmdletBinding` attribute can use the +methods and properties that are available to compiled cmdlets. ### [about_Functions_Advanced_Parameters](about_Functions_Advanced_Parameters.md) @@ -200,8 +214,8 @@ Introduces advanced functions that are a way to create cmdlets using scripts. ### [about_Functions_Argument_Completion](about_Functions_Argument_Completion.md) -Argument completion is a feature of PowerShell that provide hints, enables discovery, and speeds up -input entry of argument values. +Argument completion is a feature of PowerShell that provide hints, enables +discovery, and speeds up input entry of argument values. ### [about_Functions_CmdletBindingAttribute](about_Functions_CmdletBindingAttribute.md) @@ -225,7 +239,8 @@ Describes how to create, use, and sort hashtables in PowerShell. ### [about_Hidden](about_Hidden.md) -Describes the `hidden` keyword, which hides class members from default `Get-Member` results. +Describes the `hidden` keyword, which hides class members from default +`Get-Member` results. ### [about_History](about_History.md) @@ -233,13 +248,13 @@ Describes how to get and run commands in the command history. ### [about_If](about_If.md) -Describes a language command you can use to run statement lists based on the results of one or more -conditional tests. +Describes a language command you can use to run statement lists based on the +results of one or more conditional tests. ### [about_Intrinsic_Members](about_Intrinsic_Members.md) -Provides information about PowerShell's intrinsic members that are available to all PowerShell -objects. +Provides information about PowerShell's intrinsic members that are available to +all PowerShell objects. ### [about_Job_Details](about_Job_Details.md) @@ -247,12 +262,13 @@ Provides details about background jobs on local and remote computers. ### [about_Jobs](about_Jobs.md) -Provides information about how PowerShell background jobs run a command or expression in the -background without interacting with the current session. +Provides information about how PowerShell background jobs run a command or +expression in the background without interacting with the current session. ### [about_Join](about_Join.md) -Describes how the join operator (-join) combines multiple strings into a single string. +Describes how the join operator (-join) combines multiple strings into a single +string. ### [about_Language_Keywords](about_Language_Keywords.md) @@ -276,8 +292,8 @@ PowerShell logs internal operations from the engine, providers, and cmdlets. ### [about_Logging_Windows](about_Logging_Windows.md) -PowerShell logs internal operations from the engine, providers, and cmdlets to the Windows event -log. +PowerShell logs internal operations from the engine, providers, and cmdlets to +the Windows event log. ### [about_Logical_Operators](about_Logical_Operators.md) @@ -285,7 +301,8 @@ Describes the operators that connect statements in PowerShell. ### [about_Member-Access_Enumeration](about_Member-Access_Enumeration.md) -Describes the automatic enumeration of list collection items when using the member-access operator. +Describes the automatic enumeration of list collection items when using the +member-access operator. ### [about_Methods](about_Methods.md) @@ -327,13 +344,20 @@ Explains the availability and purpose of output streams in PowerShell. PackageManagement is an aggregator for software package managers. +### [about_Parameter_Binding](about_Parameter_Binding.md) + +Parameter binding is the process that PowerShell uses to determine which +parameter set is being used and to associate (bind) values to the parameters of +a command. + ### [about_Parameter_Sets](about_Parameter_Sets.md) Describes how to define and use parameter sets in advanced functions. ### [about_Parameters_Default_Values](about_Parameters_Default_Values.md) -Describes how to set custom default values for cmdlet parameters and advanced functions. +Describes how to set custom default values for cmdlet parameters and advanced +functions. ### [about_Parameters](about_Parameters.md) @@ -373,7 +397,8 @@ Describes how to create and use a PowerShell profile. ### [about_Prompts](about_Prompts.md) -Describes the `Prompt` function and demonstrates how to create a custom `Prompt` function. +Describes the `Prompt` function and demonstrates how to create a custom +`Prompt` function. ### [about_Properties](about_Properties.md) @@ -381,16 +406,18 @@ Describes how to use object properties in PowerShell. ### [about_Providers](about_Providers.md) -PowerShell providers provide access to data and components, presented in a consistent format that -resembles a file system drive. +PowerShell providers provide access to data and components, presented in a +consistent format that resembles a file system drive. ### [about_PSConsoleHostReadLine](about_PSConsoleHostReadLine.md) -Explains how to create a customize how PowerShell reads input at the console prompt. +Explains how to create a customize how PowerShell reads input at the console +prompt. ### [about_PSCustomObject](about_PSCustomObject.md) -Explains the differences between the `[psobject]` and `[pscustomobject]` type accelerators. +Explains the differences between the `[psobject]` and `[pscustomobject]` type +accelerators. ### [about_PSItem](about_PSItem.md) @@ -398,21 +425,23 @@ The automatic variable that contains the current object in the pipeline object. ### [about_PSModulePath](about_PSModulePath.md) -This article the purpose and usage of the `$env:PSModulePath` environment variable. +This article the purpose and usage of the `$env:PSModulePath` environment +variable. ### [about_PSSession_Details](about_PSSession_Details.md) -Provides detailed information about PowerShell sessions and the role they play in remote commands. +Provides detailed information about PowerShell sessions and the role they play +in remote commands. ### [about_PSSessions](about_PSSessions.md) -Describes PowerShell sessions (PSSessions) and explains how to establish a persistent connection to -a remote computer. +Describes PowerShell sessions (PSSessions) and explains how to establish a +persistent connection to a remote computer. ### [about_Pwsh](about_Pwsh.md) -Explains how to use the `pwsh` command-line interface. Displays the command-line parameters and -describes the syntax. +Explains how to use the `pwsh` command-line interface. Displays the +command-line parameters and describes the syntax. ### [about_Quoting_Rules](about_Quoting_Rules.md) @@ -424,8 +453,9 @@ Explains how to redirect output from PowerShell to text files. ### [about_Ref](about_Ref.md) -Describes how to create and use a reference type variable. You can use reference type variables to -permit a function to change the value of a variable that is passed to it. +Describes how to create and use a reference type variable. You can use +reference type variables to permit a function to change the value of a variable +that is passed to it. ### [about_Registry_Provider](about_Registry_Provider.md) @@ -449,8 +479,8 @@ Describes how to interpret and format the output of remote commands. ### [about_Remote_Requirements](about_Remote_Requirements.md) -Describes the system requirements and configuration requirements for running remote commands in -PowerShell. +Describes the system requirements and configuration requirements for running +remote commands in PowerShell. ### [about_Remote_Troubleshooting](about_Remote_Troubleshooting.md) @@ -470,8 +500,8 @@ Prevents a script from running without the required elements. ### [about_Reserved_Words](about_Reserved_Words.md) -Lists the reserved words that cannot be used as identifiers because they have a special meaning in -PowerShell. +Lists the reserved words that cannot be used as identifiers because they have a +special meaning in PowerShell. ### [about_Return](about_Return.md) @@ -479,20 +509,24 @@ Exits the current scope, which can be a function, script, or script block. ### [about_Run_With_PowerShell](about_Run_With_PowerShell.md) -Explains how to use the "Run with PowerShell" feature to run a script from a file system drive. +Explains how to use the "Run with PowerShell" feature to run a script from a +file system drive. ### [about_Scopes](about_Scopes.md) -Explains the concept of scope in PowerShell and shows how to set and change the scope of elements. +Explains the concept of scope in PowerShell and shows how to set and change the +scope of elements. ### [about_Script_Blocks](about_Script_Blocks.md) -Defines what a script block is and explains how to use script blocks in the PowerShell programming language. +Defines what a script block is and explains how to use script blocks in the +PowerShell programming language. ### [about_Script_Internationalization](about_Script_Internationalization.md) -Describes the script internationalization features that make it easy for scripts to display messages -and instructions to users in their user interface (UI) language. +Describes the script internationalization features that make it easy for +scripts to display messages and instructions to users in their user interface +(UI) language. ### [about_Scripts](about_Scripts.md) @@ -500,26 +534,29 @@ Describes how to run and write scripts in PowerShell. ### [about_Session_Configuration_Files](about_Session_Configuration_Files.md) -Describes session configuration files, which are used in a session configuration (also known as an -"endpoint") to define the environment of sessions that use the session configuration. +Describes session configuration files, which are used in a session +configuration (also known as an "endpoint") to define the environment of +sessions that use the session configuration. ### [about_Session_Configurations](about_Session_Configurations.md) -Describes session configurations, which determine the users who can connect to the computer remotely -and the commands they can run. +Describes session configurations, which determine the users who can connect to +the computer remotely and the commands they can run. ### [about_Signing](about_Signing.md) -Explains how to sign scripts so that they comply with the PowerShell execution policies. +Explains how to sign scripts so that they comply with the PowerShell execution +policies. ### [about_Simplified_Syntax](about_Simplified_Syntax.md) -Describes easier, more natural-language ways of scripting filters for collections of objects. +Describes easier, more natural-language ways of scripting filters for +collections of objects. ### [about_Special_Characters](about_Special_Characters.md) -Describes the special character sequences that control how PowerShell interprets the next characters -in the sequence. +Describes the special character sequences that control how PowerShell +interprets the next characters in the sequence. ### [about_Splatting](about_Splatting.md) @@ -527,7 +564,8 @@ Describes how to use splatting to pass parameters to commands in PowerShell. ### [about_Split](about_Split.md) -Explains how to use the Split operator to split one or more strings into substrings. +Explains how to use the Split operator to split one or more strings into +substrings. ### [about_Switch](about_Switch.md) @@ -535,8 +573,8 @@ Explains how to use a switch to handle multiple `if` statements. ### [about_Tab_Expansion](about_Tab_Expansion.md) -PowerShell provides completions on input to provide hints, enable discovery, and speed up input -entry by pressing the Tab key. +PowerShell provides completions on input to provide hints, enable discovery, +and speed up input entry by pressing the Tab key. ### [about_Telemetry](about_Telemetry.md) @@ -544,8 +582,9 @@ Describes the telemetry collected in PowerShell and how to opt-out. ### [about_Thread_Jobs](about_Thread_Jobs.md) -Provides information about PowerShell thread-based jobs. A thread job is a type of background job -that runs a command or expression in a separate thread within the current session process. +Provides information about PowerShell thread-based jobs. A thread job is a type +of background job that runs a command or expression in a separate thread within +the current session process. ### [about_Throw](about_Throw.md) @@ -557,19 +596,26 @@ Describes a keyword that handles a terminating error. ### [about_Try_Catch_Finally](about_Try_Catch_Finally.md) -Describes how to use the `try`, `catch`, and `finally` blocks to handle terminating errors. +Describes how to use the `try`, `catch`, and `finally` blocks to handle +terminating errors. ### [about_Type_Accelerators](about_Type_Accelerators.md) Describes the Type accelerators available for .NET framework classes +### [about_Type_Conversion](about_Type_Conversion.md) + +PowerShell has a flexible type system that makes it easier to use. However, you +must understand how it works to avoid unexpected results. + ### [about_Type_Operators](about_Type_Operators.md) Describes the operators that work with Microsoft .NET types. ### [about_Types.ps1xml](about_Types.ps1xml.md) -Explains how to use `Types.ps1xml` files to extend the types of objects that are used in PowerShell. +Explains how to use `Types.ps1xml` files to extend the types of objects that +are used in PowerShell. ### [about_Updatable_Help](about_Updatable_Help.md) @@ -577,7 +623,8 @@ Describes the updatable help system in PowerShell. ### [about_Update_Notifications](about_Update_Notifications.md) -Notifies users on startup of PowerShell that a new version of PowerShell has been released. +Notifies users on startup of PowerShell that a new version of PowerShell has +been released. ### [about_Using](about_Using.md) @@ -593,8 +640,8 @@ Describes how variables store values that can be used in PowerShell. ### [about_While](about_While.md) -Describes a language statement that you can use to run a command block based on the results of a -conditional test. +Describes a language statement that you can use to run a command block based on +the results of a conditional test. ### [about_Wildcards](about_Wildcards.md) diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/About.md b/reference/7.5/Microsoft.PowerShell.Core/About/About.md index 5f9572b08a66..9fece39f02aa 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/About.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/About.md @@ -2,7 +2,7 @@ description: About topics cover a range of concepts about PowerShell. Help Version: 7.5.0.0 Locale: en-US -ms.date: 11/06/2024 +ms.date: 01/14/2025 title: About topics --- # About topics @@ -23,7 +23,8 @@ Describes how to use alternate names for cmdlets and commands in PowerShell. ### [about_ANSI_Terminals](about_ANSI_Terminals.md) -Describes the support available for ANSI escape sequences in Windows PowerShell. +Describes the support available for ANSI escape sequences in Windows +PowerShell. ### [about_Arithmetic_Operators](about_Arithmetic_Operators.md) @@ -31,7 +32,8 @@ Describes the operators that perform arithmetic in PowerShell. ### [about_Arrays](about_Arrays.md) -Describes arrays, which are data structures designed to store collections of items. +Describes arrays, which are data structures designed to store collections of +items. ### [about_Assignment_Operators](about_Assignment_Operators.md) @@ -39,8 +41,8 @@ Describes how to use operators to assign values to variables. ### [about_Automatic_Variables](about_Automatic_Variables.md) -Describes variables that store state information for PowerShell. These variables are created and -maintained by PowerShell. +Describes variables that store state information for PowerShell. These +variables are created and maintained by PowerShell. ### [about_Booleans](about_Booleans.md) @@ -48,7 +50,8 @@ Describes how boolean expressions are evaluated. ### [about_Break](about_Break.md) -Describes the `break` statement, which provides a way to exit the current control block. +Describes the `break` statement, which provides a way to exit the current +control block. ### [about_Built-in_Functions](about_Built-in_Functions.md) @@ -56,13 +59,13 @@ Describes the built-in functions in PowerShell. ### [about_Calculated_Properties](about_Calculated_Properties.md) -PowerShell provides the ability to dynamically add new properties and alter the formatting of -objects output to the pipeline. +PowerShell provides the ability to dynamically add new properties and alter the +formatting of objects output to the pipeline. ### [about_Calling_Generic_Methods](about_Calling_Generic_Methods.md) -Generics let you tailor a method, class, structure, or interface to the precise data type it acts -upon. +Generics let you tailor a method, class, structure, or interface to the precise +data type it acts upon. ### [about_Case-Sensitivity](about_Case-Sensitivity.md) @@ -70,11 +73,13 @@ PowerShell is as case-insensitive as possible while preserving case. ### [about_Character_Encoding](about_Character_Encoding.md) -Describes how PowerShell uses character encoding for input and output of string data. +Describes how PowerShell uses character encoding for input and output of string +data. ### [about_CimSession](about_CimSession.md) -Describes a **CimSession** object and the difference between CIM sessions and PowerShell sessions. +Describes a **CimSession** object and the difference between CIM sessions and +PowerShell sessions. ### [about_Classes](about_Classes.md) @@ -104,6 +109,10 @@ Describes how PowerShell determines which command to run. Describes the syntax diagrams that are used in PowerShell. +### [about_Comments](about_Comments.md) + +Describes how to use PowerShell comments and lists special use cases. + ### [about_Comment_Based_Help](about_Comment_Based_Help.md) Describes how to write comment-based help topics for functions and scripts. @@ -114,13 +123,13 @@ Describes the parameters that can be used with any cmdlet. ### [about_Comparison_Operators](about_Comparison_Operators.md) -The comparison operators in PowerShell can either compare two values or filter elements of a -collection against an input value. +The comparison operators in PowerShell can either compare two values or filter +elements of a collection against an input value. ### [about_Continue](about_Continue.md) -Describes how the `continue` statement immediately returns the program flow to the top of a program -loop, a `switch` statement, or a `trap` statement. +Describes how the `continue` statement immediately returns the program flow to +the top of a program loop, a `switch` statement, or a `trap` statement. ### [about_Core_Commands](about_Core_Commands.md) @@ -132,7 +141,8 @@ PowerShell data files are used to store arbitrary data using PowerShell syntax. ### [about_Data_Sections](about_Data_Sections.md) -Explains Data sections, which isolate text strings and other read-only data from script logic. +Explains Data sections, which isolate text strings and other read-only data +from script logic. ### [about_Debuggers](about_Debuggers.md) @@ -140,12 +150,14 @@ Describes the PowerShell debugger. ### [about_Do](about_Do.md) -Runs a statement list one or more times, subject to a `While` or `Until` condition. +Runs a statement list one or more times, subject to a `While` or `Until` +condition. ### [about_Enum](about_Enum.md) -The `enum` statement is used to declare an enumeration. An enumeration is a distinct type that -consists of a set of named labels called the enumerator list. +The `enum` statement is used to declare an enumeration. An enumeration is a +distinct type that consists of a set of named labels called the enumerator +list. ### [about_Environment_Provider](about_Environment_Provider.md) @@ -161,8 +173,8 @@ Describes the PowerShell execution policies and explains how to manage them. ### [about_Experimental_Features](about_Experimental_Features.md) -The PowerShell provides a mechanism for experimental features to coexist with existing stable -features in the PowerShell engine or in a PowerShell module. +The PowerShell provides a mechanism for experimental features to coexist with +existing stable features in the PowerShell engine or in a PowerShell module. ### [about_FileSystem_Provider](about_FileSystem_Provider.md) @@ -170,16 +182,18 @@ Provides access to files and directories. ### [about_For](about_For.md) -Describes a language command you can use to run statements based on a conditional test. +Describes a language command you can use to run statements based on a +conditional test. ### [about_Foreach](about_Foreach.md) -Describes a language command you can use to traverse all the items in a collection of items. +Describes a language command you can use to traverse all the items in a +collection of items. ### [about_Format.ps1xml](about_Format.ps1xml.md) -The `Format.ps1xml` files in PowerShell define the default display of objects in the PowerShell -console. +The `Format.ps1xml` files in PowerShell define the default display of objects +in the PowerShell console. ### [about_Function_Provider](about_Function_Provider.md) @@ -187,8 +201,8 @@ Provides access to the functions defined in PowerShell. ### [about_Functions_Advanced_Methods](about_Functions_Advanced_Methods.md) -Describes how functions that specify the `CmdletBinding` attribute can use the methods and -properties that are available to compiled cmdlets. +Describes how functions that specify the `CmdletBinding` attribute can use the +methods and properties that are available to compiled cmdlets. ### [about_Functions_Advanced_Parameters](about_Functions_Advanced_Parameters.md) @@ -200,8 +214,8 @@ Introduces advanced functions that are a way to create cmdlets using scripts. ### [about_Functions_Argument_Completion](about_Functions_Argument_Completion.md) -Argument completion is a feature of PowerShell that provide hints, enables discovery, and speeds up -input entry of argument values. +Argument completion is a feature of PowerShell that provide hints, enables +discovery, and speeds up input entry of argument values. ### [about_Functions_CmdletBindingAttribute](about_Functions_CmdletBindingAttribute.md) @@ -225,7 +239,8 @@ Describes how to create, use, and sort hashtables in PowerShell. ### [about_Hidden](about_Hidden.md) -Describes the `hidden` keyword, which hides class members from default `Get-Member` results. +Describes the `hidden` keyword, which hides class members from default +`Get-Member` results. ### [about_History](about_History.md) @@ -233,13 +248,13 @@ Describes how to get and run commands in the command history. ### [about_If](about_If.md) -Describes a language command you can use to run statement lists based on the results of one or more -conditional tests. +Describes a language command you can use to run statement lists based on the +results of one or more conditional tests. ### [about_Intrinsic_Members](about_Intrinsic_Members.md) -Provides information about PowerShell's intrinsic members that are available to all PowerShell -objects. +Provides information about PowerShell's intrinsic members that are available to +all PowerShell objects. ### [about_Job_Details](about_Job_Details.md) @@ -247,12 +262,13 @@ Provides details about background jobs on local and remote computers. ### [about_Jobs](about_Jobs.md) -Provides information about how PowerShell background jobs run a command or expression in the -background without interacting with the current session. +Provides information about how PowerShell background jobs run a command or +expression in the background without interacting with the current session. ### [about_Join](about_Join.md) -Describes how the join operator (-join) combines multiple strings into a single string. +Describes how the join operator (-join) combines multiple strings into a single +string. ### [about_Language_Keywords](about_Language_Keywords.md) @@ -276,8 +292,8 @@ PowerShell logs internal operations from the engine, providers, and cmdlets. ### [about_Logging_Windows](about_Logging_Windows.md) -PowerShell logs internal operations from the engine, providers, and cmdlets to the Windows event -log. +PowerShell logs internal operations from the engine, providers, and cmdlets to +the Windows event log. ### [about_Logical_Operators](about_Logical_Operators.md) @@ -285,7 +301,8 @@ Describes the operators that connect statements in PowerShell. ### [about_Member-Access_Enumeration](about_Member-Access_Enumeration.md) -Describes the automatic enumeration of list collection items when using the member-access operator. +Describes the automatic enumeration of list collection items when using the +member-access operator. ### [about_Methods](about_Methods.md) @@ -327,13 +344,20 @@ Explains the availability and purpose of output streams in PowerShell. PackageManagement is an aggregator for software package managers. +### [about_Parameter_Binding](about_Parameter_Binding.md) + +Parameter binding is the process that PowerShell uses to determine which +parameter set is being used and to associate (bind) values to the parameters of +a command. + ### [about_Parameter_Sets](about_Parameter_Sets.md) Describes how to define and use parameter sets in advanced functions. ### [about_Parameters_Default_Values](about_Parameters_Default_Values.md) -Describes how to set custom default values for cmdlet parameters and advanced functions. +Describes how to set custom default values for cmdlet parameters and advanced +functions. ### [about_Parameters](about_Parameters.md) @@ -373,7 +397,8 @@ Describes how to create and use a PowerShell profile. ### [about_Prompts](about_Prompts.md) -Describes the `Prompt` function and demonstrates how to create a custom `Prompt` function. +Describes the `Prompt` function and demonstrates how to create a custom +`Prompt` function. ### [about_Properties](about_Properties.md) @@ -381,16 +406,18 @@ Describes how to use object properties in PowerShell. ### [about_Providers](about_Providers.md) -PowerShell providers provide access to data and components, presented in a consistent format that -resembles a file system drive. +PowerShell providers provide access to data and components, presented in a +consistent format that resembles a file system drive. ### [about_PSConsoleHostReadLine](about_PSConsoleHostReadLine.md) -Explains how to create a customize how PowerShell reads input at the console prompt. +Explains how to create a customize how PowerShell reads input at the console +prompt. ### [about_PSCustomObject](about_PSCustomObject.md) -Explains the differences between the `[psobject]` and `[pscustomobject]` type accelerators. +Explains the differences between the `[psobject]` and `[pscustomobject]` type +accelerators. ### [about_PSItem](about_PSItem.md) @@ -398,21 +425,23 @@ The automatic variable that contains the current object in the pipeline object. ### [about_PSModulePath](about_PSModulePath.md) -This article the purpose and usage of the `$env:PSModulePath` environment variable. +This article the purpose and usage of the `$env:PSModulePath` environment +variable. ### [about_PSSession_Details](about_PSSession_Details.md) -Provides detailed information about PowerShell sessions and the role they play in remote commands. +Provides detailed information about PowerShell sessions and the role they play +in remote commands. ### [about_PSSessions](about_PSSessions.md) -Describes PowerShell sessions (PSSessions) and explains how to establish a persistent connection to -a remote computer. +Describes PowerShell sessions (PSSessions) and explains how to establish a +persistent connection to a remote computer. ### [about_Pwsh](about_Pwsh.md) -Explains how to use the `pwsh` command-line interface. Displays the command-line parameters and -describes the syntax. +Explains how to use the `pwsh` command-line interface. Displays the +command-line parameters and describes the syntax. ### [about_Quoting_Rules](about_Quoting_Rules.md) @@ -424,8 +453,9 @@ Explains how to redirect output from PowerShell to text files. ### [about_Ref](about_Ref.md) -Describes how to create and use a reference type variable. You can use reference type variables to -permit a function to change the value of a variable that is passed to it. +Describes how to create and use a reference type variable. You can use +reference type variables to permit a function to change the value of a variable +that is passed to it. ### [about_Registry_Provider](about_Registry_Provider.md) @@ -449,8 +479,8 @@ Describes how to interpret and format the output of remote commands. ### [about_Remote_Requirements](about_Remote_Requirements.md) -Describes the system requirements and configuration requirements for running remote commands in -PowerShell. +Describes the system requirements and configuration requirements for running +remote commands in PowerShell. ### [about_Remote_Troubleshooting](about_Remote_Troubleshooting.md) @@ -470,8 +500,8 @@ Prevents a script from running without the required elements. ### [about_Reserved_Words](about_Reserved_Words.md) -Lists the reserved words that cannot be used as identifiers because they have a special meaning in -PowerShell. +Lists the reserved words that cannot be used as identifiers because they have a +special meaning in PowerShell. ### [about_Return](about_Return.md) @@ -479,20 +509,24 @@ Exits the current scope, which can be a function, script, or script block. ### [about_Run_With_PowerShell](about_Run_With_PowerShell.md) -Explains how to use the "Run with PowerShell" feature to run a script from a file system drive. +Explains how to use the "Run with PowerShell" feature to run a script from a +file system drive. ### [about_Scopes](about_Scopes.md) -Explains the concept of scope in PowerShell and shows how to set and change the scope of elements. +Explains the concept of scope in PowerShell and shows how to set and change the +scope of elements. ### [about_Script_Blocks](about_Script_Blocks.md) -Defines what a script block is and explains how to use script blocks in the PowerShell programming language. +Defines what a script block is and explains how to use script blocks in the +PowerShell programming language. ### [about_Script_Internationalization](about_Script_Internationalization.md) -Describes the script internationalization features that make it easy for scripts to display messages -and instructions to users in their user interface (UI) language. +Describes the script internationalization features that make it easy for +scripts to display messages and instructions to users in their user interface +(UI) language. ### [about_Scripts](about_Scripts.md) @@ -500,26 +534,29 @@ Describes how to run and write scripts in PowerShell. ### [about_Session_Configuration_Files](about_Session_Configuration_Files.md) -Describes session configuration files, which are used in a session configuration (also known as an -"endpoint") to define the environment of sessions that use the session configuration. +Describes session configuration files, which are used in a session +configuration (also known as an "endpoint") to define the environment of +sessions that use the session configuration. ### [about_Session_Configurations](about_Session_Configurations.md) -Describes session configurations, which determine the users who can connect to the computer remotely -and the commands they can run. +Describes session configurations, which determine the users who can connect to +the computer remotely and the commands they can run. ### [about_Signing](about_Signing.md) -Explains how to sign scripts so that they comply with the PowerShell execution policies. +Explains how to sign scripts so that they comply with the PowerShell execution +policies. ### [about_Simplified_Syntax](about_Simplified_Syntax.md) -Describes easier, more natural-language ways of scripting filters for collections of objects. +Describes easier, more natural-language ways of scripting filters for +collections of objects. ### [about_Special_Characters](about_Special_Characters.md) -Describes the special character sequences that control how PowerShell interprets the next characters -in the sequence. +Describes the special character sequences that control how PowerShell +interprets the next characters in the sequence. ### [about_Splatting](about_Splatting.md) @@ -527,7 +564,8 @@ Describes how to use splatting to pass parameters to commands in PowerShell. ### [about_Split](about_Split.md) -Explains how to use the Split operator to split one or more strings into substrings. +Explains how to use the Split operator to split one or more strings into +substrings. ### [about_Switch](about_Switch.md) @@ -535,8 +573,8 @@ Explains how to use a switch to handle multiple `if` statements. ### [about_Tab_Expansion](about_Tab_Expansion.md) -PowerShell provides completions on input to provide hints, enable discovery, and speed up input -entry by pressing the Tab key. +PowerShell provides completions on input to provide hints, enable discovery, +and speed up input entry by pressing the Tab key. ### [about_Telemetry](about_Telemetry.md) @@ -544,8 +582,9 @@ Describes the telemetry collected in PowerShell and how to opt-out. ### [about_Thread_Jobs](about_Thread_Jobs.md) -Provides information about PowerShell thread-based jobs. A thread job is a type of background job -that runs a command or expression in a separate thread within the current session process. +Provides information about PowerShell thread-based jobs. A thread job is a type +of background job that runs a command or expression in a separate thread within +the current session process. ### [about_Throw](about_Throw.md) @@ -557,19 +596,26 @@ Describes a keyword that handles a terminating error. ### [about_Try_Catch_Finally](about_Try_Catch_Finally.md) -Describes how to use the `try`, `catch`, and `finally` blocks to handle terminating errors. +Describes how to use the `try`, `catch`, and `finally` blocks to handle +terminating errors. ### [about_Type_Accelerators](about_Type_Accelerators.md) Describes the Type accelerators available for .NET framework classes +### [about_Type_Conversion](about_Type_Conversion.md) + +PowerShell has a flexible type system that makes it easier to use. However, you +must understand how it works to avoid unexpected results. + ### [about_Type_Operators](about_Type_Operators.md) Describes the operators that work with Microsoft .NET types. ### [about_Types.ps1xml](about_Types.ps1xml.md) -Explains how to use `Types.ps1xml` files to extend the types of objects that are used in PowerShell. +Explains how to use `Types.ps1xml` files to extend the types of objects that +are used in PowerShell. ### [about_Updatable_Help](about_Updatable_Help.md) @@ -577,7 +623,8 @@ Describes the updatable help system in PowerShell. ### [about_Update_Notifications](about_Update_Notifications.md) -Notifies users on startup of PowerShell that a new version of PowerShell has been released. +Notifies users on startup of PowerShell that a new version of PowerShell has +been released. ### [about_Using](about_Using.md) @@ -593,8 +640,8 @@ Describes how variables store values that can be used in PowerShell. ### [about_While](about_While.md) -Describes a language statement that you can use to run a command block based on the results of a -conditional test. +Describes a language statement that you can use to run a command block based on +the results of a conditional test. ### [about_Wildcards](about_Wildcards.md) diff --git a/reference/docs-conceptual/security/preventing-script-injection.md b/reference/docs-conceptual/security/preventing-script-injection.md index 6ab2a1cc0fe1..47319e86724b 100644 --- a/reference/docs-conceptual/security/preventing-script-injection.md +++ b/reference/docs-conceptual/security/preventing-script-injection.md @@ -158,7 +158,7 @@ statements, one of which is arbitrary code injected by the user. pwnd! ``` -### Use the `EscapeSingleQuotedStringContent()` method +#### Use the `EscapeSingleQuotedStringContent()` method To protect against the user inserting their own single quote characters to exploit the function you must use the `EscapeSingleQuotedStringContent()` API. This is a static public method of the PowerShell diff --git a/reference/module/index.md b/reference/module/index.md index f95d31beef30..ec5feb0e56f6 100644 --- a/reference/module/index.md +++ b/reference/module/index.md @@ -12,7 +12,7 @@ ms.manager: sewhee ms.product: powershell ms.topic: landing-page quickFilterColumn1: powershell-7.4,windowsserver2025-ps -quickFilterColumn2: azps-13.0.0,sqlserver-ps +quickFilterColumn2: azps-13.1.0,sqlserver-ps quickFilterColumn3: graph-powershell-1.0,systemcenter-ps-2022 title: PowerShell Module Browser --- diff --git a/tests/Pester/Update-Help.Tests.ps1 b/tests/Pester/Update-Help.Tests.ps1 index 11f126a47866..8c36bc6ad93a 100644 --- a/tests/Pester/Update-Help.Tests.ps1 +++ b/tests/Pester/Update-Help.Tests.ps1 @@ -95,7 +95,7 @@ function GetFiles [string]$path ) - Get-ChildItem $path -Include $fileType -Recurse -ea SilentlyContinue | Select-Object -ExpandProperty FullName + Get-ChildItem $path -Include $fileType -Recurse -ErrorAction SilentlyContinue | Select-Object -ExpandProperty FullName } function ValidateInstalledHelpContent @@ -105,7 +105,7 @@ function ValidateInstalledHelpContent [string]$moduleName ) - $helpFilesInstalled = @(GetFiles -path $testCases[$moduleName].HelpInstallationPath | ForEach-Object {Split-Path $_ -Leaf}) + $helpFilesInstalled = @(GetFiles -Path $testCases[$moduleName].HelpInstallationPath | ForEach-Object {Split-Path $_ -Leaf}) $expectedHelpFiles = @($testCases[$moduleName].HelpFiles) $helpFilesInstalled.Count | Should Be $expectedHelpFiles.Count @@ -126,7 +126,7 @@ function RunUpdateHelpTests It "Validate Update-Help for module '$moduleName'" { # If the help file is already installed, delete it. - Get-ChildItem $testCases[$moduleName].HelpInstallationPath -Include @("about_*.txt","*help.xml") -Recurse -ea SilentlyContinue | + Get-ChildItem $testCases[$moduleName].HelpInstallationPath -Include @("about_*.txt","*help.xml") -Recurse -ErrorAction SilentlyContinue | Remove-Item -Force -ErrorAction SilentlyContinue if ($useSourcePath) diff --git a/tests/PowerShellDocsTests.psm1 b/tests/PowerShellDocsTests.psm1 index 2e467175e333..7cd68ae0c5db 100644 --- a/tests/PowerShellDocsTests.psm1 +++ b/tests/PowerShellDocsTests.psm1 @@ -21,7 +21,7 @@ function Test-PSPesterResults throw "Test result file '$testResultsFile' not found." } - $x = [xml](Get-Content -raw $testResultsFile) + $x = [xml](Get-Content -Raw $testResultsFile) if ([int]$x.'test-results'.failures -gt 0) { logerror "TEST FAILURES" diff --git a/tools/build-updatedhelp.ps1 b/tools/build-updatedhelp.ps1 index 487fe338e69d..b0f4b9099cb3 100644 --- a/tools/build-updatedhelp.ps1 +++ b/tools/build-updatedhelp.ps1 @@ -1,7 +1,7 @@ <# Usage: - 1. Clone the docs respository + 1. Clone the docs repository cd C:\temp git clone https://github.com/MicrosoftDocs/PowerShell-Docs.git @@ -35,9 +35,9 @@ $pandocSourceURL = "https://github.com/jgm/pandoc/releases/download/$panDocVersi $docToolsPath = New-Item (Join-Path $tempDir "doctools") -ItemType Directory -Force -$pandoc = Get-Command pandoc.exe -ea SilentlyContinue +$pandoc = Get-Command pandoc.exe -ErrorAction SilentlyContinue if ($pandoc) { - $version = (& $pandoc.Source --version | Select-String -pattern 'pandoc\.exe').Line.Split(' ')[-1] + $version = (& $pandoc.Source --version | Select-String -Pattern 'pandoc\.exe').Line.Split(' ')[-1] if ($version -ge $panDocVersion) { Write-Host "Found Pandoc version $version." $pandocExePath = $pandoc.Source @@ -55,7 +55,7 @@ if ($needPandoc) { $platyPSversion = "0.14.0" -$platyps = Get-Module -list platyps +$platyps = Get-Module -List platyps if ($platyps) { if ($platyps.Version.ToString() -ge $platyPSversion) { @@ -136,7 +136,7 @@ Get-ChildItem $VersionFolder -Directory | ForEach-Object -Process { if (Test-Path $AboutFolder) { Write-Verbose "AboutFolder = $AboutFolder" - Get-ChildItem "$aboutfolder/about_*.md" | ForEach-Object { + Get-ChildItem "$AboutFolder/about_*.md" | ForEach-Object { $aboutFileFullName = $_.FullName $aboutFileOutputName = "$($_.BaseName).help.txt" $aboutFileOutputFullName = Join-Path $MamlOutputFolder $aboutFileOutputName @@ -169,4 +169,4 @@ Get-ChildItem $VersionFolder -Directory | ForEach-Object -Process { } } -$global:ProgressPreference = $savedProgressPreference \ No newline at end of file +$global:ProgressPreference = $savedProgressPreference