Public/Steps/Get-HDTCommandLineStepTemplate.ps1

function Get-HDTCommandLineStepTemplate {
    <#
        .SYNOPSIS
            The YAML for a new CommandLine step.

        .DESCRIPTION
            The optional fourth of the step contract: what a NEW step of this
            type looks like on disk. See Get-HDTNoOpStepTemplate for the shape
            all of them share.

            THE COMMAND ARRIVES EMPTY AND THAT IS THE POINT. MDT's Run Command
            Line arrives with an empty command box too: a template that guessed
            'cmd.exe /c' would be a step that runs and does nothing, which is
            worse than one that plainly is not finished. successCodes is written
            out because 0 and 3010 is the pair almost every real step wants and
            it is the one an author would otherwise have to look up.

        .PARAMETER Name
            The step's name. Defaults to the name this type is offered under.

        .INPUTS
            None. This command does not accept pipeline input.

        .OUTPUTS
            System.String[] - the YAML lines, unindented.

        .EXAMPLE
            Get-HDTCommandLineStepTemplate
    #>

    [CmdletBinding()]
    [OutputType([string[]])]
    param(
        [Parameter(Position = 0)]
        [ValidateNotNullOrEmpty()]
        [string] $Name = 'Run Command Line'
    )

    Set-StrictMode -Version Latest
    $ErrorActionPreference = 'Stop'

    return [string[]] @(
        ('- name: {0}' -f $Name)
        ' type: CommandLine'
        " command: ''"
        ' successCodes: [0, 3010]'
    )
}