Disable-ExperimentalFeature
Disable an experimental feature on startup of new instance of PowerShell.
語法
Default (預設值)
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
範例
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.