ContainerHandling/Stop-NavContainer.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<#
 .Synopsis
  Stop a NAV/BC Container
 .Description
  Stop a Container
 .Parameter containerName
  Name of the container you want to stop
 .Example
  Stop-NavContainer -containerName devServer
#>

function Stop-NavContainer {
    [CmdletBinding()]
    Param (
        [Parameter(Mandatory=$true, ValueFromPipeline)]
        [string] $containerName
    )

    if (!(DockerDo -command stop -imageName $containerName)) {
        return
    }
}
Set-Alias -Name Stop-BCContainer -Value Stop-NavContainer
Export-ModuleMember -Function Stop-NavContainer -Alias Stop-BCContainer