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