Connect .NET Applications to PowerShell Scripts
Connect .NET Applications to PowerShell Scripts
  • DataBind to PowerShell commands and scripts using standard Visual Studio wizards.
  • Comprehensive support for CRUD (Create, Read, Update, and Delete) operations.
  • Create powerful .NET applications that can easily consume IT resources through PowerShell scripts!
Download Free Trial

The PowerShell Data Provider for ADO.NET offers the most natural way to access Powershell data from any .NET application. Simply use PowerShell Data Provider objects to connect and access data just as you would access any traditional database. You will be able to use the PowerShell Data Provider through Visual Studio Server Explorer, in code through familiar classes, and in data controls like DataGridView, GridView, DataSet, etc.

Using the PowerShell Data Provider

The PowerShell Data Provider wraps the complexity of accessing Powershell services in an easy-to-integrate, fully-managed ADO.NET Data Provider. Applications then access Powershell through the PowerShell Data Provider with simple Transact-SQL.

 

The PowerShell Data Provider for ADO.NET hides the complexity of accessing data and provides additional powerful security features, smart caching, batching, socket management, and more.

Working with DataAdapters, DataSets, DataTables, etc.

The PowerShell Data Provider has the same ADO.NET architecture as the native .NET data providers for SQL Server and OLEDB including: PowershellConnection, PowershellCommand, PowershellDataAdapter, PowershellDataReader, PowershellDataSource, PowershellParameter, and PowershellTransaction. Because of this you can now access Powershell data in an easy, familiar way.

For example:

using (PowershellConnection conn = new PowershellConnection("...")) {
	string select = "SELECT * FROM runningservices.ps";
	PowershellCommand cmd = new PowershellCommand(select, conn);
	PowershellDataAdapter adapter = new PowershellDataAdapter(cmd);
	using (adapter) {
		DataTable table = new DataTable();
		adapter.Fill(table);		
		...
	}
}