I have a while loop in powershell that checks for input
:checker while($choice1 = read-host "Do you want to continue? [Y/N/C]"){
switch ($choice1){
"N"{Echo Ok; $temporary = "Exit"; break :checker}
"Y"{Echo Ok; $temporary = "Continue"; break :checker}
"C"{Echo Ok; $temporary = "Cancel"; break :checker}
default{"Invalid input"}
}
}
However, no matter the input, the while loop never gets broken. Is there an issue with my code, or is there a different way to do this that will ensure the correct things to happen?