ManagedInstance.Name Property  
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the name of the managed instance.
public:  property System::String ^ Name {  public:
System::String ^ get(); protected:
 void set(System::String ^ value); };
	[Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcKey(0)]
[Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcProperty(Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.ReadOnlyAfterCreation | Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.Required)]
public string Name { get; protected set; }
	[<Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcKey(0)>]
[<Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcProperty(Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.ReadOnlyAfterCreation | Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.Required)>]
member this.Name : string with get, set
	Public Property Name As String
	Property Value
A String value that specifies the name of the managed instance.
- Attributes
 
Examples
VC#
ManagedInstance managedInstance;  
managedInstance = new ManagedInstance ();  
System.Console.WriteLine(managedInstance.Name);  
VB
Dim managedInstance As ManagedInstance  
managedInstance = New ManagedInstance()   
System.Console.WriteLine(managedInstance.Name)  
PowerShell
$managedInstance = New-Object Microsoft.SqlServer.Management.Utility.ManagedInstance  
Write-Host $managedInstance.Name