For command line utilities, that require capturing a password, you may find this C# utility class to capture a password useful. Features: 1. Allows you to specify a prompt, e.g. "Enter password: " 2. Caters for masking or unmasking the displayed password, e.g. abc123 or ****** 3. Allows you to specify the masking character, e.g. - instead of * 4. Caters for a maximum length, or unlimited length passwords. 5. Caters for processing the backspace key so the user can make corrections. 6. Uses the System.Security.SecureString class (correctly) to ensure that the password is encrypted in memory.