Hi, i want to add in my pester script a if statement saying - if not write-error " try again"
how can I do that?
( my script is below)
[Cmdletbinding()]
param
(
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[string]
$Regex
)
Describe "Check Parameter" {
It "GUID is Vailed" {
$Regex | should -Match "^[a-f0-9]{8}-([a-f0-9]{4}-){3}[a-f0-9]{12}$"
}
}