Scenario/Problem: You need to create a new trusted file location for Excel Services.
Solution: Use the New-SPExcelFileLocation
cmdlet.
The New-SPExcelFileLocation
cmdlet can be used to create a new trusted location to access Excel workbooks. Provide the address of the location and the Excel Services Application instance, as shown in Listing 21.1.
New-SPExcelFileLocation -Address "http://sp2010/Excel Workbooks"
-ExcelServiceApplication "Excel Services Application"
-LocationType SharePoint -IncludeChildren
The -LocationType
parameter can be one of the following:
• SharePoint
(default)
• UNC
• HTTP
The -IncludeChildren
switch parameter is used to specify that any folders or locations underneath the address should also be trusted.
Upon successful creation of the new trusted file location, a summary of the properties is displayed, as shown in Figure 21.1.
Tip
The default Excel Services application is named “Excel Services Application.” To find the correct name or GUID, use Get-SPServiceApplication
or Get-SPExcelServiceApplication
.
3.137.171.121