Set-WssMediaLibraryInclusion
Set-WssMediaLibraryInclusion
Includes or excludes a shared folder from the Media Library.
Syntax
Parameter Set: Default
Set-WssMediaLibraryInclusion [-Share] <MediaStreamingSharedFolder> [-Enable] <Boolean> [ <CommonParameters>]
Detailed Description
The Set-WssMediaLibraryInclusion cmdlet includes a shared folder in, or excludes a shared folder from, the Media Library for the current server.
Parameters
-Enable<Boolean>
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.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Share<MediaStreamingSharedFolder>
Specifies a shared folder on the server.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Example 1: Exclude a shared folder from the Media Library
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.
PS C:\> $MediaFolders = Get-WssMediaSharedFolder
PS C:\> Set-WssMediaLibraryInclusion -Share $MediaFolders[0] -Enable $False