Skip to content

Commit 2043a7e

Browse files
authored
Merge pull request #11637 from MicrosoftDocs/main
1/6/2025 PM Publish
2 parents 089afe1 + 5d58a94 commit 2043a7e

File tree

11 files changed

+175
-81
lines changed

11 files changed

+175
-81
lines changed

reference/5.1/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Parameters.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Explains how to add parameters to advanced functions.
33
Locale: en-US
4-
ms.date: 01/02/2025
4+
ms.date: 01/06/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions_advanced_parameters?view=powershell-5.1&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Functions_Advanced_Parameters
@@ -40,9 +40,9 @@ decimal digits, alphabetic characters, and underscores. For a complete list of
4040
naming rules, see [about_Variables][20].
4141

4242
> [!IMPORTANT]
43-
> It's possible to name a parameter using only decimal digits. Using numeric
44-
> parameter names isn't recommended because it can lead to confusion with
45-
> positional parameters.
43+
> It's possible to define a parameter that starts with a decimal digit.
44+
> Starting parameter names with a digit isn't recommended because PowerShell
45+
> treats them as string values passed as positional parameters.
4646
4747
Consider the following example:
4848

@@ -58,8 +58,8 @@ function TestFunction {
5858
}
5959
```
6060

61-
If you try to use the parameters, PowerShell interprets them as negative
62-
numbers passed as positional parameter.
61+
If you try to use the parameters, PowerShell interprets them as stings passed
62+
as positional parameter.
6363

6464
```powershell
6565
PS> TestFunction -100 -200 Hello
@@ -640,6 +640,28 @@ displayed in the `Get-Help -Full` output.
640640

641641
This argument has no effect on optional parameters.
642642

643+
#### DontShow argument
644+
645+
The `DontShow` value is typically used to assist backwards compatibility for a
646+
command where an obsolete parameter cannot be removed. Setting `DontShow` to
647+
`True` hides the parameter from the user for tab expansion and IntelliSense.
648+
649+
PowerShell v7 (and higher) uses `DontShow` to hide the following obsolete
650+
parameters:
651+
652+
- The **NoTypeInformation** parameter of `ConvertTo-Csv` and `Export-Csv`
653+
- The **Raw** parameter of `Format-Hex`
654+
- The **UseBasicParsing** parameter of `Invoke-RestMethod` and
655+
`Invoke-WebRequest`
656+
657+
The `DontShow` argument has the following side effects:
658+
659+
- Affects all parameter sets for the associated parameter, even if there's a
660+
parameter set in which `DontShow` is unused.
661+
- Hides common parameters from tab completion and IntelliSense. `DontShow`
662+
doesn't hide the optional common parameters: **WhatIf**, **Confirm**, or
663+
**UseTransaction**.
664+
643665
### Alias attribute
644666

645667
The **Alias** attribute establishes an alternate name for the parameter.

reference/5.1/Microsoft.PowerShell.Host/Start-Transcript.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.ConsoleHost.dll-help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Host
5-
ms.date: 04/30/2024
5+
ms.date: 01/06/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.host/start-transcript?view=powershell-5.1&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Start-Transcript
@@ -91,7 +91,7 @@ $hostname = hostname
9191
$version = $PSVersionTable.PSVersion.ToString()
9292
$datetime = Get-Date -f 'yyyyMMddHHmmss'
9393
$filename = "Transcript-${username}-${hostname}-${version}-${datetime}.txt"
94-
$Transcript = Join-Path -Path $sharepath -ChildPath $filename
94+
$Transcript = (Join-Path -Path $sharepath -ChildPath $filename).ToString()
9595
Start-Transcript
9696
```
9797

reference/5.1/Microsoft.PowerShell.LocalAccounts/New-LocalGroup.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.Powershell.LocalAccounts.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.LocalAccounts
5-
ms.date: 06/28/2023
5+
ms.date: 01/04/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.localaccounts/new-localgroup?view=powershell-5.1&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: New-LocalGroup
@@ -41,7 +41,7 @@ This command creates a group named SecurityGroup04.
4141

4242
### -Description
4343

44-
Specifies a comment for the group. The maximum length is 48 characters.
44+
Specifies a comment for the group. The maximum length is 256 characters.
4545

4646
```yaml
4747
Type: System.String
@@ -57,7 +57,7 @@ Accept wildcard characters: False
5757
5858
### -Name
5959
60-
Specifies a name for the group. The maximum length is 256 characters.
60+
Specifies a name for the group. The maximum length is 48 characters.
6161
6262
```yaml
6363
Type: System.String

reference/5.1/Microsoft.PowerShell.Utility/Write-Information.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,10 @@ This cmdlet returns no output. It only writes to the information message stream.
216216

217217
## RELATED LINKS
218218

219-
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
220-
221-
[about_Redirection](../Microsoft.PowerShell.Core/About/about_Redirection.md)
222-
223219
[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md)
224220

221+
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
222+
225223
[about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md)
226224

227225
[about_Redirection](../Microsoft.PowerShell.Core/About/about_Redirection.md)
@@ -232,10 +230,10 @@ This cmdlet returns no output. It only writes to the information message stream.
232230

233231
[Write-Information](Write-Information.md)
234232

233+
[Write-Output](Write-Output.md)
234+
235235
[Write-Progress](Write-Progress.md)
236236

237237
[Write-Verbose](Write-Verbose.md)
238238

239239
[Write-Warning](Write-Warning.md)
240-
241-
[Write-Output](Write-Output.md)

reference/7.4/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Parameters.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Explains how to add parameters to advanced functions.
33
Locale: en-US
4-
ms.date: 01/02/2025
4+
ms.date: 01/06/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions_advanced_parameters?view=powershell-7.4&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Functions_Advanced_Parameters
@@ -40,9 +40,9 @@ decimal digits, alphabetic characters, and underscores. For a complete list of
4040
naming rules, see [about_Variables][20].
4141

4242
> [!IMPORTANT]
43-
> It's possible to name a parameter using only decimal digits. Using numeric
44-
> parameter names isn't recommended because it can lead to confusion with
45-
> positional parameters.
43+
> It's possible to define a parameter that starts with a decimal digit.
44+
> Starting parameter names with a digit isn't recommended because PowerShell
45+
> treats them as string values passed as positional parameters.
4646
4747
Consider the following example:
4848

@@ -58,8 +58,8 @@ function TestFunction {
5858
}
5959
```
6060

