diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Export-Alias.md b/reference/7.5/Microsoft.PowerShell.Utility/Export-Alias.md index d533077f14de..e8ed896bc665 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Export-Alias.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Export-Alias.md @@ -18,17 +18,17 @@ Exports information about currently defined aliases to a file. ### ByPath (Default) ``` -Export-Alias [-Path] [[-Name] ] [-PassThru] [-As ] [-Append] - [-Force] [-NoClobber] [-Description ] [-Scope ] [-WhatIf] [-Confirm] - [] +Export-Alias [-Path] [[-Name] ] [-PassThru] [-As ] + [-Append] [-Force] [-NoClobber] [-Description ] [-Scope ] [-WhatIf] + [-Confirm] [] ``` ### ByLiteralPath ``` -Export-Alias -LiteralPath [[-Name] ] [-PassThru] [-As ] - [-Append] [-Force] [-NoClobber] [-Description ] [-Scope ] [-WhatIf] [-Confirm] - [] +Export-Alias -LiteralPath [[-Name] ] [-PassThru] + [-As ] [-Append] [-Force] [-NoClobber] [-Description ] + [-Scope ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -45,7 +45,7 @@ profile. ### Example 1: Export an alias ```powershell -Export-Alias -Path "alias.csv" +Export-Alias -Path "Alias.csv" ``` This command exports current alias information to a file named Alias.csv in the current directory. @@ -53,7 +53,7 @@ This command exports current alias information to a file named Alias.csv in the ### Example 2: Export an alias unless the export file already exists ```powershell -Export-Alias -Path "alias.csv" -NoClobber +Export-Alias -Path "Alias.csv" -NoClobber ``` This command exports the aliases in the current session to an Alias.csv file. @@ -64,7 +64,7 @@ exists in the current directory. ### Example 3: Append aliases to a file ```powershell -Export-Alias -Path "alias.csv" -Append -Description "Appended Aliases" -Force +Export-Alias -Path "Alias.csv" -Append -Description "Appended Aliases" -Force ``` This command appends the aliases in the current session to the Alias.csv file. diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Export-Clixml.md b/reference/7.5/Microsoft.PowerShell.Utility/Export-Clixml.md index 4e902fba1bcb..f534f14dc561 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Export-Clixml.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Export-Clixml.md @@ -18,21 +18,21 @@ Creates an XML-based representation of an object or objects and stores it in a f ### ByPath (Default) ``` -Export-Clixml [-Depth ] [-Path] -InputObject [-Force] [-NoClobber] - [-Encoding ] [-WhatIf] [-Confirm] [] +Export-Clixml [-Depth ] [-Path] -InputObject [-Force] + [-NoClobber] [-Encoding ] [-WhatIf] [-Confirm] [] ``` ### ByLiteralPath ``` -Export-Clixml [-Depth ] -LiteralPath -InputObject [-Force] [-NoClobber] - [-Encoding ] [-WhatIf] [-Confirm] [] +Export-Clixml [-Depth ] -LiteralPath -InputObject [-Force] + [-NoClobber] [-Encoding ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -The `Export-Clixml` cmdlet serialized an object into a Common Language Infrastructure (CLI) -XML-based representation stores it in a file. You can then use the `Import-Clixml` cmdlet to +The `Export-Clixml` cmdlet serializes an object into a Common Language Infrastructure (CLI) +XML-based representation and stores it in a file. You can then use the `Import-Clixml` cmdlet to recreate the saved object based on the contents of that file. For more information about CLI, see [Language independence](/dotnet/standard/language-independence). @@ -192,7 +192,7 @@ The acceptable values for this parameter are as follows: Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code pages (like `-Encoding 1251`) or string names of registered code pages (like `-Encoding "windows-1251"`). For more information, see the .NET documentation for -[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2). +[Encoding.CodePage](xref:System.Text.Encoding.CodePage%2A). Starting with PowerShell 7.4, you can use the `Ansi` value for the **Encoding** parameter to pass the numeric ID for the current culture's ANSI code page without having to specify it manually. diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Export-Csv.md b/reference/7.5/Microsoft.PowerShell.Utility/Export-Csv.md index dd8a9987ff4d..49638f58f907 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Export-Csv.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Export-Csv.md @@ -19,19 +19,19 @@ file. ### Delimiter (Default) ``` -Export-Csv -InputObject [[-Path] ] [-LiteralPath ] [-Force] [-NoClobber] - [-Encoding ] [-Append] [[-Delimiter] ] [-IncludeTypeInformation] - [-NoTypeInformation] [-QuoteFields ] [-UseQuotes ] [-NoHeader] [-WhatIf] - [-Confirm] [] +Export-Csv -InputObject [[-Path] ] [-LiteralPath ] [-Force] + [-NoClobber] [-Encoding ] [-Append] [[-Delimiter] ] + [-IncludeTypeInformation] [-NoTypeInformation] [-QuoteFields ] + [-UseQuotes ] [-NoHeader] [-WhatIf] [-Confirm] [] ``` ### UseCulture ``` -Export-Csv -InputObject [[-Path] ] [-LiteralPath ] [-Force] [-NoClobber] - [-Encoding ] [-Append] [-UseCulture] [-IncludeTypeInformation] [-NoTypeInformation] - [-QuoteFields ] [-UseQuotes ] [-NoHeader] [-WhatIf] [-Confirm] - [] +Export-Csv -InputObject [[-Path] ] [-LiteralPath ] [-Force] + [-NoClobber] [-Encoding ] [-Append] [-UseCulture] [-IncludeTypeInformation] + [-NoTypeInformation] [-QuoteFields ] [-UseQuotes ] [-NoHeader] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -53,7 +53,7 @@ file. ```powershell Get-Process -Name WmiPrvSE | - Select-Object -Property BasePriority,Id,SessionId,WorkingSet | + Select-Object -Property BasePriority, Id, SessionId, WorkingSet | Export-Csv -Path .\WmiData.csv -NoTypeInformation Import-Csv -Path .\WmiData.csv ``` @@ -142,11 +142,12 @@ Get-Content -Path .\Processes.csv The `Get-Culture` cmdlet uses the nested properties **TextInfo** and **ListSeparator** and displays the current culture's default list separator. The `Get-Process` cmdlet gets **Process** objects. The process objects are sent down the pipeline to the `Export-Csv` cmdlet. `Export-Csv` converts the -process objects to a series of CSV strings. The **Path** parameter specifies that the `Processes.csv` -file is saved in the current directory. The **UseCulture** parameter uses the current culture's -default list separator as the delimiter. The **NoTypeInformation** parameter removes the **#TYPE** -information header from the CSV output and is not required in PowerShell 6. The `Get-Content` cmdlet -uses the **Path** parameter to display the file located in the current directory. +process objects to a series of CSV strings. The **Path** parameter specifies that the +`Processes.csv` file is saved in the current directory. The **UseCulture** parameter uses the +current culture's default list separator as the delimiter. The **NoTypeInformation** parameter +removes the **#TYPE** information header from the CSV output and is not required in PowerShell 6. +The `Get-Content` cmdlet uses the **Path** parameter to display the file located in the current +directory. ### Example 5: Export processes with type information @@ -177,10 +178,13 @@ This example describes how to export objects to a CSV file and use the **Append* objects to an existing file. ```powershell -$AppService = (Get-Service -DisplayName *Application* | Select-Object -Property DisplayName, Status) +$AppService = (Get-Service -DisplayName *Application* | + Select-Object -Property DisplayName, Status) $AppService | Export-Csv -Path .\Services.Csv -NoTypeInformation Get-Content -Path .\Services.Csv -$WinService = (Get-Service -DisplayName *Windows* | Select-Object -Property DisplayName, Status) + +$WinService = (Get-Service -DisplayName *Windows* | + Select-Object -Property DisplayName, Status) $WinService | Export-Csv -Path .\Services.csv -NoTypeInformation -Append Get-Content -Path .\Services.Csv ``` @@ -219,7 +223,7 @@ unexpected output is received, troubleshoot the pipeline syntax. ```powershell Get-Date | Select-Object -Property DateTime, Day, DayOfWeek, DayOfYear | - Export-Csv -Path .\DateTime.csv -NoTypeInformation + Export-Csv -Path .\DateTime.csv -NoTypeInformation Get-Content -Path .\DateTime.csv ``` @@ -230,7 +234,7 @@ Get-Content -Path .\DateTime.csv ```powershell Get-Date | Format-Table -Property DateTime, Day, DayOfWeek, DayOfYear | - Export-Csv -Path .\FTDateTime.csv -NoTypeInformation + Export-Csv -Path .\FTDateTime.csv -NoTypeInformation Get-Content -Path .\FTDateTime.csv ``` @@ -246,10 +250,10 @@ Get-Content -Path .\FTDateTime.csv The `Get-Date` cmdlet gets the **DateTime** object. The object is sent down the pipeline to the `Select-Object` cmdlet. `Select-Object` uses the **Property** parameter to select a subset of object properties. The object is sent down the pipeline to the `Export-Csv` cmdlet. `Export-Csv` converts -the object to a CSV format. The **Path** parameter specifies that the `DateTime.csv` file is saved in -the current directory. The **NoTypeInformation** parameter removes the **#TYPE** information header -from the CSV output and is not required in PowerShell 6. The `Get-Content` cmdlet uses the **Path** -parameter to display the CSV file located in the current directory. +the object to a CSV format. The **Path** parameter specifies that the `DateTime.csv` file is saved +in the current directory. The **NoTypeInformation** parameter removes the **#TYPE** information +header from the CSV output and is not required in PowerShell 6. The `Get-Content` cmdlet uses the +**Path** parameter to display the CSV file located in the current directory. When the `Format-Table` cmdlet is used within the pipeline to select properties unexpected results are received. `Format-Table` sends table format objects down the pipeline to the `Export-Csv` cmdlet @@ -355,7 +359,7 @@ the file located in the current directory. This example converts a **DateTime** object to a CSV string. ```powershell -Get-Date | Export-Csv -QuoteFields "DateTime","Date" -Path .\FTDateTime.csv +Get-Date | Export-Csv -QuoteFields "DateTime","Date" -Path .\FTDateTime.csv Get-Content -Path .\FTDateTime.csv ``` @@ -369,7 +373,7 @@ DateTime,"Thursday, August 22, 2019 11:27:34 AM","8/22/2019 12:00:00 AM",22,Thur This example converts a **DateTime** object to a CSV string. ```powershell -Get-Date | Export-Csv -UseQuotes AsNeeded -Path .\FTDateTime.csv +Get-Date | Export-Csv -UseQuotes AsNeeded -Path .\FTDateTime.csv Get-Content -Path .\FTDateTime.csv ``` @@ -391,7 +395,7 @@ $person1 = @{ $person2 = @{ Name = 'Jane Smith' - Number = 1 + Number = 2 } $allPeople = $person1, $person2 @@ -490,7 +494,7 @@ The acceptable values for this parameter are as follows: Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code pages (like `-Encoding 1251`) or string names of registered code pages (like `-Encoding "windows-1251"`). For more information, see the .NET documentation for -[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2). +[Encoding.CodePage](xref:System.Text.Encoding.CodePage%2A). Starting with PowerShell 7.4, you can use the `Ansi` value for the **Encoding** parameter to pass the numeric ID for the current culture's ANSI code page without having to specify it manually. diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Export-FormatData.md b/reference/7.5/Microsoft.PowerShell.Utility/Export-FormatData.md index c0ecf0b00716..fe9cc940f8bf 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Export-FormatData.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Export-FormatData.md @@ -18,35 +18,37 @@ Saves formatting data from the current session in a formatting file. ### ByPath (Default) ``` -Export-FormatData -InputObject -Path [-Force] [-NoClobber] - [-IncludeScriptBlock] [] +Export-FormatData -InputObject -Path [-Force] + [-NoClobber] [-IncludeScriptBlock] [] ``` ### ByLiteralPath ``` -Export-FormatData -InputObject -LiteralPath [-Force] [-NoClobber] - [-IncludeScriptBlock] [] +Export-FormatData -InputObject -LiteralPath [-Force] + [-NoClobber] [-IncludeScriptBlock] [] ``` ## DESCRIPTION -The `Export-FormatData` cmdlet creates PowerShell formatting files (format.ps1xml) from -the formatting objects in the current session. It takes the **ExtendedTypeDefinition** objects that +The `Export-FormatData` cmdlet creates PowerShell formatting files (format.ps1xml) from the +formatting objects in the current session. It takes the **ExtendedTypeDefinition** objects that `Get-FormatData` returns and saves them in a file in XML format. -PowerShell uses the data in formatting files (format.ps1xml) to generate the default display -of Microsoft .NET Framework objects in the session. You can view and edit the formatting files and +PowerShell uses the data in formatting files (format.ps1xml) to generate the default display of +Microsoft .NET Framework objects in the session. You can view and edit the formatting files and use the Update-FormatData cmdlet to add the formatting data to a session. -For more information about formatting files in PowerShell, see [about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md). +For more information about formatting files in PowerShell, see +[about_Format.ps1xml](../Microsoft.PowerShell.Core/About/about_Format.ps1xml.md). ## EXAMPLES ### Example 1: Export session format data ```powershell -Get-FormatData -TypeName "*" | Export-FormatData -Path "allformat.ps1xml" -IncludeScriptBlock +Get-FormatData -TypeName "*" | + Export-FormatData -Path "AllFormat.ps1xml" -IncludeScriptBlock ``` This command exports all of the format data in the session to the AllFormat.ps1xml file. @@ -55,7 +57,7 @@ The command uses the `Get-FormatData` cmdlet to get the format data in the sessi (all) for the **TypeName** parameter directs the cmdlet to get all of the data in the session. The command uses a pipeline operator (`|`) to send the format data from the `Get-FormatData` command -to the `Export-FormatData` cmdlet, which exports the format data to the AllFormat.ps1 file. +to the `Export-FormatData` cmdlet, which exports the format data to the AllFormat.ps1xml file. The `Export-FormatData` command uses the **IncludeScriptBlock** parameter to include script blocks in the format data in the file. @@ -63,8 +65,8 @@ in the format data in the file. ### Example 2: Export format data for a type ```powershell -$F = Get-FormatData -TypeName "helpinfoshort" -Export-FormatData -InputObject $F -Path "c:\test\help.format.ps1xml" -IncludeScriptBlock +$F = Get-FormatData -TypeName "HelpInfoShort" +Export-FormatData -InputObject $F -Path "c:\test\Help.format.ps1xml" -IncludeScriptBlock ``` These commands export the format data for the **HelpInfoShort** type to the Help.format.ps1xml file. @@ -79,8 +81,9 @@ script blocks in the output. ### Example 3: Export format data without a script block ```powershell -Get-FormatData -TypeName "System.Diagnostics.Process" | Export-FormatData -Path process.format.ps1xml -Update-FormatData -PrependPath ".\process.format.ps1xml" +Get-FormatData -TypeName "System.Diagnostics.Process" | + Export-FormatData -Path process.format.ps1xml +Update-FormatData -PrependPath ".\Process.format.ps1xml" Get-Process p* ``` @@ -103,9 +106,9 @@ it to the Process.format.ps1xml file in the current directory. In this case, the `Export-FormatData` command does not use the **IncludeScriptBlock** parameter. The second command uses the `Update-FormatData` cmdlet to add the Process.format.ps1xml file to the -current session. The command uses the **PrependPath** parameter to ensure that the formatting data for -process objects in the Process.format.ps1xml file is found before the standard formatting data for -process objects. +current session. The command uses the **PrependPath** parameter to ensure that the formatting data +for process objects in the Process.format.ps1xml file is found before the standard formatting data +for process objects. The third command shows the effects of this change. The command uses the `Get-Process` cmdlet to get processes that have names that begin with P. The output shows that property values that are @@ -205,9 +208,9 @@ Accept wildcard characters: False ### -Path -Specifies a location for the output file. -Enter a path (optional) and file name with a format.ps1xml file name extension. -If you omit the path, `Export-FormatData` creates the file in the current directory. +Specifies a location for the output file. Enter a path (optional) and file name with a +format.ps1xml file name extension. If you omit the path, `Export-FormatData` creates the file in +the current directory. If you use a file name extension other than .ps1xml, the `Update-FormatData` cmdlet will not recognize the file. @@ -232,7 +235,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Export-PSSession.md b/reference/7.5/Microsoft.PowerShell.Utility/Export-PSSession.md index 62d69e728187..82bb4f3ae7f1 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Export-PSSession.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Export-PSSession.md @@ -11,7 +11,6 @@ title: Export-PSSession # Export-PSSession ## SYNOPSIS - Exports commands from another session and saves them in a PowerShell module. ## SYNTAX @@ -21,9 +20,9 @@ Exports commands from another session and saves them in a PowerShell module. ``` Export-PSSession [-OutputModule] [-Force] [-Encoding ] [[-CommandName] ] [-AllowClobber] [-ArgumentList ] - [-CommandType ] [-Module ] [-FullyQualifiedModule ] - [[-FormatTypeName] ] [-Certificate ] [-Session] - [] + [-CommandType ] [-Module ] + [-FullyQualifiedModule ] [[-FormatTypeName] ] + [-Certificate ] [-Session] [] ``` ## DESCRIPTION @@ -69,8 +68,23 @@ formatting data into the Server01 module. This example exports all of the `Get` and `Set` commands from a server. ```powershell -$S = New-PSSession -ConnectionUri https://exchange.microsoft.com/mailbox -Credential exchangeadmin01@hotmail.com -Authentication Negotiate -Export-PSSession -Session $S -Module exch* -CommandName Get-*, Set-* -FormatTypeName * -OutputModule $PSHOME\Modules\Exchange -Encoding ASCII +$newSession = @{ + ConnectionUri = 'https://exchange.microsoft.com/mailbox' + Credential = 'exchangeadmin01@hotmail.com' + Authentication = 'Negotiate' +} +$S = New-PSSession @newSession + +$exportSession = @{ + Session = $S + Module = 'exch*' + CommandName = 'Get-*', 'Set-*' + FormatTypeName = '*' + OutputModule = "$PSHOME\Modules\Exchange" + Encoding = 'ASCII' +} + +Export-PSSession @exportSession ``` These commands export the `Get` and `Set` commands from a Microsoft Exchange Server snap-in on a @@ -85,8 +99,21 @@ the local computer. The cmdlets from the module are added to the current session be used. ```powershell -$S = New-PSSession -ComputerName Server01 -Credential Server01\User01 -Export-PSSession -Session $S -OutputModule TestCmdlets -Type Cmdlet -CommandName *test* -FormatTypeName * +$newSession = @{ + ComputerName = 'Server01' + Credential = 'Server01\User01' +} +$S = New-PSSession @newSession + +$exportSession = @{ + Session = $S + OutputModule = 'TestCmdlets' + Type = 'Cmdlet' + CommandName = '*test*' + FormatTypeName = '*' +} +Export-PSSession @exportSession + Remove-PSSession $S Import-Module TestCmdlets Get-Help Test* @@ -264,7 +291,8 @@ The acceptable values for this parameter are as follows: (`$env:path`). - `Filter` and `Function`: All PowerShell functions. - `Script` Script blocks in the current session. -- `Workflow` A PowerShell workflow. For more information, see [about_Workflows](/powershell/module/PSWorkflow/About/about_Workflows). +- `Workflow` A PowerShell workflow. For more information, see + [about_Workflows](/powershell/module/PSWorkflow/About/about_Workflows). These values are defined as a flag-based enumeration. You can combine multiple values together to set multiple flags using this parameter. The values can be passed to the **CommandType** parameter @@ -307,7 +335,7 @@ The acceptable values for this parameter are as follows: Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code pages (like `-Encoding 1251`) or string names of registered code pages (like `-Encoding "windows-1251"`). For more information, see the .NET documentation for -[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2). +[Encoding.CodePage](xref:System.Text.Encoding.CodePage%2a). Starting with PowerShell 7.4, you can use the `Ansi` value for the **Encoding** parameter to pass the numeric ID for the current culture's ANSI code page without having to specify it manually. diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Format-Custom.md b/reference/7.5/Microsoft.PowerShell.Utility/Format-Custom.md index 0fe5ee3f95db..28f68bc07226 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Format-Custom.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Format-Custom.md @@ -16,9 +16,9 @@ Uses a customized view to format the output. ## SYNTAX ``` -Format-Custom [[-Property] ] [-Depth ] [-GroupBy ] [-View ] - [-ShowError] [-DisplayError] [-Force] [-Expand ] [-InputObject ] - [] +Format-Custom [[-Property] ] [-Depth ] [-GroupBy ] + [-View ] [-ShowError] [-DisplayError] [-Force] [-Expand ] + [-InputObject ] [] ``` ## DESCRIPTION @@ -65,7 +65,6 @@ class DateTime $_ / $null = #ERR } - PC /> Get-Date | Format-Custom DayOfWeek,{ $_ / $null } -ShowError class DateTime diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Format-Hex.md b/reference/7.5/Microsoft.PowerShell.Utility/Format-Hex.md index 534f444f9cb7..e4afdcb0c899 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Format-Hex.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Format-Hex.md @@ -11,7 +11,6 @@ title: Format-Hex # Format-Hex ## SYNOPSIS - Displays a file or other input as hexadecimal. ## SYNTAX @@ -31,8 +30,8 @@ Format-Hex -LiteralPath [-Count ] [-Offset ] [ [-Encoding ] [-Count ] [-Offset ] [-Raw] - [] +Format-Hex -InputObject [-Encoding ] [-Count ] + [-Offset ] [-Raw] [] ``` ## DESCRIPTION @@ -107,7 +106,8 @@ It will pass each object through the Pipeline and process individually. However, data, and the adjacent object is also numeric, it will group them into a single output block. ```powershell -'Hello world!', 1, 1138, 'foo', 'bar', 0xdeadbeef, 1gb, 0b1101011100 , $true, $false | Format-Hex +'Hello world!', 1, 1138, 'foo', 'bar', 0xdeadbeef, 1gb, 0b1101011100 , $true, $false | + Format-Hex ``` ```Output @@ -197,7 +197,7 @@ The acceptable values for this parameter are as follows: Beginning with PowerShell 6.2, the **Encoding** parameter also allows numeric IDs of registered code pages (like `-Encoding 1251`) or string names of registered code pages (like `-Encoding "windows-1251"`). For more information, see the .NET documentation for -[Encoding.CodePage](/dotnet/api/system.text.encoding.codepage?view=netcore-2.2). +[Encoding.CodePage](xref:System.Text.Encoding.CodePage%2A). Starting with PowerShell 7.4, you can use the `Ansi` value for the **Encoding** parameter to pass the numeric ID for the current culture's ANSI code page without having to specify it manually. @@ -259,7 +259,8 @@ Specifies the complete path to a file. The value of **LiteralPath** is used exac This parameter does not accept wildcard characters. To specify multiple paths to files, separate the paths with a comma. If the **LiteralPath** parameter includes escape characters, enclose the path in single quotation marks. PowerShell does not interpret any characters in a single quoted string as -escape sequences. For more information, see [about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +escape sequences. For more information, see +[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] @@ -330,7 +331,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Format-List.md b/reference/7.5/Microsoft.PowerShell.Utility/Format-List.md index a6434552ca82..da1fff2ae34c 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Format-List.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Format-List.md @@ -17,7 +17,8 @@ Formats the output as a list of properties in which each property appears on a n ``` Format-List [[-Property] ] [-GroupBy ] [-View ] [-ShowError] - [-DisplayError] [-Force] [-Expand ] [-InputObject ] [] + [-DisplayError] [-Force] [-Expand ] [-InputObject ] + [] ``` ## DESCRIPTION @@ -92,12 +93,12 @@ The following examples show of the results of adding the **DisplayError** or **S parameters with an expression. ```powershell -PC /> Get-Date | Format-List DayOfWeek,{ $_ / $null } -DisplayError +PC /> Get-Date | Format-List DayOfWeek, { $_ / $null } -DisplayError DayOfWeek : Friday $_ / $null : #ERR -PC /> Get-Date | Format-List DayOfWeek,{ $_ / $null } -ShowError +PC /> Get-Date | Format-List DayOfWeek, { $_ / $null } -ShowError DayOfWeek : Friday $_ / $null : @@ -340,11 +341,11 @@ parameter under any of the following conditions: - The wrapper types include: - - [System.Management.Automation.ErrorRecord](/dotnet/api/System.Management.Automation.ErrorRecord) - - [System.Management.Automation.WarningRecord](/dotnet/api/System.Management.Automation.WarningRecord) - - [System.Management.Automation.VerboseRecord](/dotnet/api/System.Management.Automation.VerboseRecord) - - [System.Management.Automation.DebugRecord](/dotnet/api/System.Management.Automation.DebugRecord) - - [System.Management.Automation.InformationRecord](/dotnet/api/System.Management.Automation.InformationRecord) + - [System.Management.Automation.ErrorRecord](xref:System.Management.Automation.ErrorRecord) + - [System.Management.Automation.WarningRecord](xref:System.Management.Automation.WarningRecord) + - [System.Management.Automation.VerboseRecord](xref:System.Management.Automation.VerboseRecord) + - [System.Management.Automation.DebugRecord](xref:System.Management.Automation.DebugRecord) + - [System.Management.Automation.InformationRecord](xref:System.Management.Automation.InformationRecord) ## RELATED LINKS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Format-Table.md b/reference/7.5/Microsoft.PowerShell.Utility/Format-Table.md index 67d410f13b96..e0b47690f37a 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Format-Table.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Format-Table.md @@ -18,9 +18,9 @@ Formats the output as a table. ### All ``` -Format-Table [[-Property] ] [-AutoSize] [-RepeatHeader] [-HideTableHeaders] [-Wrap] - [-GroupBy ] [-View ] [-ShowError] [-DisplayError] [-Force] [-Expand ] - [-InputObject ] [] +Format-Table [[-Property] ] [-AutoSize] [-RepeatHeader] [-HideTableHeaders] + [-Wrap] [-GroupBy ] [-View ] [-ShowError] [-DisplayError] [-Force] + [-Expand ] [-InputObject ] [] ``` ## DESCRIPTION @@ -60,7 +60,8 @@ table. The **AutoSize** parameter adjusts the column widths to minimize truncati In this example, processes are displayed in groups that have the same **BasePriority** property. ```powershell -Get-Process | Sort-Object -Property BasePriority | Format-Table -GroupBy BasePriority -Wrap +Get-Process | Sort-Object -Property BasePriority | + Format-Table -GroupBy BasePriority -Wrap ``` The `Get-Process` cmdlet gets objects that represent each process on the computer and sends them @@ -141,7 +142,7 @@ Get-Service | Format-Table -Property Name, DependentServices displayed in the table. **Name** and **DependentServices** are two of the object type's properties. To view all the -properties: `Get-Service | Get-Member -MemberType Properties`. +properties: `Get-Service | Get-Member -MemberType Properties` ### Example 6: Format a process and calculate its running time @@ -151,7 +152,10 @@ process from the current time. ```powershell Get-Process notepad | - Format-Table ProcessName, @{Label="TotalRunningTime"; Expression={(Get-Date) - $_.StartTime}} + Format-Table ProcessName, @{ + Label = "TotalRunningTime" + Expression = {(Get-Date) - $_.StartTime} +} ``` ```Output @@ -180,7 +184,7 @@ from remote computers. $Processes = Get-CimInstance -Class win32_process -Filter "name='notepad.exe'" $Processes | Format-Table ProcessName, @{ Label = "Total Running Time" - Expression={(Get-Date) - $_.CreationDate} + Expression = {(Get-Date) - $_.CreationDate} } ``` @@ -210,7 +214,7 @@ The following examples show the results of adding the **DisplayError** or **Show with an expression. ```powershell -Get-Date | Format-Table DayOfWeek,{ $_ / $null } -DisplayError +Get-Date | Format-Table DayOfWeek, { $_ / $null } -DisplayError ``` ```Output @@ -220,7 +224,7 @@ Wednesday #ERR ``` ```powershell -Get-Date | Format-Table DayOfWeek,{ $_ / $null } -ShowError +Get-Date | Format-Table DayOfWeek, { $_ / $null } -ShowError ``` ```Output @@ -272,8 +276,8 @@ Accept wildcard characters: False Specifies the format of the collection object and the objects in the collection. This parameter is designed to format objects that support the -[ICollection](/dotnet/api/system.collections.icollection) -([System.Collections](/dotnet/api/system.collections)) interface. The default value is **EnumOnly**. +[ICollection](xref:System.Collections.ICollection)([System.Collections](xref:System.Collections)) +interface. The default value is **EnumOnly**. The acceptable values for this parameter are as follows: - **EnumOnly**: Displays the properties of the objects in the collection. @@ -542,11 +546,11 @@ parameter under any of the following conditions: - The wrapper types include: - - [System.Management.Automation.ErrorRecord](/dotnet/api/System.Management.Automation.ErrorRecord) - - [System.Management.Automation.WarningRecord](/dotnet/api/System.Management.Automation.WarningRecord) - - [System.Management.Automation.VerboseRecord](/dotnet/api/System.Management.Automation.VerboseRecord) - - [System.Management.Automation.DebugRecord](/dotnet/api/System.Management.Automation.DebugRecord) - - [System.Management.Automation.InformationRecord](/dotnet/api/System.Management.Automation.InformationRecord) + - [System.Management.Automation.ErrorRecord](xref:System.Management.Automation.ErrorRecord) + - [System.Management.Automation.WarningRecord](xref:System.Management.Automation.WarningRecord) + - [System.Management.Automation.VerboseRecord](xref:System.Management.Automation.VerboseRecord) + - [System.Management.Automation.DebugRecord](xref:System.Management.Automation.DebugRecord) + - [System.Management.Automation.InformationRecord](xref:System.Management.Automation.InformationRecord) ## RELATED LINKS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Format-Wide.md b/reference/7.5/Microsoft.PowerShell.Utility/Format-Wide.md index a5b65e46b479..03b8a5731638 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Format-Wide.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Format-Wide.md @@ -16,9 +16,9 @@ Formats objects as a wide table that displays only one property of each object. ## SYNTAX ``` -Format-Wide [[-Property] ] [-AutoSize] [-Column ] [-GroupBy ] [-View ] - [-ShowError] [-DisplayError] [-Force] [-Expand ] [-InputObject ] - [] +Format-Wide [[-Property] ] [-AutoSize] [-Column ] [-GroupBy ] + [-View ] [-ShowError] [-DisplayError] [-Force] [-Expand ] + [-InputObject ] [] ``` ## DESCRIPTION @@ -46,7 +46,7 @@ output. The **Column** parameter specifies the number of columns. This command displays the names of registry keys in the `HKEY_CURRENT_USER\Software\Microsoft` key. ```powershell -Get-ChildItem HKCU:\software\microsoft | Format-Wide -Property pschildname -AutoSize +Get-ChildItem HKCU:\software\microsoft | Format-Wide -Property PSChildName -AutoSize ``` The `Get-ChildItem` cmdlet gets objects representing the keys. The path is specified as `HKCU:`, one diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Get-Alias.md b/reference/7.5/Microsoft.PowerShell.Utility/Get-Alias.md index 2e7b421a0c26..a2491d74829e 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Get-Alias.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Get-Alias.md @@ -18,13 +18,15 @@ Gets the aliases for the current session. ### Default (Default) ``` -Get-Alias [[-Name] ] [-Exclude ] [-Scope ] [] +Get-Alias [[-Name] ] [-Exclude ] [-Scope ] + [] ``` ### Definition ``` -Get-Alias [-Exclude ] [-Scope ] [-Definition ] [] +Get-Alias [-Exclude ] [-Scope ] [-Definition ] + [] ``` ## DESCRIPTION @@ -98,7 +100,7 @@ command provides a quick way to find the aliases that are built into PowerShell, the **ReadOnly** option. **Options** is just one property of the **AliasInfo** objects that `Get-Alias` gets. To find all -properties and methods of **AliasInfo** objects, type `Get-Alias | get-member`. +properties and methods of **AliasInfo** objects, type `Get-Alias | Get-Member`. ### Example 5: Get aliases by name and filter by beginning letter @@ -180,7 +182,8 @@ are: - A number relative to the current scope (0 through the number of scopes, where 0 is the current scope and 1 is its parent) -`Local` is the default. For more information, see [about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). +`Local` is the default. For more information, see +[about_Scopes](../Microsoft.PowerShell.Core/About/about_Scopes.md). ```yaml Type: System.String @@ -198,7 +201,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Get-Culture.md b/reference/7.5/Microsoft.PowerShell.Utility/Get-Culture.md index 5fe60063e3f5..badb993c9411 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Get-Culture.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Get-Culture.md @@ -40,9 +40,9 @@ information about the current language settings on the system, such as the keybo display format of items such as numbers, currency, and dates. You can also use the `Get-UICulture` cmdlet, which gets the current user interface culture on the -system, and the [Set-Culture](/powershell/module/international/set-culture) cmdlet in the -International module. The user-interface (UI) culture determines which text strings are used for -user interface elements, such as menus and messages. +system, and the [Set-Culture](xref:International.Set-Culture) cmdlet in the International module. +The user-interface (UI) culture determines which text strings are used for user interface elements, +such as menus and messages. ## EXAMPLES @@ -249,6 +249,6 @@ culture. ## RELATED LINKS -[Set-Culture](/powershell/module/international/set-culture) +[Set-Culture](xref:International.Set-Culture) [Get-UICulture](Get-UICulture.md) diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Get-Date.md b/reference/7.5/Microsoft.PowerShell.Utility/Get-Date.md index 879f86488a3d..06db07435b27 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Get-Date.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Get-Date.md @@ -18,33 +18,33 @@ Gets the current date and time. ### DateAndFormat (Default) ``` -Get-Date [[-Date] ] [-Year ] [-Month ] [-Day ] [-Hour ] - [-Minute ] [-Second ] [-Millisecond ] [-DisplayHint ] - [-Format ] [-AsUTC] [] +Get-Date [[-Date] ] [-Year ] [-Month ] [-Day ] + [-Hour ] [-Minute ] [-Second ] [-Millisecond ] + [-DisplayHint ] [-Format ] [-AsUTC] [] ``` ### DateAndUFormat ``` -Get-Date [[-Date] ] [-Year ] [-Month ] [-Day ] [-Hour ] - [-Minute ] [-Second ] [-Millisecond ] [-DisplayHint ] - -UFormat [] +Get-Date [[-Date] ] [-Year ] [-Month ] [-Day ] + [-Hour ] [-Minute ] [-Second ] [-Millisecond ] + [-DisplayHint ] -UFormat [] ``` ### UnixTimeSecondsAndFormat ``` -Get-Date -UnixTimeSeconds [-Year ] [-Month ] [-Day ] [-Hour ] - [-Minute ] [-Second ] [-Millisecond ] [-DisplayHint ] - [-Format ] [-AsUTC] [] +Get-Date -UnixTimeSeconds [-Year ] [-Month ] [-Day ] + [-Hour ] [-Minute ] [-Second ] [-Millisecond ] + [-DisplayHint ] [-Format ] [-AsUTC] [] ``` ### UnixTimeSecondsAndUFormat ``` -Get-Date -UnixTimeSeconds [-Year ] [-Month ] [-Day ] [-Hour ] - [-Minute ] [-Second ] [-Millisecond ] [-DisplayHint ] - -UFormat [] +Get-Date -UnixTimeSeconds [-Year ] [-Month ] [-Day ] + [-Hour ] [-Minute ] [-Second ] [-Millisecond ] + [-DisplayHint ] -UFormat [] ``` ## DESCRIPTION diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Get-Error.md b/reference/7.5/Microsoft.PowerShell.Utility/Get-Error.md index c23ddc88e0a6..25147b0b6f5e 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Get-Error.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Get-Error.md @@ -11,7 +11,6 @@ title: Get-Error # Get-Error ## SYNOPSIS - Gets and displays the most recent error messages from the current session. ## SYNTAX @@ -47,7 +46,7 @@ In this example, `Get-Error` displays the details of the most recent error that current session. ```powershell -Get-Childitem -path /NoRealDirectory +Get-ChildItem -Path /NoRealDirectory Get-Error ``` @@ -86,11 +85,11 @@ InvocationInfo : ScriptLineNumber : 1 OffsetInLine : 1 HistoryId : 57 - Line : Get-Childitem -path c:\NoRealDirectory + Line : Get-ChildItem -Path c:\NoRealDirectory PositionMessage : At line:1 char:1 - + Get-Childitem -path c:\NoRealDirectory + + Get-ChildItem -Path c:\NoRealDirectory + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - InvocationName : Get-Childitem + InvocationName : Get-ChildItem CommandOrigin : Internal ScriptStackTrace : at , : line 1 PipelineIterationInfo : @@ -155,7 +154,8 @@ Accept wildcard characters: False This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, --WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Get-EventSubscriber.md b/reference/7.5/Microsoft.PowerShell.Utility/Get-EventSubscriber.md index be5b11365762..59f3807fe7c5 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Get-EventSubscriber.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Get-EventSubscriber.md @@ -63,7 +63,12 @@ Elapsed Event System.Timers.ElapsedEventHandler Elapsed(System.Object, Sys ``` ```powershell -Register-ObjectEvent -InputObject $Timer -EventName Elapsed -SourceIdentifier Timer.Elapsed +$params = @{ + InputObject = $Timer + EventName = 'Elapsed' + SourceIdentifier = 'Timer.Elapsed' +} +Register-ObjectEvent @params Get-EventSubscriber ``` @@ -113,7 +118,7 @@ Id Name State HasMoreData Location Command ```powershell $Timer.Enabled = $True $Subscriber = Get-EventSubscriber -SourceIdentifier Timer.Random -($Subscriber.action).gettype().fullname +($Subscriber.Action).GetType().FullName ``` ```Output @@ -121,7 +126,7 @@ System.Management.Automation.PSEventJob ``` ```powershell -$Subscriber.action | Format-List -Property * +$Subscriber.Action | Format-List -Property * ``` ```Output @@ -141,7 +146,7 @@ ChildJobs : {} ``` ```powershell -& $Subscriber.action.module {$Random} +& $Subscriber.Action.Module {$Random} ``` The third command uses the `Register-ObjectEvent` cmdlet to register the Elapsed event of the timer diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Get-FileHash.md b/reference/7.5/Microsoft.PowerShell.Utility/Get-FileHash.md index 3e99b661eb70..f5425b612b15 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Get-FileHash.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Get-FileHash.md @@ -90,14 +90,18 @@ Path : C:\Users\user1\Downloads\Contoso8_1_ENT.iso ### Example 3: Compute the hash value of a stream -For this example, we get are using **System.Net.WebClient** to download a package from the -[Powershell release page](https://github.com/PowerShell/PowerShell/releases/tag/v6.2.4). The release +For this example, we are using **System.Net.WebClient** to download a package from the +[PowerShell release page](https://github.com/PowerShell/PowerShell/releases/tag/v6.2.4). The release page also documents the SHA256 hash of each package file. We can compare the published hash value with the one we calculate with `Get-FileHash`. ```powershell $wc = [System.Net.WebClient]::new() -$pkgurl = 'https://github.com/PowerShell/PowerShell/releases/download/v6.2.4/powershell_6.2.4-1.debian.9_amd64.deb' + +$baseurl = 'https://github.com/PowerShell/PowerShell/releases/download/v6.2.4/' +$pkgname = 'powershell_6.2.4-1.debian.9_amd64.deb' +$pkgurl = $baseurl + $pkgname + $publishedHash = '8E28E54D601F0751922DE24632C1E716B4684876255CF82304A9B19E89A9CCAC' $FileHash = Get-FileHash -InputStream ($wc.OpenRead($pkgurl)) $FileHash.Hash -eq $publishedHash diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Get-FormatData.md b/reference/7.5/Microsoft.PowerShell.Utility/Get-FormatData.md index 7ee9a19063be..790f72799c22 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Get-FormatData.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Get-FormatData.md @@ -16,7 +16,8 @@ Gets the formatting data in the current session. ## SYNTAX ``` -Get-FormatData [[-TypeName] ] [-PowerShellVersion ] [] +Get-FormatData [[-TypeName] ] [-PowerShellVersion ] + [] ``` ## DESCRIPTION @@ -69,7 +70,7 @@ HelpInfoShort {help , TableControl} ``` ```powershell -$F.FormatViewDefinition[0].control +$F.FormatViewDefinition[0].Control ``` ```Output @@ -85,7 +86,7 @@ OutOfBand : False ``` ```powershell -$F.FormatViewDefinition[0].control.Headers +$F.FormatViewDefinition[0].Control.Headers ``` ```Output @@ -104,7 +105,7 @@ data that is added by a module. ```powershell $A = Get-FormatData -Import-Module bitstransfer +Import-Module BitsTransfer $B = Get-FormatData Compare-Object $A $B ``` @@ -132,7 +133,7 @@ identify the format type that the **BitsTransfer** module adds to the session. The fifth command uses the `Get-FormatData` cmdlet to get the format type that the **BitsTransfer** module adds. It uses a pipeline operator (`|`) to send the format type object to the `Export-FormatData` cmdlet, which converts it back to XML and saves it in the specified -`format.ps1xml` file. +`bits.format.ps1xml` file. The final command shows an excerpt of the `format.ps1xml` file content. @@ -156,8 +157,8 @@ TypeNames FormatViewDefinition Specify the version of PowerShell this cmdlet gets for the formatting data. Enter a two digit number separated by a period. -This parameter was added in PowerShell 5.1 to improve compatibility when remoting computers running -older versions of PowerShell. +This parameter was added in PowerShell 5.1 to improve compatibility when remoting to computers +running older versions of PowerShell. ```yaml Type: System.Version diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Get-Host.md b/reference/7.5/Microsoft.PowerShell.Utility/Get-Host.md index 14c0dfe872a8..692025ee213b 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Get-Host.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Get-Host.md @@ -234,7 +234,8 @@ use these features interchangeably. > variable. For more information, see > [about_ANSI_Terminals](../Microsoft.PowerShell.Core/About/about_ANSI_Terminals.md). -For more information, see [about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md). +For more information, see +[about_Automatic_Variables](../Microsoft.PowerShell.Core/About/about_Automatic_Variables.md). ## RELATED LINKS diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Get-PSBreakpoint.md b/reference/7.5/Microsoft.PowerShell.Utility/Get-PSBreakpoint.md index dd8bbc10efcd..2733281dca51 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Get-PSBreakpoint.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Get-PSBreakpoint.md @@ -24,19 +24,22 @@ Get-PSBreakpoint [[-Script] ] [-Runspace ] [] -Command [-Runspace ] [] +Get-PSBreakpoint [[-Script] ] -Command [-Runspace ] + [] ``` ### Variable ``` -Get-PSBreakpoint [[-Script] ] -Variable [-Runspace ] [] +Get-PSBreakpoint [[-Script] ] -Variable [-Runspace ] + [] ``` ### Type ``` -Get-PSBreakpoint [[-Script] ] [-Type] [-Runspace ] [] +Get-PSBreakpoint [[-Script] ] [-Type] [-Runspace ] + [] ``` ### Id diff --git a/reference/7.5/Microsoft.PowerShell.Utility/Get-PSCallStack.md b/reference/7.5/Microsoft.PowerShell.Utility/Get-PSCallStack.md index 6bd897036827..05793891c4db 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/Get-PSCallStack.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/Get-PSCallStack.md @@ -35,7 +35,7 @@ To run a `Get-PSCallStack` command while in the debugger, type `k` or `Get-PSCal ```powershell PS C:\> function my-alias { $p = $args[0] -Get-Alias | where {$_.definition -like "*$p"} | format-table definition, name -auto +Get-Alias | where {$_.Definition -like "*$p"} | Format-Table Definition, Name -Auto } PS C:\ps-test> Set-PSBreakpoint -Command my-alias Command : my-alias @@ -47,18 +47,18 @@ Script : prompt PS C:\> my-alias Get-Content Entering debug mode. Use h or ? for help. Hit Command breakpoint on 'prompt:my-alias' -my-alias get-content +my-alias Get-Content [DBG]: PS C:\ps-test> s $p = $args[0] DEBUG: Stepped to ': $p = $args[0] ' [DBG]: PS C:\ps-test> s -get-alias | Where {$_.Definition -like "*$p*"} | format-table Definition, -[DBG]: PS C:\ps-test>get-pscallstack +Get-Alias | Where {$_.Definition -like "*$p*"} | Format-Table Definition, +[DBG]: PS C:\ps-test>Get-PSCallStack Name CommandLineParameters UnboundArguments Location ---- --------------------- ---------------- -------- prompt {} {} prompt -my-alias {} {get-content} prompt +my-alias {} {Get-Content} prompt prompt {} {} prompt PS C:\> [DBG]: PS C:\ps-test> o diff --git a/reference/module/index.md b/reference/module/index.md index ec5feb0e56f6..c2b7109e6a29 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.1.0,sqlserver-ps +quickFilterColumn2: azps-13.2.0,sqlserver-ps quickFilterColumn3: graph-powershell-1.0,systemcenter-ps-2022 title: PowerShell Module Browser ---