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: The Experimental Features support in PowerShell provides a mechanism for experimental features to coexist with existing stable features in PowerShell or PowerShell modules.
Locale: en-US
ms.date: 03/13/2020
ms.date: 11/15/2021
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_experimental_features?view=powershell-7&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about Experimental Features
Expand Down Expand Up @@ -48,7 +48,7 @@ specified and the only valid values are:
- `Show` means to show this experimental feature if the feature is enabled
- `Hide` means to hide this experimental feature if the feature is enabled

### Declaring Experimental Features in Modules Written in C\#
## Declaring Experimental Features in Modules Written in C\#

Module authors who want to use the Experimental Feature flags can declare a
cmdlet as experimental by using the `Experimental` attribute.
Expand All @@ -59,7 +59,7 @@ cmdlet as experimental by using the `Experimental` attribute.
public class InvokeWebRequestCommandV2 : WebCmdletBaseV2 { ... }
```

### Declaring Experimental Features in Modules written in PowerShell
## Declaring Experimental Features in Modules written in PowerShell

Module written in PowerShell can also use the `Experimental` attribute to
declare experimental cmdlets:
Expand All @@ -73,7 +73,32 @@ function Enable-SSHRemoting {
}
```

### Mutually Exclusive Experimental Features
Metadata about an experimental feature is kept in the module manifest. Use the
`PrivateData.PSData.ExperimentalFeatures` property of a module manifest to
expose the experimental features from the module. The `ExperimentalFeatures`
property is an array of hashtables containing the name and description of the
feature.

For example:

```powershell
PrivateData = @{
PSData = @{
ExperimentalFeatures = @(
@{
Name = "PSWebCmdletV2"
Description = "Rewrite the web cmdlets for better performance"
},
@{
Name = "PSRestCmdletV2"
Description = "Rewrite the REST API cmdlets for better performance"
}
)
}
}
```

## Mutually Exclusive Experimental Features

There are cases where an experimental feature cannot co-exist side-by-side with
an existing feature or another experimental feature.
Expand Down Expand Up @@ -108,7 +133,7 @@ When the `MyWebCmdlets.PSWebCmdletV2` experimental feature is enabled, the exist
This allows users to try out the new cmdlet and provide feedback then revert
to the non-experimental version when needed.

### Experimental Parameters in Cmdlets
## Experimental Parameters in Cmdlets

The `Experimental` attribute can also be applied to individual parameters. This
allows you to create an experimental set of parameters for an existing cmdlet
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: The Experimental Features support in PowerShell provides a mechanism for experimental features to coexist with existing stable features in PowerShell or PowerShell modules.
Locale: en-US
ms.date: 03/13/2020
ms.date: 11/15/2021
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_experimental_features?view=powershell-7.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about Experimental Features
Expand Down Expand Up @@ -48,7 +48,7 @@ specified and the only valid values are:
- `Show` means to show this experimental feature if the feature is enabled
- `Hide` means to hide this experimental feature if the feature is enabled

### Declaring Experimental Features in Modules Written in C\#
## Declaring Experimental Features in Modules Written in C\#

Module authors who want to use the Experimental Feature flags can declare a
cmdlet as experimental by using the `Experimental` attribute.
Expand All @@ -59,7 +59,7 @@ cmdlet as experimental by using the `Experimental` attribute.
public class InvokeWebRequestCommandV2 : WebCmdletBaseV2 { ... }
```

### Declaring Experimental Features in Modules written in PowerShell
## Declaring Experimental Features in Modules written in PowerShell

Module written in PowerShell can also use the `Experimental` attribute to
declare experimental cmdlets:
Expand All @@ -73,7 +73,32 @@ function Enable-SSHRemoting {
}
```

### Mutually Exclusive Experimental Features
Metadata about an experimental feature is kept in the module manifest. Use the
`PrivateData.PSData.ExperimentalFeatures` property of a module manifest to
expose the experimental features from the module. The `ExperimentalFeatures`
property is an array of hashtables containing the name and description of the
feature.

For example:

