Skip to content

powershell scripts do not terminate correctly #427

@KnicKnic

Description

@KnicKnic

@vishiy @rashmichandrashekar
I am using https://github.com/microsoft/OMS-docker/blob/ci_feature_prod/docs/aks/mdmonboarding/mdm_onboarding.ps1
I noticed that it exits incorrectly using exit This sets the exit code to 0 and allows apps to continue.

You should either throw, or use exit 1 or something else. See https://devblogs.microsoft.com/powershell/windows-powershell-exit-codes/

I was expecting when the scrip failed, to fail my script runner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions