Skip to content

Issue with the Exits #12

@mobilejon

Description

@mobilejon

I found that this would exist either way:

Bail out if the prefix doesn't match (if specified)

Write-Host $Prefix
$details = Get-ComputerInfo
if (($Prefix -ne "") -and (-not $details.CsName.StartsWith($Prefix))) {
Write-Host "Device name doesn't match specified prefix, bailing out. Prefix=$Prefix ComputerName=$($details.CsName)"
Stop-Transcript
Exit 0
}
Write-Host "Oh!"
exit 3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions