TechNet
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

Server::Name Property

 

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

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

public:
[SfcPropertyAttribute(SfcPropertyFlags::None | SfcPropertyFlags::Standalone | SfcPropertyFlags::SqlAzureDatabase)]
[SfcKeyAttribute(0)]
property String^ Name {
	virtual String^ get() sealed;
}

Property Value

Type: System::String^

A String value that specifies the name of server.

C#

Console.WriteLine(srv.Name)

PowerShell

Write-Host $srv.Name
Return to top
Show:
© 2016 Microsoft