Test-BuildAsset

September 18, 2025 ยท View on GitHub

(requires) Checks for required build assets.

Syntax

Test-BuildAsset [[-Variable] String[]] [-Environment String[]] [-Path String[]] [-Property String[]]

Description

Scripts use its alias 'requires'. This command tests the specified assets.
It fails if any is missing. It is used in script code (common assets) and
in tasks (individual assets).

Parameters

-Variable
    Specifies the required session variable names and tells to fail if a
    variable is missing or its value is null or empty string.
    
    Required?                    false
    Position?                    0
-Environment
    Specifies the required environment variable names.
    
    Required?                    false
    Position?                    named
-Path
    Specifies literal paths to be tested by Test-Path. If the specified
    expression uses required assets then test these assets first by a
    separate command.
    
    Required?                    false
    Position?                    named
-Property
    Specifies session or environment variable names and tells to fail if a
    variable is missing or its value is null or empty string.
    
    Required?                    false
    Position?                    named
Get-BuildProperty