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

DeploymentName Property

Published: June 20, 2005

DeploymentName Property

Gets and sets the name of the deployment that this service belongs to.

obj.DeploymentName = string




An instance of the Service class.


A string that specifies the deployment name.

Windows Management Instrumentation (WMI) Script Example

The following code sample lists the properties of all services in the default deployment.

strDeploymentName = "Default"

' Connect to MSS namespace on the specified computer.
    Set objLocator = CreateObject("WbemScripting.SWbemLocator")
    Set objNamespace = objLocator.ConnectServer("localhost", "root/MSS")

' Get the WMI deployment object.
    Set objDeployment = objNamespace.Get("Deployment.Name='" & strDeploymentName & "'")

' Display the service names
    WScript.Echo "Services:" & vbCrLf
    If IsArray(objDeployment.Services) Then
         For Each service In objDeployment.Services
            Set objCurrService = GetObject("winmgmts:" & service)
               WScript.Echo objCurrService.Name
               WScript.Echo objCurrService.DeploymentName
               WScript.Echo objCurrService.Type
               WScript.Echo objCurrService.AppServerUrl            
    end if

Member Of

Service class

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft