PowerShell and SQLDatabase

Hello Experts,

 I want to utilize powershell to add sqldatabase entry and take the data from database and use c# code to build an website display the content of it.

 Basically I want to learn adding and getting entries to and from database , can anyone knows what is the best reference book to learn this?

 I searched a bit on internet but did not find much.


-Prashant Girennavar.
LVL 10
Prashant GirennavarAsked:
Who is Participating?
Easwaran ParamasivamConnect With a Mentor Commented:
For updating the database why can't use UPDATE statements accordingy as SQL Scripts?

If the number of more update statments and to be run in sequence, in this case you can use SSIS packcage for it.

Below link could guide you:

Prashant GirennavarAuthor Commented:
Thanks for the article.

 As per me , the updating SQL datatable using powershell is a difficult task ,

So , my question is,

 DO we need to use C# or other programming language to update the database and get the entries and disply on webpage?

 if yes , then how system administartor can make use of it ? Since they need to query different windows servers and get  the infomation etc (VMWare , AD Etc)

Do we have someother alernative?


-Prashant Girennavar.
QlemoConnect With a Mentor Batchelor and DeveloperCommented:
Admins will usually have their tools to make db changes. The tools depend on the purpose, like publishing periodic summaries/reports, update one db based on another, replicating a db, ...
So, without knowing more about the purpose, it's not possible to tell.
Performing updates via PowerShell is in no way different to doing that in any (other) .NET language - the same means are available. There is the GUI way with datatables, the commandline way with SQL commands, and so on.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.