Server.Name Server.Name Server.Name Property

Definition

Gets the name of the server, which is the physical machine name.

public:
 property System::String ^ Name { System::String ^ get(); };
[Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcKey(0)]
[Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcProperty(Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.Standalone | Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.SqlAzureDatabase)]
public string Name { get; }
Public ReadOnly Property Name As String
Property Value

A String value that specifies the name of server.

Implements

Examples

C#

Console.WriteLine(srv.Name)  

PowerShell

Write-Host $srv.Name  

Applies to