Export (0) Print
Expand All
Expand Minimize

Set-ASInstanceUnloadPolicy

Set-ASInstanceUnloadPolicy

Sets the Instance Unload Policy at the specified scope.

Syntax

Parameter Set: SiteNameAndVirtualPath
Set-ASInstanceUnloadPolicy [-SiteName] <String> [[-VirtualPath] <String> ] [-TimeToPersist <TimeSpan> ] [-TimeToUnload <TimeSpan> ] [-UseInherited] [-Confirm] [-WhatIf] [ <CommonParameters>]


Detailed Description

The Set-ASInstanceUnloadPolicy cmdlet adds workflowIdle element if the element does not already exist and sets the values of timeToUnload and timeToPersist attributes on the element.

When you use the parameter –UseInherited with this cmdlet, the cmdlet removes any workflowIdle element or <remove name=”workflowIdle”> element associated for the element at the specified scope so that workflowIdle behavior settings are inherited from a higher scope.

Parameters

-ApplicationObject<ApplicationInfo>

The name of the ApplicationObject, which specifies that the cmdlet will operate on that application. This parameter is used to pipe the output of the Get-ASApplication cmdlet to a cmdlet containing the ApplicationObject parameter.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

-Root

The name of the root application, which specifies that the cmdlet will operate at that scope. If you use the Root parameter, do not use the SiteName, VirtualPath, or Uri parameter.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

-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 that site, or at the scope of an application, virtual directory, or service contained within that site. To the SiteName parameter, you can add the VirtualPath parameter that identifies an application, directory, or service included in the site.

For an application or virtual directory, the virtual path includes the name of the application, as defined in IIS. 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. The VirtualPath parameter is not necessary for the site scope. 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?

-TimeToPersist<TimeSpan>

Specifies how long a workflow service instance can be in idle state before the host persists the instance into the persistence database. The value is a time value of the format hh:mm:ss:mmm. The default value for this parameter is TimeSpan.MaxValue seconds.

When the value of this parameter is set to TimeSpan.MaxValue, the runtime never persists workflow instances when they are idle. If the value is set to 0, the host aggressively persists an instance as soon as the instance becomes idle.

If both timeToPersist and timeToUnload values are specified, the persist timeout value needs to be less than the unload timeout value, or the instance will not be persisted.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

-TimeToUnload<TimeSpan>

Specifies how long a workflow service instance can be in idle state before the host unloads the instance from memory and persists the instance state information into the persistence database.

The value is a time value of the format hh:mm:ss:mmm. The default value for this parameter is 60 seconds. If the value is set to 0, the host aggressively persists and unloads an instance as soon as the instance becomes idle. The maximum allowed value is TimeSpan.MaxValue.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

-Uri<Uri>

A URI for an IIS site, application, virtual directory, or service, which specifies that the cmdlet will operate at that scope. If you use the Uri parameter, do not use the SiteName parameter or the SiteName and VirtualPath parameter set.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

-UseInherited

Use this parameter to inherit settings from the higher scope. When you use this parameter, the cmdlet removes any workflowIdle behavior defined at the specified level.

The cmdlet also removes any <remove name=”workflowIdle”> element associated for the element at the specified scope.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

-VirtualPath<String>

The virtual path for an application, directory, or service, as defined in the IIS Manager Connections pane, which specifies that the cmdlet will operate at the application, virtual directory, or service. You must add the VirtualPath parameter to the SiteName parameter, using SiteName to identify the site that the application, directory, or service is contained within. The leading "/" character in the virtual path is optional.

For an application, the virtual path includes the name of the application, as defined in IIS. 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.ps_virtualpath


Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

-Confirm

Prompts you for confirmation before executing the command.


Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.


Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<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.

  • ApplicationInfo and ServiceInfo


Outputs

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

  • None.


Examples

Example 1

This command sets the Instance Unload Policy at the root level. In this example, values for both TimeToUnload and TimeToPersist parameters are specified. You can specify the value for only one of these parameters if you want.


Set-ASInstanceUnloadPolicy -Root -TimeToUnload "00:00:40" –TimeToPersist “00:00:20”

Example 2

This command sets the Instance Unload Policy at the Web site level.


Set-ASInstanceUnloadPolicy –SiteName “Default Web Site” -TimeToUnload "00:00:40" –TimeToPersist “00:00:20”

Example 3

These commands set the Instance Unload Policy at the application level.


Set-ASInstanceUnloadPolicy –SiteName “Default Web Site” VirtualPath “/SampleService” -TimeToUnload "00:00:40" –TimeToPersist “00:00:20”Get-ASApplication –SiteName “Default Web Site” –VirtualPath “/SampleService” | Set-ASInstanceUnloadPolicy -TimeToUnload "00:00:40" –TimeToPersist “00:00:20”

Example 4

These commands set the Instance Unload Policy at the service level.


Set-ASInstanceUnloadPolicy –SiteName “Default Web Site” –VirtualPath “/SampleService/SampleService.xamlx” -TimeToUnload "00:00:40" –TimeToPersist “00:00:20”Get-ASAppService –SiteName “Default Web Site” –VirtualPath “/SampleService/SampleService.xamlx” | Set-ASInstanceUnloadPolicy -TimeToUnload "00:00:40" –TimeToPersist “00:00:20”

Example 5

These commands set the Instance Unload Policy at the level determined by the value of the Uri parameter.


Set-ASInstanceUnloadPolicy –Uri http://localhost -TimeToUnload "00:00:40" –TimeToPersist “00:00:20”Set-ASInstanceUnloadPolicy –Uri http://localhost/sampleservice/ -TimeToUnload "00:00:40" –TimeToPersist “00:00:20”Set-ASInstanceUnloadPolicy –Uri http://localhost/sampleservice/sampleservice.xamlx -TimeToUnload "00:00:40" –TimeToPersist “00:00:20”

Example 6

This command configures a service to inherit Instance Unload Policy settings from a higher scope.


Set-ASInstanceUnloadPolicy –SiteName “Default Web Site” –VirtualPath “/SampleService/SampleService.xamlx” -UseInherited
Show:
© 2014 Microsoft