mithrandyr / SimplySql

PowerShell module for querying various SQL databases
MIT License
202 stars 30 forks source link

Support for pscredentials? #4

Closed NegativeZero000 closed 6 years ago

NegativeZero000 commented 6 years ago

At least in the mysql config.ps1 it accepts string based usernames and passwords. It would not be too difficult to support pscredentials possibly?

I ask because I am trying to minimize the occurrence of clear text passwords in code. I currently read secure strings from file and then convert to plain text. Skipping that step could be more PowerShelly. Internally you would still have to convert but should not need to store in memory?

mithrandyr commented 6 years ago

@NegativeZero000 Sounds like a great idea -- I'll look into updating each of the providers to take PSCredential instead of UserName/Password.

mithrandyr commented 6 years ago

Published v1.4.0 to Powershellgallery with this change. MySQL, Oracle, & PostGre providers now support -Credential parameter. Further if you use -Username/-Password on SQL, MySQL, Oracle or Postgre you will receive a warning that these parameters are deprecated in favor of -Credential.