61-
If you try to use the parameters, PowerShell interprets them as negative
62-
numbers passed as positional parameter.
61+
If you try to use the parameters, PowerShell interprets them as stings passed
62+
as positional parameter.
6363

6464
```powershell
6565
PS> TestFunction -100 -200 Hello
@@ -629,6 +629,28 @@ displayed in the `Get-Help -Full` output.
629629

630630
This argument has no effect on optional parameters.
631631

632+
#### DontShow argument
633+
634+
The `DontShow` value is typically used to assist backwards compatibility for a
635+
command where an obsolete parameter cannot be removed. Setting `DontShow` to
636+
`True` hides the parameter from the user for tab expansion and IntelliSense.
637+
638+
PowerShell v7 (and higher) uses `DontShow` to hide the following obsolete
639+
parameters:
640+
641+
- The **NoTypeInformation** parameter of `ConvertTo-Csv` and `Export-Csv`
642+
- The **Raw** parameter of `Format-Hex`
643+
- The **UseBasicParsing** parameter of `Invoke-RestMethod` and
644+
`Invoke-WebRequest`
645+
646+
The `DontShow` argument has the following side effects:
647+
648+
- Affects all parameter sets for the associated parameter, even if there's a
649+
parameter set in which `DontShow` is unused.
650+
- Hides common parameters from tab completion and IntelliSense. `DontShow`
651+
doesn't hide the optional common parameters: **WhatIf**, **Confirm**, or
652+
**UseTransaction**.
653+
632654
### Alias attribute
633655

634656
The **Alias** attribute establishes an alternate name for the parameter.

reference/7.4/Microsoft.PowerShell.Host/Start-Transcript.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.ConsoleHost.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Host
5-
ms.date: 04/30/2024
5+
ms.date: 01/06/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.host/start-transcript?view=powershell-7.4&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Start-Transcript
@@ -92,7 +92,7 @@ $hostname = hostname
9292
$version = $PSVersionTable.PSVersion.ToString()
9393
$datetime = Get-Date -f 'yyyyMMddHHmmss'
9494
$filename = "Transcript-${username}-${hostname}-${version}-${datetime}.txt"
95-
$Transcript = Join-Path -Path $sharepath -ChildPath $filename
95+
$Transcript = (Join-Path -Path $sharepath -ChildPath $filename).ToString()
9696
Start-Transcript
9797
```
9898

@@ -262,8 +262,7 @@ Accept wildcard characters: False
262262

263263
### -WhatIf
264264

265-
Shows what would happen if the cmdlet runs.
266-
The cmdlet isn't run.
265+
Shows what would happen if the cmdlet runs. The cmdlet isn't run.
267266

