Write a powershell script which will ask the user to enter a number. If the answer is not equal to 10 display message "Congratulations".
Executable Code:
$s = Read-Host "Please enter any number"
if($s -eq 10){
write-host("Congratulations")
}
else{
write-host("Try again")
}
Sample Output :
Please comment
below if you have any queries.
Please do give a thumbs up if you liked the answer thanks
:)
Get Answers For Free
Most questions answered within 1 hours.