```powershell
PrivateData = @{
PSData = @{
ExperimentalFeatures = @(
@{
Name = "PSWebCmdletV2"
Description = "Rewrite the web cmdlets for better performance"
},
@{
Name = "PSRestCmdletV2"
Description = "Rewrite the REST API cmdlets for better performance"
}
)
}
}
```

## Mutually Exclusive Experimental Features

There are cases where an experimental feature cannot co-exist side-by-side with
an existing feature or another experimental feature.
Expand Down Expand Up @@ -108,7 +133,7 @@ When the `MyWebCmdlets.PSWebCmdletV2` experimental feature is enabled, the exist
This allows users to try out the new cmdlet and provide feedback then revert
to the non-experimental version when needed.

### Experimental Parameters in Cmdlets
## Experimental Parameters in Cmdlets

The `Experimental` attribute can also be applied to individual parameters. This
allows you to create an experimental set of parameters for an existing cmdlet
Expand Down Expand Up @@ -170,4 +195,3 @@ if ([ExperimentalFeature]::IsEnabled("MyModule.MyExperimentalFeature"))
[Disable-ExperimentalFeature](xref:Microsoft.PowerShell.Core.Disable-ExperimentalFeature)

[Get-ExperimentalFeature](xref:Microsoft.PowerShell.Core.Get-ExperimentalFeature)

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: The Experimental Features support in PowerShell provides a mechanism for experimental features to coexist with existing stable features in PowerShell or PowerShell modules.
Locale: en-US
ms.date: 03/13/2020
ms.date: 11/15/2021
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_experimental_features?view=powershell-7.2&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about Experimental Features
Expand Down Expand Up @@ -48,7 +48,7 @@ specified and the only valid values are:
- `Show` means to show this experimental feature if the feature is enabled
- `Hide` means to hide this experimental feature if the feature is enabled

### Declaring Experimental Features in Modules Written in C\#
## Declaring Experimental Features in Modules Written in C\#

Module authors who want to use the Experimental Feature flags can declare a
cmdlet as experimental by using the `Experimental` attribute.
Expand All @@ -59,7 +59,7 @@ cmdlet as experimental by using the `Experimental` attribute.
public class InvokeWebRequestCommandV2 : WebCmdletBaseV2 { ... }
```

### Declaring Experimental Features in Modules written in PowerShell
## Declaring Experimental Features in Modules written in PowerShell

Module written in PowerShell can also use the `Experimental` attribute to
declare experimental cmdlets:
Expand All @@ -73,7 +73,32 @@ function Enable-SSHRemoting {
}
```

### Mutually Exclusive Experimental Features
Metadata about an experimental feature is kept in the module manifest. Use the
`PrivateData.PSData.ExperimentalFeatures` property of a module manifest to
expose the experimental features from the module. The `ExperimentalFeatures`
property is an array of hashtables containing the name and description of the
feature.

For example:

```powershell
PrivateData = @{
PSData = @{
ExperimentalFeatures = @(
@{
Name = "PSWebCmdletV2"
Description = "Rewrite the web cmdlets for better performance"
},
@{
Name = "PSRestCmdletV2"
Description = "Rewrite the REST API cmdlets for better performance"
}
)
}
}
```

## Mutually Exclusive Experimental Features

There are cases where an experimental feature cannot co-exist side-by-side with
an existing feature or another experimental feature.
Expand Down Expand Up @@ -108,7 +133,7 @@ When the `MyWebCmdlets.PSWebCmdletV2` experimental feature is enabled, the exist
This allows users to try out the new cmdlet and provide feedback then revert
to the non-experimental version when needed.

### Experimental Parameters in Cmdlets
## Experimental Parameters in Cmdlets

The `Experimental` attribute can also be applied to individual parameters. This
allows you to create an experimental set of parameters for an existing cmdlet
Expand Down Expand Up @@ -170,4 +195,3 @@ if ([ExperimentalFeature]::IsEnabled("MyModule.MyExperimentalFeature"))
[Disable-ExperimentalFeature](xref:Microsoft.PowerShell.Core.Disable-ExperimentalFeature)

[Get-ExperimentalFeature](xref:Microsoft.PowerShell.Core.Get-ExperimentalFeature)