Re: Using Powershell to export SQL table data to text files
Disclaimer ... Powershell ignorant.
I am trying to write a powershell script to export SQL table data (exact tables will be the result of a query) to individual flat files. The files must have a column heading, "|" pipe delimited. This will run in production for a SQL 2005, 2008, 2012 and the os count be ???. I am currently working in Windows Server 2012, SQL 2014, and PS 4.0.
Found some scripts at the Script Center downloads and they used export-csv cmdlet which seems to be in SqlServerCmdletSnapin100, SqlServerProviderSnapin100. When I did a get_PSSnapin "Microsoft.PowerSHell.core was returned. a -registered returned nothing.
To start - how do I get the cmdlets and how do i register them?