In this video, learn how to query data with PowerShell.
- [Instructor] All right, so now that we've created tables, … and we've created these, we've created stored procedures, … we've inserted data into a table. … Now, it's time to do the most important thing for any app. … Show data. … And we need to return data back to the screen, … back to the user. … So we're going to look at a couple … of examples in a second here, … and all we're going to do in these examples … is just return the data back to the screen. … You can do much more with PowerShell than this. … You can obviously return the data into an object. … You can iterate through things in memory. … We're just showing the basics of how to get the data back. … What you do with it at that point, totally different matter. … So there's a few ways to do this. … You can use SQLPS and use the Read-SqlTableData cmdlet … to pull data back from a table, … or you can use native T-SQL to pull data back … using normal select statements. … It's just going to matter what you want to do, … and how you want to join data, …
Author
Updated
6/24/2019Released
6/21/2019- When PowerShell can be particularly useful
- Connecting to SQL Server from PowerShell
- Closing connections
- Creating objects in PowerShell
- Creating tables, views, and procedures
- Querying data in PowerShell
- Using loops in PowerShell
- Exporting CSV files and XML data
Skill Level Intermediate
Duration
Views
Related Courses
-
Learning PowerShell
with Matt Hester1h 23m Beginner -
SQL Server 2017: What's New
with Adam Wilbert1h 22m Beginner
-
Introduction
-
Download tools1m 35s
-
1. PowerShell in SQL Server
-
When PowerShell is useful2m 35s
-
Open-source solutions1m 47s
-
2. Connecting to SQL Server from PowerShell
-
Declaring objects3m 5s
-
Connecting to SQL Server3m 55s
-
Parameters in PowerShell2m 33s
-
Closing connections1m 22s
-
Disposing connections2m 4s
-
Object reuse2m 46s
-
-
3. Creating Objects in PowerShell
-
Creating databases2m 58s
-
Creating tables4m 9s
-
Creating views3m 44s
-
Creating procedures4m 33s
-
-
4. Querying Data in PowerShell
-
Inserting data into tables3m 48s
-
-
5. Looping Through Servers in PowerShell
-
Loops in PowerShell6m 21s
-
Concepts of threading6m 10s
-
Authentication and threading3m 24s
-
Piping between objects3m 17s
-
Exporting CSV files2m 56s
-
Importing CSV files2m 27s
-
Exporting XML data2m 50s
-
Importing XML data2m 26s
-
-
6. PowerShell Remoting
-
What is remoting?5m 18s
-
Removing over HTTP ports2m 11s
-
Enabling remoting via GPO3m 16s
-
Starting a remote session1m 59s
-
Ending a remote session1m 31s
-
Invoking a remote command2m 48s
-
-
Conclusion
-
Next steps33s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Returning data from SQL Server