Share via


ManagementScopePath.ServerReference Property

Definition

Gets the server reference.

public:
 property System::String ^ ServerReference { System::String ^ get(); };
public string ServerReference { get; }
member this.ServerReference : string
Public ReadOnly Property ServerReference As String

Property Value

The server reference.

Examples

The following example sends ManagementScopePath details to the trace listener.

void TrcMSP(ManagementScopePath msp) {

    Trace.WriteLine("ApplicationPath = " + msp.ApplicationPath);
    Trace.WriteLine("Port = " + msp.Port.ToString());
    if (msp.FrameworkVersion != null &&
        !string.IsNullOrEmpty(msp.FrameworkVersion.Version.ToString()))
        Trace.WriteLine("FrameworkVersion = " + msp.FrameworkVersion.Version);
    Trace.WriteLine("ServerName = " + msp.ServerName);
    Trace.WriteLine("ServerReference = " + msp.ServerReference);
    Trace.WriteLine("SiteName = " + msp.SiteName);
} 

Remarks

The server reference is the server name and port number separated by a colon (for example, "localHost:80").

Applies to