New-SPOfficeWebAppsCache

 

Applies to: SharePoint Server 2010

Topic Last Modified: 2010-02-11

Banner stating end of support date for Office 2010 with link to more info

Creates a new Microsoft Office Web Apps cache for a given Web application.

Syntax

New-SPOfficeWebAppsCache [-WebApplication] <SPWebApplicationPipeBind> -MaxSizeInBytes <Int64> -Owner <SPUser> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-ExpirationPeriodInDays <Int32>] [-WarningSizeInBytes <Int64>] [-WhatIf [<SwitchParameter>]]

Detailed Description

The New-SPOfficeWebAppsCache cmdlet creates a new rendering cache for a particular Web application. There can be at most one cache per Web application. Every Web application must have a rendering cache associated with it to guarantee optimal performance of the Word Viewing Service and PowerPoint Service applications.

Parameters

Parameter Required Type Description

WebApplication

Required

Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind

Specifies the Web application in which the Office Web Apps cache are created.

MaxSizeInBytes

Required

System.Int64

Specifies the size in bytes of the cache. After the limit is exceeded, the next expiration timer job will remove the oldest items in the cache until the cache is below quota. The default value is 107374182400.

Owner

Required

Microsoft.SharePoint.SPUser

Specifies the owner of the Office Web Apps cache.

AssignmentCollection

Optional

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

Note

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Confirm

Optional

System.Management.Automation.SwitchParameter

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

ExpirationPeriodInDays

Optional

System.Int32

Specifies the amount of time since creation that cached renditions are to be stored.

The default value is 30.

WarningSizeInBytes

Optional

System.Int64

Specifies the threshold, in bytes, at which the owner starts to receive alerts that the companion cache is nearing its quota limit.

WhatIf

Optional

System.Management.Automation.SwitchParameter

Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters

Input Types

Return Types

Example

-------------EXAMPLE--------------

>$owner = New-SPUser -UserAlias domain\user -Web "http://sitename"

New-SPOfficeWebAppsCache -WebApplication "SharePoint - 80" -Owner $owner -MaxSizeInBytes 214748364800

This example creates a new Office Web Apps cache on SharePoint - 80 with a maximum capacity of 200 gigabytes (GB).