-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels