Skip to content

Get SamplerWorkspaceLinkedModuleRoot

gaelcolas edited this page Jul 2, 2026 · 1 revision

Get-SamplerWorkspaceLinkedModuleRoot

SYNOPSIS

Resolves the directory where workspace module symlinks will be created.

SYNTAX

Get-SamplerWorkspaceLinkedModuleRoot [-BuildRoot] <String> [-OutputDirectory] <String>
 [[-BuiltModuleSubdirectory] <String>] [<CommonParameters>]

DESCRIPTION

Determines the linked module root path based on the output directory and the built module subdirectory. The logic is:

  • If OutputDirectory is absolute, use it directly; otherwise join it with BuildRoot.
  • If BuiltModuleSubdirectory is null or whitespace, return the output root as-is.
  • If BuiltModuleSubdirectory is absolute, return it directly.
  • Otherwise join the output root with BuiltModuleSubdirectory.

EXAMPLES

EXAMPLE 1

Get-SamplerWorkspaceLinkedModuleRoot -BuildRoot 'C:\src\MyRepo' -OutputDirectory 'output' -BuiltModuleSubdirectory 'module'
# C:\src\MyRepo\output\module

PARAMETERS

-BuildRoot

The root directory of the current build (typically $BuildRoot in InvokeBuild context).

Type: String
Parameter Sets: (All)
Aliases:

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

-BuiltModuleSubdirectory

The subdirectory under the output root where modules are placed. Defaults to module. May be empty, absolute, or relative.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: Module
Accept pipeline input: False
Accept wildcard characters: False

-OutputDirectory

The output directory path. May be absolute or relative to BuildRoot.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
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

OUTPUTS

System.String

NOTES

RELATED LINKS

Clone this wiki locally