Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Load SQL and SharePoint in PowerShell script

$
0
0

I need to create one PowerShell in which i am using SQL and SharePoint both. In my development environment it works fine because there is single server for Content DB server and WFE server. But in production environment i have different server for Content Database and WFE.

If i run my PowerShell in WFE server then i am not getting reference of SQL and if I run my PowerShell in Content DB server then i am not getting SharePoint.

How i can get both (SQL and SharePoint) reference in PowerShell in WFE?

I have tried to load SQL dll manually using following code but still i am not getting assembly reference

[System.Reflection.Assembly]::LoadFrom('.\dll\Microsoft.SqlServer.Smo.dll')|out-null


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>