Share via


ManagementScopePath.CreateServerPath Method

Definition

Creates a server path.

Overloads

CreateServerPath(String, Int32)

Creates a server path by using the specified server name and port number.

CreateServerPath(String, Int32, ManagementFrameworkVersion)

Creates a server path by using the specified server name, port number, and .NET Framework version.

CreateServerPath(String, Int32)

Creates a server path by using the specified server name and port number.

public:
 static Microsoft::Web::Management::Client::ManagementScopePath ^ CreateServerPath(System::String ^ managementServerName, int port);
public static Microsoft.Web.Management.Client.ManagementScopePath CreateServerPath (string managementServerName, int port);
static member CreateServerPath : string * int -> Microsoft.Web.Management.Client.ManagementScopePath
Public Shared Function CreateServerPath (managementServerName As String, port As Integer) As ManagementScopePath

Parameters

managementServerName
String

The name of the server.

port
Int32

The port number.

Returns

A ManagementScopePath object that contains the parameters that are passed to this method.

Examples

The following example creates a ManagementScopePath object.

void TrcMSPsp(ManagementFrameworkVersion mfv) {

    ManagementScopePath msp = null;
    if (mfv != null) {

        msp = ManagementScopePath.CreateServerPath(
            "localHost",
            80,
            mfv
        );
    } else {
        msp = ManagementScopePath.CreateServerPath(
            "localHost",
            80
        );

        msp.SetFrameworkVersion(FrameVrs);
    }

    TrcMSP(msp);
}  

Applies to

CreateServerPath(String, Int32, ManagementFrameworkVersion)

Creates a server path by using the specified server name, port number, and .NET Framework version.

public:
 static Microsoft::Web::Management::Client::ManagementScopePath ^ CreateServerPath(System::String ^ managementServerName, int port, Microsoft::Web::Management::Server::ManagementFrameworkVersion ^ frameworkVersion);
public static Microsoft.Web.Management.Client.ManagementScopePath CreateServerPath (string managementServerName, int port, Microsoft.Web.Management.Server.ManagementFrameworkVersion frameworkVersion);
static member CreateServerPath : string * int * Microsoft.Web.Management.Server.ManagementFrameworkVersion -> Microsoft.Web.Management.Client.ManagementScopePath
Public Shared Function CreateServerPath (managementServerName As String, port As Integer, frameworkVersion As ManagementFrameworkVersion) As ManagementScopePath

Parameters

managementServerName
String

The name of the server.

port
Int32

The port number.

frameworkVersion
ManagementFrameworkVersion

The .NET Framework version.

Returns

A ManagementScopePath object that contains the parameters that are passed to this method.

Examples

The following example creates a ManagementScopePath object.

void TrcMSPsp(ManagementFrameworkVersion mfv) {

    ManagementScopePath msp = null;
    if (mfv != null) {

        msp = ManagementScopePath.CreateServerPath(
            "localHost",
            80,
            mfv
        );
    } else {
        msp = ManagementScopePath.CreateServerPath(
            "localHost",
            80
        );

        msp.SetFrameworkVersion(FrameVrs);
    }

    TrcMSP(msp);
}  

Applies to