The Mandatory property in PowerShell Parameter attribute
The below PowerShell program will force the user to specify the value of the two variables by setting the Parameter attribute in a function to true. If the user forgets to enter the value of both or either variable of the function then PowerShell will ask the user to enter them.