Skip to content

Latest commit

 

History

History
147 lines (103 loc) · 3.62 KB

File metadata and controls

147 lines (103 loc) · 3.62 KB
external help file System.Management.Automation.dll-Help.xml
Locale en-US
Module Name Microsoft.PowerShell.Core
ms.date 12/04/2023
online version https://learn.microsoft.com/powershell/module/microsoft.powershell.core/disable-experimentalfeature?view=powershell-7.6&WT.mc_id=ps-gethelp
schema 2.0.0
title Disable-ExperimentalFeature

Disable-ExperimentalFeature

SYNOPSIS

Disable an experimental feature on startup of new instance of PowerShell.

SYNTAX

Disable-ExperimentalFeature [-Name] <String[]> [-Scope <ConfigScope>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

The Disable-ExperimentalFeature cmdlet disables experimental features by removing the named experimental features from the powershell.config.json settings file read on PowerShell startup.

This cmdlet was introduced in PowerShell 6.2.

Note

Any changes to experimental feature state only takes effect on restart of PowerShell

EXAMPLES

Example 1: Disable an experimental feature

In this example, if this experimental feature was previously enabled, then the powershell.config.json file is updated for the user to not enable that feature once PowerShell is restarted. Upon success nothing is output to the pipeline and only a warning message is displayed.

Disable-ExperimentalFeature -Name PSImplicitRemotingBatching
WARNING: Enabling and disabling experimental features do not take effect until next start of PowerShell.

PARAMETERS

-Name

The name or names of the experimental features to disable.

Type: System.String[]
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Scope

Determines which powershell.config.json to update whether it affects all users or just the current user.

Type: System.Management.Automation.Configuration.ConfigScope
Parameter Sets: (All)
Aliases:
Accepted values: AllUsers, CurrentUser

Required: False
Position: Named
Default value: CurrentUser
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.Management.Automation.ExperimentalFeature

Pipe instances of ExperimentalFeature from Get-ExperimentalFeature cmdlet to disable.

OUTPUTS

None

This cmdlet returns no output.

NOTES

Changes to state of an experimental feature only take effect on restart of PowerShell.

RELATED LINKS

Enable-ExperimentalFeature

Get-ExperimentalFeature

about_Experimental_Features

Using Experimental Features