ctigeek / InvokeQueryPowershellModule

A Powershell module of Cmdlets for querying most types of databases.
https://www.powershellgallery.com/packages/InvokeQuery
MIT License
58 stars 10 forks source link

Can -InputFile or similar parameter be used? #1

Closed nojnoj33 closed 7 years ago

nojnoj33 commented 8 years ago

Hi,

Great module, one question,

With Invoke-Sqlcmd you can specify an imput file e.g. ( -InputFile "\myfile.sql" ) can you do this with your module?

Thanks Jon

ctigeek commented 7 years ago

Hi Jon. I'm very sorry for the delay in answering.

The "correct" powershell way to do this would be to use Get-Content and then you can pipe that directly into the Invoke-SqlServerQuery (or other) command.

Hope that helps! Steve