Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Explains how to add parameters to advanced functions.
Locale: en-US
ms.date: 01/02/2025
ms.date: 01/06/2025
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
schema: 2.0.0
title: about_Functions_Advanced_Parameters
Expand Down Expand Up @@ -40,9 +40,9 @@ decimal digits, alphabetic characters, and underscores. For a complete list of
naming rules, see [about_Variables][20].

> [!IMPORTANT]
> It's possible to name a parameter using only decimal digits. Using numeric
> parameter names isn't recommended because it can lead to confusion with
> positional parameters.
> It's possible to define a parameter that starts with a decimal digit.
> Starting parameter names with a digit isn't recommended because PowerShell
> treats them as string values passed as positional parameters.

Consider the following example:

Expand All @@ -58,8 +58,8 @@ function TestFunction {
}
```

If you try to use the parameters, PowerShell interprets them as negative
numbers passed as positional parameter.
If you try to use the parameters, PowerShell interprets them as stings passed
as positional parameter.

```powershell
PS> TestFunction -100 -200 Hello
Expand Down Expand Up @@ -640,6 +640,28 @@ displayed in the `Get-Help -Full` output.

This argument has no effect on optional parameters.

#### DontShow argument

The `DontShow` value is typically used to assist backwards compatibility for a
command where an obsolete parameter cannot be removed. Setting `DontShow` to
`True` hides the parameter from the user for tab expansion and IntelliSense.

PowerShell v7 (and higher) uses `DontShow` to hide the following obsolete
parameters:

- The **NoTypeInformation** parameter of `ConvertTo-Csv` and `Export-Csv`
- The **Raw** parameter of `Format-Hex`
- The **UseBasicParsing** parameter of `Invoke-RestMethod` and
`Invoke-WebRequest`

The `DontShow` argument has the following side effects:

- Affects all parameter sets for the associated parameter, even if there's a
parameter set in which `DontShow` is unused.
- Hides common parameters from tab completion and IntelliSense. `DontShow`
doesn't hide the optional common parameters: **WhatIf**, **Confirm**, or
**UseTransaction**.

### Alias attribute

The **Alias** attribute establishes an alternate name for the parameter.
Expand Down
4 changes: 2 additions & 2 deletions reference/5.1/Microsoft.PowerShell.Host/Start-Transcript.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.ConsoleHost.dll-help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Host
ms.date: 04/30/2024
ms.date: 01/06/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.host/start-transcript?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Start-Transcript
Expand Down Expand Up @@ -91,7 +91,7 @@ $hostname = hostname
$version = $PSVersionTable.PSVersion.ToString()
$datetime = Get-Date -f 'yyyyMMddHHmmss'
$filename = "Transcript-${username}-${hostname}-${version}-${datetime}.txt"
$Transcript = Join-Path -Path $sharepath -ChildPath $filename
$Transcript = (Join-Path -Path $sharepath -ChildPath $filename).ToString()
Start-Transcript
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.Powershell.LocalAccounts.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.LocalAccounts
ms.date: 06/28/2023
ms.date: 01/04/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.localaccounts/new-localgroup?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: New-LocalGroup
Expand Down Expand Up @@ -41,7 +41,7 @@ This command creates a group named SecurityGroup04.

### -Description

Specifies a comment for the group. The maximum length is 48 characters.
Specifies a comment for the group. The maximum length is 256 characters.

```yaml
Type: System.String
Expand All @@ -57,7 +57,7 @@ Accept wildcard characters: False

### -Name

Specifies a name for the group. The maximum length is 256 characters.
Specifies a name for the group. The maximum length is 48 characters.

```yaml
Type: System.String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,10 @@ This cmdlet returns no output. It only writes to the information message stream.

## RELATED LINKS

[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)

[about_Redirection](../Microsoft.PowerShell.Core/About/about_Redirection.md)

[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md)

[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)

[about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md)

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

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

[Write-Output](Write-Output.md)

[Write-Progress](Write-Progress.md)

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

[Write-Warning](Write-Warning.md)