268267
```yaml
269268
Type: System.Management.Automation.SwitchParameter

reference/7.4/Microsoft.PowerShell.Utility/Write-Information.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Utility
5-
ms.date: 10/19/2023
5+
ms.date: 01/06/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/write-information?view=powershell-7.4&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Write-Information
@@ -239,12 +239,10 @@ This cmdlet returns no output. It only writes to the information message stream.
239239

240240
## RELATED LINKS
241241

242-
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
243-
244-
[about_Redirection](../Microsoft.PowerShell.Core/About/about_Redirection.md)
245-
246242
[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md)
247243

244+
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
245+
248246
[about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md)
249247

250248
[about_Redirection](../Microsoft.PowerShell.Core/About/about_Redirection.md)
@@ -255,10 +253,10 @@ This cmdlet returns no output. It only writes to the information message stream.
255253

256254
[Write-Information](Write-Information.md)
257255

256+
[Write-Output](Write-Output.md)
257+
258258
[Write-Progress](Write-Progress.md)
259259

260260
[Write-Verbose](Write-Verbose.md)
261261

262262
[Write-Warning](Write-Warning.md)
263-
264-
[Write-Output](Write-Output.md)

reference/7.5/Microsoft.PowerShell.Core/About/about_Functions_Advanced_Parameters.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Explains how to add parameters to advanced functions.
33
Locale: en-US
4-
ms.date: 01/02/2025
4+
ms.date: 01/06/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions_advanced_parameters?view=powershell-7.5&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Functions_Advanced_Parameters
@@ -40,9 +40,9 @@ decimal digits, alphabetic characters, and underscores. For a complete list of
4040
naming rules, see [about_Variables][20].
4141

4242
> [!IMPORTANT]
43-
> It's possible to name a parameter using only decimal digits. Using numeric
44-
> parameter names isn't recommended because it can lead to confusion with
45-
> positional parameters.
43+
> It's possible to define a parameter that starts with a decimal digit.
44+
> Starting parameter names with a digit isn't recommended because PowerShell
45+
> treats them as string values passed as positional parameters.
4646
4747
Consider the following example:
4848

@@ -58,8 +58,8 @@ function TestFunction {
5858
}
5959
```
6060

61-
If you try to use the parameters, PowerShell interprets them as negative
62-
numbers passed as positional parameter.
61+
If you try to use the parameters, PowerShell interprets them as stings passed
62+
as positional parameter.
6363

6464
```powershell
6565
PS> TestFunction -100 -200 Hello
@@ -629,6 +629,28 @@ displayed in the `Get-Help -Full` output.
629629

630630
This argument has no effect on optional parameters.
631631

632+
#### DontShow argument
633+
634+
The `DontShow` value is typically used to assist backwards compatibility for a
635+
command where an obsolete parameter cannot be removed. Setting `DontShow` to
636+
`True` hides the parameter from the user for tab expansion and IntelliSense.
637+
638+
PowerShell v7 (and higher) uses `DontShow` to hide the following obsolete
639+
parameters:
640+
641+
- The **NoTypeInformation** parameter of `ConvertTo-Csv` and `Export-Csv`
642+
- The **Raw** parameter of `Format-Hex`
643+
- The **UseBasicParsing** parameter of `Invoke-RestMethod` and
644+
`Invoke-WebRequest`
645+
646+
The `DontShow` argument has the following side effects:
647+
648+
- Affects all parameter sets for the associated parameter, even if there's a
649+
parameter set in which `DontShow` is unused.
650+
- Hides common parameters from tab completion and IntelliSense. `DontShow`
651+
doesn't hide the optional common parameters: **WhatIf**, **Confirm**, or
652+
**UseTransaction**.
653+
632654
### Alias attribute
633655

634656
The **Alias** attribute establishes an alternate name for the parameter.

reference/7.5/Microsoft.PowerShell.Host/Start-Transcript.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.ConsoleHost.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Host
5-
ms.date: 04/30/2024
5+
ms.date: 01/06/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.host/start-transcript?view=powershell-7.5&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Start-Transcript
@@ -92,7 +92,7 @@ $hostname = hostname
9292
$version = $PSVersionTable.PSVersion.ToString()
9393
$datetime = Get-Date -f 'yyyyMMddHHmmss'
9494
$filename = "Transcript-${username}-${hostname}-${version}-${datetime}.txt"
95-
$Transcript = Join-Path -Path $sharepath -ChildPath $filename
95+
$Transcript = (Join-Path -Path $sharepath -ChildPath $filename).ToString()
9696
Start-Transcript
9797
```
9898

@@ -262,8 +262,7 @@ Accept wildcard characters: False
262262

263263
### -WhatIf
264264

265-
Shows what would happen if the cmdlet runs.
266-
The cmdlet isn't run.
265+
Shows what would happen if the cmdlet runs. The cmdlet isn't run.
267266

268267
```yaml
269268
Type: System.Management.Automation.SwitchParameter

reference/7.5/Microsoft.PowerShell.Utility/Write-Information.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Utility
5-
ms.date: 10/19/2023
5+
ms.date: 01/06/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/write-information?view=powershell-7.5&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Write-Information
@@ -239,12 +239,10 @@ This cmdlet returns no output. It only writes to the information message stream.
239239

240240
## RELATED LINKS
241241

242-
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
243-
244-
[about_Redirection](../Microsoft.PowerShell.Core/About/about_Redirection.md)
245-
246242
[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md)
247243

244+
[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)
245+
248246
[about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md)
249247

250248
[about_Redirection](../Microsoft.PowerShell.Core/About/about_Redirection.md)
@@ -255,10 +253,10 @@ This cmdlet returns no output. It only writes to the information message stream.
255253

256254
[Write-Information](Write-Information.md)
257255

256+
[Write-Output](Write-Output.md)
257+
258258
[Write-Progress](Write-Progress.md)
259259

260260
[Write-Verbose](Write-Verbose.md)
261261

262262
[Write-Warning](Write-Warning.md)
263-
264-
[Write-Output](Write-Output.md)

0 commit comments

Comments
 (0)