From 570e2ea5b47601310f03d4fc78f9c84b045d4d54 Mon Sep 17 00:00:00 2001 From: "Michael T Lombardi (He/Him)" Date: Mon, 25 Apr 2022 11:02:37 -0500 Subject: [PATCH 1/3] (AB#1942543) Ensure PSConsoleHostReadLine is translatable (#8760) Prior to this commit, the documentation for PSConsoleHostReadLine did not correctly translate due to the casing of the H2s, which are required to be fully upcased. This commit upcases those items to ensure the documentation can be properly translated. --- .../5.1/PSReadLine/PSConsoleHostReadLine.md | 20 +++++++++--------- .../7.0/PSReadLine/PSConsoleHostReadLine.md | 20 +++++++++--------- .../7.1/PSReadLine/PSConsoleHostReadLine.md | 21 +++++++++---------- .../7.2/PSReadLine/PSConsoleHostReadLine.md | 21 +++++++++---------- .../7.3/PSReadLine/PSConsoleHostReadLine.md | 21 +++++++++---------- 5 files changed, 50 insertions(+), 53 deletions(-) diff --git a/reference/5.1/PSReadLine/PSConsoleHostReadLine.md b/reference/5.1/PSReadLine/PSConsoleHostReadLine.md index a9cecaa9a6fa..3eafede3f8f5 100644 --- a/reference/5.1/PSReadLine/PSConsoleHostReadLine.md +++ b/reference/5.1/PSReadLine/PSConsoleHostReadLine.md @@ -2,7 +2,7 @@ external help file: PSReadLine-help.xml Locale: en-US Module Name: PSReadLine -ms.date: 12/07/2018 +ms.date: 04/25/2022 online version: https://docs.microsoft.com/powershell/module/psreadline/psconsolehostreadline?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 title: PSConsoleHostReadLine @@ -10,16 +10,16 @@ title: PSConsoleHostReadLine # PSConsoleHostReadLine -## Synopsis +## SYNOPSIS This function is the main entry point for PSReadLine. -## Syntax +## SYNTAX ``` PSConsoleHostReadLine ``` -## Description +## DESCRIPTION `PSConsoleHostReadLine` is the main entry point for the PSReadLine module. The PowerShell console host automatically loads the PSReadLine module and calls this function. Under normal operating @@ -29,24 +29,24 @@ The extension point `PSConsoleHostReadLine` is special to the console host. The alias, function, or script with this name. PSReadLine defines this function so that it is called from the console host. -## Examples +## EXAMPLES ### Example 1 This function is not intended to be used from the command line. -## Parameters +## PARAMETERS -## Inputs +## INPUTS ### None -## Outputs +## OUTPUTS ### None -## Notes +## NOTES -## Related links +## RELATED LINKS [about_PSReadLine](./About/about_PSReadLine.md) diff --git a/reference/7.0/PSReadLine/PSConsoleHostReadLine.md b/reference/7.0/PSReadLine/PSConsoleHostReadLine.md index 7eed2da79675..25a8f09230d2 100644 --- a/reference/7.0/PSReadLine/PSConsoleHostReadLine.md +++ b/reference/7.0/PSReadLine/PSConsoleHostReadLine.md @@ -2,7 +2,7 @@ external help file: PSReadLine-help.xml Locale: en-US Module Name: PSReadLine -ms.date: 12/07/2018 +ms.date: 04/25/2022 online version: https://docs.microsoft.com/powershell/module/psreadline/psconsolehostreadline?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 title: PSConsoleHostReadLine @@ -10,16 +10,16 @@ title: PSConsoleHostReadLine # PSConsoleHostReadLine -## Synopsis +## SYNOPSIS This function is the main entry point for PSReadLine. -## Syntax +## SYNTAX ``` PSConsoleHostReadLine ``` -## Description +## DESCRIPTION `PSConsoleHostReadLine` is the main entry point for the PSReadLine module. The PowerShell console host automatically loads the PSReadLine module and calls this function. Under normal operating @@ -29,24 +29,24 @@ The extension point `PSConsoleHostReadLine` is special to the console host. The alias, function, or script with this name. PSReadLine defines this function so that it is called from the console host. -## Examples +## EXAMPLES ### Example 1 This function is not intended to be used from the command line. -## Parameters +## PARAMETERS -## Inputs +## INPUTS ### None -## Outputs +## OUTPUTS ### None -## Notes +## NOTES -## Related links +## RELATED LINKS [about_PSReadLine](./About/about_PSReadLine.md) diff --git a/reference/7.1/PSReadLine/PSConsoleHostReadLine.md b/reference/7.1/PSReadLine/PSConsoleHostReadLine.md index 8b9f8fd157af..7c1439eb6601 100644 --- a/reference/7.1/PSReadLine/PSConsoleHostReadLine.md +++ b/reference/7.1/PSReadLine/PSConsoleHostReadLine.md @@ -2,7 +2,7 @@ external help file: PSReadLine-help.xml Locale: en-US Module Name: PSReadLine -ms.date: 12/07/2018 +ms.date: 04/25/2022 online version: https://docs.microsoft.com/powershell/module/psreadline/psconsolehostreadline?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0 title: PSConsoleHostReadLine @@ -10,16 +10,16 @@ title: PSConsoleHostReadLine # PSConsoleHostReadLine -## Synopsis +## SYNOPSIS This function is the main entry point for PSReadLine. -## Syntax +## SYNTAX ``` PSConsoleHostReadLine ``` -## Description +## DESCRIPTION `PSConsoleHostReadLine` is the main entry point for the PSReadLine module. The PowerShell console host automatically loads the PSReadLine module and calls this function. Under normal operating @@ -29,25 +29,24 @@ The extension point `PSConsoleHostReadLine` is special to the console host. The alias, function, or script with this name. PSReadLine defines this function so that it is called from the console host. -## Examples +## EXAMPLES ### Example 1 This function is not intended to be used from the command line. -## Parameters +## PARAMETERS -## Inputs +## INPUTS ### None -## Outputs +## OUTPUTS ### None -## Notes +## NOTES -## Related links +## RELATED LINKS [about_PSReadLine](./About/about_PSReadLine.md) - diff --git a/reference/7.2/PSReadLine/PSConsoleHostReadLine.md b/reference/7.2/PSReadLine/PSConsoleHostReadLine.md index 8800053491cf..26ba3b1c6017 100644 --- a/reference/7.2/PSReadLine/PSConsoleHostReadLine.md +++ b/reference/7.2/PSReadLine/PSConsoleHostReadLine.md @@ -2,7 +2,7 @@ external help file: PSReadLine-help.xml Locale: en-US Module Name: PSReadLine -ms.date: 12/07/2018 +ms.date: 04/25/2022 online version: https://docs.microsoft.com/powershell/module/psreadline/psconsolehostreadline?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 title: PSConsoleHostReadLine @@ -10,16 +10,16 @@ title: PSConsoleHostReadLine # PSConsoleHostReadLine -## Synopsis +## SYNOPSIS This function is the main entry point for PSReadLine. -## Syntax +## SYNTAX ``` PSConsoleHostReadLine ``` -## Description +## DESCRIPTION `PSConsoleHostReadLine` is the main entry point for the PSReadLine module. The PowerShell console host automatically loads the PSReadLine module and calls this function. Under normal operating @@ -29,25 +29,24 @@ The extension point `PSConsoleHostReadLine` is special to the console host. The alias, function, or script with this name. PSReadLine defines this function so that it is called from the console host. -## Examples +## EXAMPLES ### Example 1 This function is not intended to be used from the command line. -## Parameters +## PARAMETERS -## Inputs +## INPUTS ### None -## Outputs +## OUTPUTS ### None -## Notes +## NOTES -## Related links +## RELATED LINKS [about_PSReadLine](./About/about_PSReadLine.md) - diff --git a/reference/7.3/PSReadLine/PSConsoleHostReadLine.md b/reference/7.3/PSReadLine/PSConsoleHostReadLine.md index 47d5129c4691..73d0c027b1b9 100644 --- a/reference/7.3/PSReadLine/PSConsoleHostReadLine.md +++ b/reference/7.3/PSReadLine/PSConsoleHostReadLine.md @@ -2,7 +2,7 @@ external help file: PSReadLine-help.xml Locale: en-US Module Name: PSReadLine -ms.date: 12/07/2018 +ms.date: 04/25/2022 online version: https://docs.microsoft.com/powershell/module/psreadline/psconsolehostreadline?view=powershell-7.3&WT.mc_id=ps-gethelp schema: 2.0.0 title: PSConsoleHostReadLine @@ -10,16 +10,16 @@ title: PSConsoleHostReadLine # PSConsoleHostReadLine -## Synopsis +## SYNOPSIS This function is the main entry point for PSReadLine. -## Syntax +## SYNTAX ``` PSConsoleHostReadLine ``` -## Description +## DESCRIPTION `PSConsoleHostReadLine` is the main entry point for the PSReadLine module. The PowerShell console host automatically loads the PSReadLine module and calls this function. Under normal operating @@ -29,25 +29,24 @@ The extension point `PSConsoleHostReadLine` is special to the console host. The alias, function, or script with this name. PSReadLine defines this function so that it is called from the console host. -## Examples +## EXAMPLES ### Example 1 This function is not intended to be used from the command line. -## Parameters +## PARAMETERS -## Inputs +## INPUTS ### None -## Outputs +## OUTPUTS ### None -## Notes +## NOTES -## Related links +## RELATED LINKS [about_PSReadLine](./About/about_PSReadLine.md) - From e73d1536a900470c4409371cbe2d4534617c5046 Mon Sep 17 00:00:00 2001 From: "Michael T Lombardi (He/Him)" Date: Mon, 25 Apr 2022 12:21:17 -0500 Subject: [PATCH 2/3] (GH-8759) Update WideControl in about_Format.ps1xml (#8761) Prior to this commit, the section in **about_Format.ps1xml** incorrectly explained the `` tag and did not mention the `` tag at all. This commit updates the section for clarity and documents the `` tag and its valid child tags. --- .../About/about_Format.ps1xml.md | 17 +++++++++++------ .../About/about_Format.ps1xml.md | 17 +++++++++++------ .../About/about_Format.ps1xml.md | 17 +++++++++++------ .../About/about_Format.ps1xml.md | 17 +++++++++++------ .../About/about_Format.ps1xml.md | 17 +++++++++++------ 5 files changed, 55 insertions(+), 30 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md index 23895490c2f8..d61a02871c45 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md @@ -1,7 +1,7 @@ --- description: The `Format.ps1xml` files in PowerShell define the default display of objects in the PowerShell console. You can create your own `Format.ps1xml` files to change the display of objects or to define default displays for new object types that you create in PowerShell. Locale: en-US -ms.date: 11/27/2019 +ms.date: 04/25/2022 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_format.ps1xml?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 title: about Format.ps1xml @@ -376,11 +376,16 @@ that the `` tag is intended to display. ### WideControl tag The `` tag typically contains a `` tag. The -`` tag contains one or more `` tags. A `` -tag typically contains a `` tag that specifies the property to be -displayed at the specified location in the view. The `` tag can -contain a `` tag that specifies how the property is to be -displayed. +`` tag contains one or more `` tags. A `` tag +contains one `` tag. + +A `` tag must include either a `` tag or a +`` tag. A `` tag specifies the property to display at +the specified location in the view. A `` tag specifies a script to +evaluate and display at the specified location in the view. + +A `` tag can contain a `` tag that specifies how to +display the property. ### CustomControl tag diff --git a/reference/7.0/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md b/reference/7.0/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md index ee6d92810d3f..a304d12ab2a0 100644 --- a/reference/7.0/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md +++ b/reference/7.0/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md @@ -1,7 +1,7 @@ --- description: Beginning in PowerShell 6, the default views for objects are defined in PowerShell source code. You can create your own `Format.ps1xml` files to change the display of objects or to define default displays for new object types that you create in PowerShell. Locale: en-US -ms.date: 11/27/2019 +ms.date: 04/25/2022 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_format.ps1xml?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0 title: about Format.ps1xml @@ -280,11 +280,16 @@ that the `` tag is intended to display. ### WideControl tag The `` tag typically contains a `` tag. The -`` tag contains one or more `` tags. A `` -tag typically contains a `` tag that specifies the property to be -displayed at the specified location in the view. The `` tag can -contain a `` tag that specifies how the property is to be -displayed. +`` tag contains one or more `` tags. A `` tag +contains one `` tag. + +A `` tag must include either a `` tag or a +`` tag. A `` tag specifies the property to display at +the specified location in the view. A `` tag specifies a script to +evaluate and display at the specified location in the view. + +A `` tag can contain a `` tag that specifies how to +display the property. ### CustomControl tag diff --git a/reference/7.1/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md b/reference/7.1/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md index 4d93c879815d..a1f8dcef6d58 100644 --- a/reference/7.1/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md +++ b/reference/7.1/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md @@ -1,7 +1,7 @@ --- description: Beginning in PowerShell 6, the default views for objects are defined in PowerShell source code. You can create your own `Format.ps1xml` files to change the display of objects or to define default displays for new object types that you create in PowerShell. Locale: en-US -ms.date: 11/27/2019 +ms.date: 04/25/2022 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_format.ps1xml?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0 title: about Format.ps1xml @@ -280,11 +280,16 @@ that the `` tag is intended to display. ### WideControl tag The `` tag typically contains a `` tag. The -`` tag contains one or more `` tags. A `` -tag typically contains a `` tag that specifies the property to be -displayed at the specified location in the view. The `` tag can -contain a `` tag that specifies how the property is to be -displayed. +`` tag contains one or more `` tags. A `` tag +contains one `` tag. + +A `` tag must include either a `` tag or a +`` tag. A `` tag specifies the property to display at +the specified location in the view. A `` tag specifies a script to +evaluate and display at the specified location in the view. + +A `` tag can contain a `` tag that specifies how to +display the property. ### CustomControl tag diff --git a/reference/7.2/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md b/reference/7.2/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md index 0c4ba5313419..9fcb4c3eafdd 100644 --- a/reference/7.2/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md +++ b/reference/7.2/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md @@ -1,7 +1,7 @@ --- description: Beginning in PowerShell 6, the default views for objects are defined in PowerShell source code. You can create your own `Format.ps1xml` files to change the display of objects or to define default displays for new object types that you create in PowerShell. Locale: en-US -ms.date: 11/27/2019 +ms.date: 04/25/2022 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_format.ps1xml?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 title: about Format.ps1xml @@ -280,11 +280,16 @@ that the `` tag is intended to display. ### WideControl tag The `` tag typically contains a `` tag. The -`` tag contains one or more `` tags. A `` -tag typically contains a `` tag that specifies the property to be -displayed at the specified location in the view. The `` tag can -contain a `` tag that specifies how the property is to be -displayed. +`` tag contains one or more `` tags. A `` tag +contains one `` tag. + +A `` tag must include either a `` tag or a +`` tag. A `` tag specifies the property to display at +the specified location in the view. A `` tag specifies a script to +evaluate and display at the specified location in the view. + +A `` tag can contain a `` tag that specifies how to +display the property. ### CustomControl tag diff --git a/reference/7.3/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md b/reference/7.3/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md index 92824a2418d3..b0b1338b7778 100644 --- a/reference/7.3/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md +++ b/reference/7.3/Microsoft.PowerShell.Core/About/about_Format.ps1xml.md @@ -1,7 +1,7 @@ --- description: Beginning in PowerShell 6, the default views for objects are defined in PowerShell source code. You can create your own `Format.ps1xml` files to change the display of objects or to define default displays for new object types that you create in PowerShell. Locale: en-US -ms.date: 11/27/2019 +ms.date: 04/25/2022 online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_format.ps1xml?view=powershell-7.3&WT.mc_id=ps-gethelp schema: 2.0.0 title: about Format.ps1xml @@ -280,11 +280,16 @@ that the `` tag is intended to display. ### WideControl tag The `` tag typically contains a `` tag. The -`` tag contains one or more `` tags. A `` -tag typically contains a `` tag that specifies the property to be -displayed at the specified location in the view. The `` tag can -contain a `` tag that specifies how the property is to be -displayed. +`` tag contains one or more `` tags. A `` tag +contains one `` tag. + +A `` tag must include either a `` tag or a +`` tag. A `` tag specifies the property to display at +the specified location in the view. A `` tag specifies a script to +evaluate and display at the specified location in the view. + +A `` tag can contain a `` tag that specifies how to +display the property. ### CustomControl tag From a6d911d8ae243a4da58be2c19fc70a6f3a3f7a51 Mon Sep 17 00:00:00 2001 From: "Michael T Lombardi (He/Him)" Date: Mon, 25 Apr 2022 16:10:11 -0500 Subject: [PATCH 3/3] (GH-8757) Clarify remoting in Managing Services (#8762) Prior to this commit, the Managing Services sample in the conceptual documentation included example code using the **ComputerName** parameter for `Get-Service`, but that parameter was removed from the `*-Service` cmdlets in PowerShell 6.0. This commit updates the documentation to distinguish between Windows PowerShell and PowerShell for managing remote services and clarifies how to do so. --- .../samples/Managing-Services.md | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/reference/docs-conceptual/samples/Managing-Services.md b/reference/docs-conceptual/samples/Managing-Services.md index f599e4334274..258c1c892042 100644 --- a/reference/docs-conceptual/samples/Managing-Services.md +++ b/reference/docs-conceptual/samples/Managing-Services.md @@ -49,15 +49,28 @@ Running lanmanserver Server Stopped ServiceLayer ServiceLayer ``` -You can use the ComputerName parameter of the Get-Service cmdlet to get the services on remote -computers. The ComputerName parameter accepts multiple values and wildcard characters, so you can -get the services on multiple computers with a single command. For example, the following command -gets the services on the Server01 remote computer. +## Getting Remote Services + +With Windows PowerShell, you can use the **ComputerName** parameter of the `Get-Service` cmdlet to +get the services on remote computers. The **ComputerName** parameter accepts multiple values and +wildcard characters, so you can get the services on multiple computers with a single command. For +example, the following command gets the services on the Server01 remote computer. ```powershell Get-Service -ComputerName Server01 ``` +Starting in PowerShell 6.0, the `*-Service` cmdlets do not have the **ComputerName** parameter. You +can still get services on remote computers with PowerShell remoting. For example, the following +command gets the services on the Server02 remote computer. + +```powershell +Invoke-Command -ComputerName Server02 -ScriptBlock { Get-Service } +``` + +You can also manage services with the other `*-Service` cmdlets. For more information on PowerShell +remoting, see [about_Remote](/powershell/module/Microsoft.PowerShell.Core/about_Remote). + ## Getting Required and Dependent Services The Get-Service cmdlet has two parameters that are very useful in service administration. The @@ -177,6 +190,7 @@ For more information, see [Set-Service](/powershell/module/Microsoft.PowerShell. ## See Also +- [about_Remote](/powershell/module/Microsoft.PowerShell.Core/about_Remote) - [Get-Service](/powershell/module/Microsoft.PowerShell.Management/get-service) - [Set-Service](/powershell/module/Microsoft.PowerShell.Management/set-service) - [Restart-Service](/powershell/module/Microsoft.PowerShell.Management/restart-service)