[Write-Output](Write-Output.md)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Explains how to add parameters to advanced functions.
Locale: en-US
ms.date: 01/02/2025
ms.date: 01/06/2025
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
schema: 2.0.0
title: about_Functions_Advanced_Parameters
Expand Down Expand Up @@ -40,9 +40,9 @@ decimal digits, alphabetic characters, and underscores. For a complete list of
naming rules, see [about_Variables][20].

> [!IMPORTANT]
> It's possible to name a parameter using only decimal digits. Using numeric
> parameter names isn't recommended because it can lead to confusion with
> positional parameters.
> It's possible to define a parameter that starts with a decimal digit.
> Starting parameter names with a digit isn't recommended because PowerShell
> treats them as string values passed as positional parameters.

Consider the following example:

Expand All @@ -58,8 +58,8 @@ function TestFunction {
}
```

If you try to use the parameters, PowerShell interprets them as negative
numbers passed as positional parameter.
If you try to use the parameters, PowerShell interprets them as stings passed
as positional parameter.

```powershell
PS> TestFunction -100 -200 Hello
Expand Down Expand Up @@ -629,6 +629,28 @@ displayed in the `Get-Help -Full` output.

This argument has no effect on optional parameters.

#### DontShow argument

The `DontShow` value is typically used to assist backwards compatibility for a
command where an obsolete parameter cannot be removed. Setting `DontShow` to
`True` hides the parameter from the user for tab expansion and IntelliSense.

PowerShell v7 (and higher) uses `DontShow` to hide the following obsolete
parameters:

- The **NoTypeInformation** parameter of `ConvertTo-Csv` and `Export-Csv`
- The **Raw** parameter of `Format-Hex`
- The **UseBasicParsing** parameter of `Invoke-RestMethod` and
`Invoke-WebRequest`

The `DontShow` argument has the following side effects:

- Affects all parameter sets for the associated parameter, even if there's a
parameter set in which `DontShow` is unused.
- Hides common parameters from tab completion and IntelliSense. `DontShow`
doesn't hide the optional common parameters: **WhatIf**, **Confirm**, or
**UseTransaction**.

### Alias attribute

The **Alias** attribute establishes an alternate name for the parameter.
Expand Down
7 changes: 3 additions & 4 deletions reference/7.4/Microsoft.PowerShell.Host/Start-Transcript.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.ConsoleHost.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Host
ms.date: 04/30/2024
ms.date: 01/06/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.host/start-transcript?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Start-Transcript
Expand Down Expand Up @@ -92,7 +92,7 @@ $hostname = hostname
$version = $PSVersionTable.PSVersion.ToString()
$datetime = Get-Date -f 'yyyyMMddHHmmss'
$filename = "Transcript-${username}-${hostname}-${version}-${datetime}.txt"
$Transcript = Join-Path -Path $sharepath -ChildPath $filename
$Transcript = (Join-Path -Path $sharepath -ChildPath $filename).ToString()
Start-Transcript
```

Expand Down Expand Up @@ -262,8 +262,7 @@ Accept wildcard characters: False

### -WhatIf

Shows what would happen if the cmdlet runs.
The cmdlet isn't run.
Shows what would happen if the cmdlet runs. The cmdlet isn't run.

```yaml
Type: System.Management.Automation.SwitchParameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Utility
ms.date: 10/19/2023
ms.date: 01/06/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/write-information?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Write-Information
Expand Down Expand Up @@ -239,12 +239,10 @@ This cmdlet returns no output. It only writes to the information message stream.

## RELATED LINKS

[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)

[about_Redirection](../Microsoft.PowerShell.Core/About/about_Redirection.md)

[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md)

[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)

[about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md)

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

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

[Write-Output](Write-Output.md)

[Write-Progress](Write-Progress.md)

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

[Write-Warning](Write-Warning.md)

