Get a Specific Blocked File Type

Scenario/Problem: You need to obtain a specific trusted file location reference.

Solution: Use the Get-SPExcelBlockedFileType cmdlet to assign a variable the results using the -Identity and -ExcelServiceApplication parameters.

Providing the identity of the blocked file type to the Get-SPExcelBlockedFileType cmdlet retrieves a specific blocked file type instance. Use this to assign the results to a variable for use in other cmdlets, as shown in Listing 21.15.

Listing 21.15. Assigning a Variable to a Specific Blocked File Type

$blockedFileType = Get-SPExcelBlockedFileType-Identity "XLSB" -ExcelServiceApplication "Excel Services Application"

Tip

When you are creating a new blocked file type, the Identity becomes ...

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.