VMware {code} Community
admssm
Contributor
Contributor

export to mysql..?

Hi,

is there a way to export output of ps1 script into mysql db under Linux/Windows..? Im trying to google it, but no luck...

Thank you.

0 Kudos
3 Replies
schepp
Leadership
Leadership

Hi,

you can write a function to connect to a mysql server and insert or alter entries.

Google gave me this example as first output:

http://universitytechnology.blogspot.de/2009/09/powershell-mysql-insert.html

Regards

0 Kudos
admssm
Contributor
Contributor

Hmmmm... so i guess it has to be another script.. it cant be done directly withing ps1 script.. right?

Thx

0 Kudos
schepp
Leadership
Leadership

No, I don't think there is a build in mysql-out function.

You will have to write yourself one, maybe with the example I posted earlier and pass your output to that function that puts it into the database.

0 Kudos