[Write-Output](Write-Output.md)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Explains how to add parameters to advanced functions.
Locale: en-US
ms.date: 01/02/2025
ms.date: 01/06/2025
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
schema: 2.0.0
title: about_Functions_Advanced_Parameters
Expand Down Expand Up @@ -40,9 +40,9 @@ decimal digits, alphabetic characters, and underscores. For a complete list of
naming rules, see [about_Variables][20].

> [!IMPORTANT]
> It's possible to name a parameter using only decimal digits. Using numeric
> parameter names isn't recommended because it can lead to confusion with
> positional parameters.
> It's possible to define a parameter that starts with a decimal digit.
> Starting parameter names with a digit isn't recommended because PowerShell
> treats them as string values passed as positional parameters.

Consider the following example:

Expand All @@ -58,8 +58,8 @@ function TestFunction {
}
```

If you try to use the parameters, PowerShell interprets them as negative
numbers passed as positional parameter.
If you try to use the parameters, PowerShell interprets them as stings passed
as positional parameter.

```powershell
PS> TestFunction -100 -200 Hello
Expand Down Expand Up @@ -629,6 +629,28 @@ displayed in the `Get-Help -Full` output.

This argument has no effect on optional parameters.

#### DontShow argument

The `DontShow` value is typically used to assist backwards compatibility for a
command where an obsolete parameter cannot be removed. Setting `DontShow` to
`True` hides the parameter from the user for tab expansion and IntelliSense.

PowerShell v7 (and higher) uses `DontShow` to hide the following obsolete
parameters:

- The **NoTypeInformation** parameter of `ConvertTo-Csv` and `Export-Csv`
- The **Raw** parameter of `Format-Hex`
- The **UseBasicParsing** parameter of `Invoke-RestMethod` and
`Invoke-WebRequest`

The `DontShow` argument has the following side effects:

- Affects all parameter sets for the associated parameter, even if there's a
parameter set in which `DontShow` is unused.
- Hides common parameters from tab completion and IntelliSense. `DontShow`
doesn't hide the optional common parameters: **WhatIf**, **Confirm**, or
**UseTransaction**.

### Alias attribute

The **Alias** attribute establishes an alternate name for the parameter.
Expand Down
7 changes: 3 additions & 4 deletions reference/7.5/Microsoft.PowerShell.Host/Start-Transcript.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.ConsoleHost.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Host
ms.date: 04/30/2024
ms.date: 01/06/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.host/start-transcript?view=powershell-7.5&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Start-Transcript
Expand Down Expand Up @@ -92,7 +92,7 @@ $hostname = hostname
$version = $PSVersionTable.PSVersion.ToString()
$datetime = Get-Date -f 'yyyyMMddHHmmss'
$filename = "Transcript-${username}-${hostname}-${version}-${datetime}.txt"
$Transcript = Join-Path -Path $sharepath -ChildPath $filename
$Transcript = (Join-Path -Path $sharepath -ChildPath $filename).ToString()
Start-Transcript
```

Expand Down Expand Up @@ -262,8 +262,7 @@ Accept wildcard characters: False

### -WhatIf

Shows what would happen if the cmdlet runs.
The cmdlet isn't run.
Shows what would happen if the cmdlet runs. The cmdlet isn't run.

```yaml
Type: System.Management.Automation.SwitchParameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Utility
ms.date: 10/19/2023
ms.date: 01/06/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/write-information?view=powershell-7.5&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Write-Information
Expand Down Expand Up @@ -239,12 +239,10 @@ This cmdlet returns no output. It only writes to the information message stream.

## RELATED LINKS

[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)

[about_Redirection](../Microsoft.PowerShell.Core/About/about_Redirection.md)

[about_CommonParameters](../Microsoft.PowerShell.Core/About/about_CommonParameters.md)

[about_Output_Streams](../Microsoft.PowerShell.Core/About/about_Output_Streams.md)

[about_Preference_Variables](../Microsoft.PowerShell.Core/About/about_Preference_Variables.md)

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

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

[Write-Output](Write-Output.md)

[Write-Progress](Write-Progress.md)

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

[Write-Warning](Write-Warning.md)

[Write-Output](Write-Output.md)
Loading