Export (0) Print
Expand All
Expand Minimize

Get-ASAppServiceAutoStart

Get-ASAppServiceAutoStart

Gets auto-start settings for a service. The cmdlet returns the settings in the ServiceAutoStartInfo object. To be able to get auto-start settings for a service, or to enable or disable auto-start, you must be using the Windows 7 or Windows Server 2008 R2 operating system. To be able to get auto-start settings for a service, or to enable or disable auto-start, you must be using the Windows 7 or Windows Server 2008 R2 operating system. You can indicate the service to get auto-start information for by using the ServiceSpecification parameter, the –SiteName –VirtualPath parameter set, or the –Uri parameter. A service is enabled for AutoStart if the following are true: The application pool is enabled for AutoStart AND The application is enabled for AutoStart AND (The service is explicitly set to AutoStart OR no services are explicitly set to AutoStart (in which case the service is implicitly enabled via the application)).

Syntax

Parameter Set: SiteNameAndVirtualPath
Get-ASAppServiceAutoStart [-SiteName] <String> [-VirtualPath] <String> [ <CommonParameters>]


Parameters

-ServiceObject<ServiceInfo>

The name of the ServiceObject, which specifies that the cmdlet will operate on that service. This parameter is typically used to pipe the output of the Get-ASAppService cmdlet to a cmdlet containing the ServiceObject parameter.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

-SiteName<String>

The name of a Web site, as defined in the IIS Connections pane, which specifies that the cmdlet will operate at the scope of a service contained within that site. To the SiteName parameter, you must add the VirtualPath parameter that identifies a service contained within the site. The virtual path must include the name of the application, a forward slash, and the name of the .svc file or .xamlx file for the service. The leading "/" character in the virtual path is optional. If you use the SiteName parameter, do not use the Uri parameter.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

-Uri<Uri>

A URI for a service, which specifies that the cmdlet will operate at that scope. If you use the Uri parameter, do not use the SiteName and VirtualPath parameter set.A URI for a service, which specifies that the corresponding Web.config file will be used as the basis of operation of the cmdlet. If you use the Uri parameter, do not use the SiteName and VirtualPath parameter set.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

-VirtualPath<String>

The virtual path for a service, as defined in the IIS Manager Connections pane, which specifies that the cmdlet will operate at the scope of the service. You must add the VirtualPath parameter to the SiteName parameter, using SiteName to identify the site that the service is included in. The leading "/" character in the virtual path is optional. For a service, the virtual path includes the name of the application, a forward slash, and the name of the .svc file or .xamlx file for the service. If you use the SiteName and VirtualName parameter set, do not use the Uri parameter.


Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None


Outputs

The output type is the type of the objects that the cmdlet emits.

  • ServiceAutoStartInfo


Examples

EXAMPLE 1

Gets auto-start information for the svc1 service in the App1 application of the Default Web Site.


Get-ASAppServiceAutoStart -SiteName “Default Web Site” -VirtualPath “/App1/svc1.svc”

EXAMPLE 2

Gets auto-start information for all services in the App1 application under the Default Web Site.


Get-ASAppService –SiteName “Default Web Site” –VirtualPath “/App1” | Get-ASAppServiceAutoStart
Show:
© 2015 Microsoft