Share via


ServerAlias Constructor (ManagedComputer, String)

Initializes a new instance of the ServerAlias class on the specified WMI installation and with the specified name.

Namespace:  Microsoft.SqlServer.Management.Smo.Wmi
Assembly:  Microsoft.SqlServer.SqlWmiManagement (in Microsoft.SqlServer.SqlWmiManagement.dll)

Syntax

'Declaration
Public Sub New ( _
    managedComputer As ManagedComputer, _
    name As String _
)
'Usage
Dim managedComputer As ManagedComputer 
Dim name As String 

Dim instance As New ServerAlias(managedComputer, _
    name)
public ServerAlias(
    ManagedComputer managedComputer,
    string name
)
public:
ServerAlias(
    ManagedComputer^ managedComputer, 
    String^ name
)
new : 
        managedComputer:ManagedComputer * 
        name:string -> ServerAlias
public function ServerAlias(
    managedComputer : ManagedComputer, 
    name : String
)

Parameters

  • name
    Type: System.String
    A String value that specifies the name of the server connection alias.

Examples

Managing Services and Network Settings by Using WMI Provider

See Also

Reference

ServerAlias Class

ServerAlias Overload

Microsoft.SqlServer.Management.Smo.Wmi Namespace

Other Resources

WMI and SQL Server

Connecting to the SQL Server Database Engine