Was this page helpful?
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ServiceController.MachineName Property


Gets or sets the name of the computer on which this service resides.

Namespace:   System.ServiceProcess
Assembly:  System.ServiceProcess (in System.ServiceProcess.dll)

public string MachineName { get; set; }

Property Value

Type: System.String

The name of the computer that is running the service associated with this ServiceController instance. The default is the local computer (".").

Exception Condition

The MachineName syntax is invalid.

The computer name is the name of the server that is running this service, without the preceding backslash characters (\\).

.NET Framework
Available since 1.1
Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft