Disable-ExperimentalFeature
Disable an experimental feature on startup of new instance of PowerShell.
语法
Default (默认值)
Disable-ExperimentalFeature
[-Name] <String[]>
[-Scope <ConfigScope>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
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
示例
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.
参数
-Confirm
Prompts you for confirmation before running the cmdlet.
参数属性
类型: | SwitchParameter |
默认值: | None |
支持通配符: | False |
不显示: | False |
别名: | cf |
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-Name
The name or names of the experimental features to disable.
参数属性
类型: | String[] |
默认值: | None |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | 0 |
必需: | True |
来自管道的值: | False |
来自管道的值(按属性名称): | True |
来自剩余参数的值: | False |
-Scope
Determines which powershell.config.json
to update whether it affects all users or
just the current user.
参数属性
类型: | ConfigScope |
默认值: | CurrentUser |
接受的值: | AllUsers, CurrentUser |
支持通配符: | False |
不显示: | False |
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
参数属性
类型: | SwitchParameter |
默认值: | None |
支持通配符: | False |
不显示: | False |
别名: | wi |
参数集
(All)
Position: | Named |
必需: | False |
来自管道的值: | False |
来自管道的值(按属性名称): | False |
来自剩余参数的值: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
输入
ExperimentalFeature
Pipe instances of ExperimentalFeature from Get-ExperimentalFeature
cmdlet to disable.
输出
None
This cmdlet returns no output.
备注
Changes to state of an experimental feature only take effect on restart of PowerShell.