Stop using Read-Host and do this instead #powershell #devops #scripting

preview_player
Показать описание
Stop using Read-Host and do this instead:

Read-Host has limitations.

- You cannot pass information to it
- You cannot validate what the user provided
- It always stops the script

There is a better way - use parameters instead.

- Control the type of input
- Make it mandatory or optional
- Pass argument from the command line
- or prompt the user to provide an argument, when required and not passed

In this short video, I'll show you how to implement simple parameters and how to use them.

Would you like to learn more about the parameters?
Рекомендации по теме
Комментарии
Автор

Would you like to learn anything more about parameters?

kamilpro
visit shbcf.ru