Read-Host Blocks Automation

Using Read-Host to ask for user information can be problematic because it prevents scripts from running unattended. A better way could be to wrap Read-Host in the param() block. This way, the information can be submitted via arguments for unattended operation, and prompted for interactive usage: