{"action":"opened","issue":{"url":"https://api.github.com/repos/adamabdelhamed/PowerArgs/issues/64","labels_url":"https://api.github.com/repos/adamabdelhamed/PowerArgs/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/adamabdelhamed/PowerArgs/issues/64/comments","events_url":"https://api.github.com/repos/adamabdelhamed/PowerArgs/issues/64/events","html_url":"https://github.com/adamabdelhamed/PowerArgs/issues/64","id":59882661,"number":64,"title":"Question: Is there anyway to make SecureStringArgument optional?","user":{"login":"ristaloff","id":4353303,"avatar_url":"https://avatars.githubusercontent.com/u/4353303?v=3","gravatar_id":"","url":"https://api.github.com/users/ristaloff","html_url":"https://github.com/ristaloff","followers_url":"https://api.github.com/users/ristaloff/followers","following_url":"https://api.github.com/users/ristaloff/following{/other_user}","gists_url":"https://api.github.com/users/ristaloff/gists{/gist_id}","starred_url":"https://api.github.com/users/ristaloff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ristaloff/subscriptions","organizations_url":"https://api.github.com/users/ristaloff/orgs","repos_url":"https://api.github.com/users/ristaloff/repos","events_url":"https://api.github.com/users/ristaloff/events{/privacy}","received_events_url":"https://api.github.com/users/ristaloff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-04T23:54:22Z","updated_at":"2015-03-04T23:54:22Z","closed_at":null,"body":"I would like my program to prompt the user for a password only if the -p option is set.\r\nIs this possible? \r\nI tried this:\r\n```\r\n    [ArgShortcut(\"p\") ,ArgDescription(\"Database password\")]\r\n    public SecureStringArgument DbPassword { get; set; }\r\n```\r\nAnd I get prompted for a password even if i don't pass -p as a parameter. \r\nI get promptet when I run `DbPassword.SecureString == null` to check if it was provided as an argument. Perhaps the SecureStringArgument should have a flag that can be checked to see if the SecureString is set or not, so I don't have to trigger the prompt.\r\n\r\nI worked around the issue by doing this: \r\n    \r\n    [ArgShortcut(\"p\") ,ArgDescription(\"Get prompted for database password\")]\r\n    public bool PromptForPassword { get; set; }\r\n\r\n    public SecureStringArgument DbPassword { get; set; }\r\nNow I just check if PromptForPassword is set before I access DbPassword.SecureString."}}