RenameComputer icon indicating copy to clipboard operation
RenameComputer copied to clipboard

Issue with the Exits

Open mobilejon opened this issue 1 year ago • 0 comments

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

mobilejon avatar Aug 21 '24 15:08 mobilejon