How to limit Read-Host -Prompt "Enter Employee Number"

Hi all,
How to limit Read-Host -Prompt “Enter Employee Number” to be able to enter just numbers
and if number are not entered to type warning message ?

You can’t. The only thing you can do is to check the input afterwards and use a loop until the provided input is the way you like it.

can you show me an example?

As we are happy to assist you with your code and the problem you might have with it it is beyond the scope of any forum to teach you how to write advanced scripts.

We expect you to make an own attempt to solve your problems by yourself in the first place.

Please use your favorite internet search enginge to look for examples for such a task.

https://www.google.com/search?q=powershell+check+input+from+read-host&oq=powershell+check+input+from+read-host&aqs=chrome..69i57.10655j0j1&sourceid=chrome&ie=UTF-8

I search for solution before posting my post but I will look again
thanks