Remove-WssMsoSharePointLibrary

Removes a sp_online_2 library.

Syntax

Remove-WssMsoSharePointLibrary
      [-Library] <SharePointLibrary>
      [-Force]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-WssMsoSharePointLibrary cmdlet removes a sp_online_1 library. A office_365_1 site stores the sp_online_2 library.

Examples

Example 1: Remove a SharePoint library

PS C:\> $Library = Get-WssMsoSharePointLibrary | Select-Object -First 1
PS C:\> Remove-WssMsoSharePointLibrary -Library $Library

The first command uses the Get-WssMsoSharePointLibrary cmdlet to get a library, and stores the result in the $Library variable.

The second command removes the library named $Library.

1:

PS C:\>

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Forces the command to run without asking for user confirmation.

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

-Library

Specifies a sp_online_2 library object. The cmdlet removes the library that you specify.

Type:SharePointLibrary
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.WindowsServerSolutions.O365Integration.SharePointLibrary

Library

Type: Microsoft.WindowsServerSolutions.O365Integration.SharePointLibrary

Description: SharePoint library