Skip to content

Instantly share code, notes, and snippets.

If ($PCName -contains "-","_") {
#If it looks like a server, ignore it.
$LookupTest = "NWS"
#####This Should Trigger first, ignoring the rest of the statements#####
#####This looks for anything that follows our standard naming convention, granted nothing gets through the first If statement,
#and the other elseif statements I removed#####
} elseif ($PCName -like "*X[0-9][0-9][0-9][0-9][0-9][0-9]") {