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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
Easwaran ParamasivamCommented:
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:


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.