https://github.com/arnab-developer/powershelldbdemo
Read SQL Server with PowerShell
https://github.com/arnab-developer/powershelldbdemo
Last synced: 3 months ago
JSON representation
Read SQL Server with PowerShell
- Host: GitHub
- URL: https://github.com/arnab-developer/powershelldbdemo
- Owner: Arnab-Developer
- License: mit
- Created: 2021-07-09T07:36:21.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-09T07:40:23.000Z (almost 4 years ago)
- Last Synced: 2025-01-17T02:24:09.742Z (5 months ago)
- Language: PowerShell
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PowerShell db demo
This is a demo to show how we can read SQL Server db with ADO.NET and PowerShell.
## How to run
You need PowerShell 7, .NET 5 and SQL Server installed in your computer.
- Download the PowerShell script and save in your local computer.
- Use the [db script](https://github.com/Arnab-Developer/PowerShellDbDemo/tree/main/DatabaseScripts)
to create and populate the SQL Server db.
- Open a PowerShell terminal and navigate to the PowerShell script location.
- Execute the below command```
.\Get-StudentNames.ps1
```## Output
```
Id: 1, Name: jon doe
Id: 2, Name: bob miler
Id: 3, Name: mita roy
Id: 4, Name: rahul roy
Id: 5, Name: mukul dev
```