Hi @SakeriyeMohamud-4520 ,
maybe this helps to get started:
$guid = [guid]::NewGuid()
if ($guid -match("^[a-f0-9]{8}-([a-f0-9]{4}-){3}[a-f0-9]{12}$")) {
Write-Output "Guid is valid .... do something"
}
else {
Write-Output "Guid is not valid! .... do something else"
}
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten