TestimoX

API Reference

Command

Set-CxWslDistributionConfiguration

Namespace ComputerX.PowerShell
Inputs
System.String
Outputs
ComputerX.Wsl.WslDistributionConfigurationSetPlan ComputerX.Wsl.WslDistributionConfigurationSetResult

Updates WSL distribution configuration through the native public WSL API.

Examples

Authored help example

Example 1: Preview enabling Windows interoperability for a distribution.

PS>


Set-CxWslDistributionConfiguration -Name Ubuntu-22.04 -EnableInterop $true -Preview
        

Example 2: Apply WSL flags through the native API.

PS>


Set-CxWslDistributionConfiguration -Name Ubuntu-22.04 -Flags EnableInterop,AppendNtPath -Confirm
        

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Set-CxWslDistributionConfiguration -Name <string> [-AppendNtPath <bool>] [-DefaultUid <uint>] [-EnableDriveMounting <bool>] [-EnableInterop <bool>] [-Flags <EnableInterop|AppendNtPath|EnableDriveMounting>] [-Preview] [<CommonParameters>]
#

Parameters

Name string requiredposition: 0pipeline: true (ByValue, ByPropertyName)
Distribution name.
AppendNtPath bool optionalposition: namedpipeline: false
Optional Windows PATH append flag override.
DefaultUid uint optionalposition: namedpipeline: false
Target default Linux user identifier.
EnableDriveMounting bool optionalposition: namedpipeline: false
Optional Windows drive mounting flag override.
EnableInterop bool optionalposition: namedpipeline: false
Optional Windows interoperability flag override.
Flags WslDistributionFlags optionalposition: namedpipeline: falsevalues: 3
Full target WSL distribution flag set. Possible values: None, EnableInterop, AppendNtPath, EnableDriveMounting
Possible values: EnableInterop, AppendNtPath, EnableDriveMounting
Preview SwitchParameter optionalposition: namedpipeline: false
Emits the non-mutating configuration change plan without invoking the native API.

Outputs

ComputerX.Wsl.WslDistributionConfigurationSetPlan, ComputerX.Wsl.WslDistributionConfigurationSetResult