Thus far, we've seen the steps for loading and configuring SQL Server SMO assembly. Now, let's learn how to expand the cross-platform querying experience using PowerShell Core.
Running cross-platform T-SQL queries
Getting ready
Instantiate the Microsoft.SqlServer.Management.Smo.Server class by creating an object. You can create this object using the code:
PS> New-Object Microsoft.SqlServer.Management.Smo.Server <SQL InstanceName>
How to do it...
Let's connect to a SQL Server instance on a Windows machine from a Linux machine using the SMO object...