jborean93 / ansible-windows

Scripts that are useful for using Ansible with Windows - not affiliated with Ansible in any way
MIT License
208 stars 234 forks source link

The script Upgrade-PowerShell.ps1 - remarks #3

Open it-praktyk opened 6 years ago

it-praktyk commented 6 years ago

I read your script and I would like to propose some improvements.

If you will pre-agree with my remarks I can prepare a pull request to address them.

jborean93 commented 6 years ago

Happy for 2 and 3, I was originally tossing up with making the -password parameter a secure string but in the end I didn't do it for 1 reason. This reason was because the password is stored as plain text in the registry and I didn't want to give people the illusion that the string stays secure. As a middle ground I'm happy to have a new parameter added called -credential that takes in a PSCredential object and that overrides -username and -password or raise an error if both are specified. For users who want to use the credential type they are able to but it also preserves backwards compatibility for others who just download the script from Github.

If you feel up to changing the documentation for the script you may also want to look at https://github.com/jborean93/ansible-windows/issues/2. I haven't gotten round to changing it but it just means all docs need to be commented line by line with # instead of <#.