Link to home
Start Free TrialLog in
Avatar of YZlat
YZlatFlag for United States of America

asked on

Connecting to SQL Server from Powershell to retrieve data

I need a powershell function that takes one parameter, connects to SQL Server database and retrieves data based on input parameter

SELECT Field1 FROm Table1 WHERE Field2=@parameter

ASKER CERTIFIED SOLUTION
Avatar of Bryan Butler
Bryan Butler
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of YZlat

ASKER

Let me try that.

Is there a way to put it all into a function and then call that function from my script?