Remove a Trusted File Location

Scenario/Problem: You need to remove a trusted file location from Excel Services.

Solution: Use the Remove-SPExcelFileLocation cmdlet with a trusted file location variable.

The Remove-SPExcelFileLocation cmdlet enables you to remove a specific trusted file location from Excel Services. Use this in conjunction with the Get-SPExcelFileLocation cmdlet (explained in a previous section), as shown in Listing 21.4.

Listing 21.4. Sample Script for Removing a Trusted File Location

$trustedLocation = Get-SPExcelFileLocation -Identity "http://sp2010/ExcelWorkbooks" -ExcelServiceApplication "Excel Services Application"Remove-SPExcelFileLocation $trustedLocation-ExcelServiceApplication "Excel Service Application"

Note ...

Get PowerShell™ for SharePoint® 2013 How-To now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.