Set-WssMediaLibraryInclusion

Includes or excludes a shared folder from the Media Library.

Syntax

Set-WssMediaLibraryInclusion
   [-Share] <MediaStreamingSharedFolder>
   [-Enable] <Boolean>

Description

The Set-WssMediaLibraryInclusion cmdlet includes a shared folder in, or excludes a shared folder from, the Media Library for the current server.

Examples

Example 1: Exclude a shared folder from the Media Library

PS C:\> $MediaFolders = Get-WssMediaSharedFolder PS C:\>Set-WssMediaLibraryInclusion -Share $MediaFolders[0] -Enable $False

This example excludes a shared folder from the Media Library. The first command uses the Get-WssMediaSharedFolder cmdlet to get the shared folders for the current server, and then stores them in the $MediaFolders variable. In this example, the server has more than one folder in the Media Library, so $MediaFolders contains an array.

The second command excludes a folder from the Media Library. The command specifies a value of $False for the Enable parameter. The command uses standard array syntax to specify the first member of the array stored in the $MediaFolders variable.

Parameters

-Enable

Indicates whether the cmdlet includes or excludes the specified folder from the Media Library. Specify a value of $True to include the folder in the Media Library. Specify a value of $False to exclude the folder.

Type:Boolean
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Share

Specifies a shared folder on the server.

Type:MediaStreamingSharedFolder
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False