Containers/Remove-Container.ps1

<#
 .Synopsis
  Removes a container
 .Description
  Removes a NAV/BC container
 .Parameter ContainerName
  Name of the container. Can be provided in the settings.json
  .Example
  Remove-Container
#>

function Remove-Container {
    [CmdletBinding(SupportsShouldProcess, ConfirmImpact="low")]
    Param(
        [Parameter(Mandatory=$false)]
        [string] $ContainerName
    )

    if ($PSCmdlet.ShouldProcess("container", "This removes a NAV/BC ")) {
        $ContainerName = Get-NewContainerName -SourcePath (Get-Location) -ContainerName $ContainerName
        Remove-BcContainer -containerName $ContainerName
    }
}
Export-ModuleMember Remove-Container