Microsoft.Data.SqlClient PowerShell

Odrai 5 Reputation points
2023-01-25T15:07:03.2133333+00:00

I would like to use the Microsoft.Data.SqlClient namespace/ objects in a PowerShell script. Two (click1, click2) GitHub posts provide a way to load the dll's, but does Microsoft provide any (official) PS module which could be imported? I don't want the hassle of copying dll's etc.

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,577 questions
0 comments No comments
{count} vote

3 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Limitless Technology 44,371 Reputation points
    2023-01-26T16:30:35.41+00:00

    Double post

    0 comments No comments

  3. Pospisil, Jan 0 Reputation points
    2024-09-06T08:34:48.5666667+00:00

    Is there an official guide how to reference/use Microsoft.Data.SqlClient library in Powershell ? I want to use it to execute SQL commands with Azure Entra-ID authentication (I cannot use System.Data.SqlClient module). Any suggestion, examples ?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.