Hi
I need to run the powershell command from mvc application. | want to read the data from the database table (having more than 2crore data) and create csv file and download the file to users download folder. Can someone please check and help me to resolve the issue?
$DBName = "testdb" $FilePath = "C:\\test\\File1.csv" $SQLQuery= @" select * from testsummary "@ Invoke-Sqlcmd_ -Serverlnstance dbinst -Database $DBName -Query $SQLQuery | Export- CSV $FilePath -NoTypelnformation
Thanks,
Anu