New-WssMsoSharePointLibrary

New-WssMsoSharePointLibrary

Creates a library.

Syntax

Parameter Set: Default
New-WssMsoSharePointLibrary [-Name] <String> [[-Description] <String> ] [[-LibraryType] <SharePointLibraryType> {InvalidType | NoListTemplate | DocumentLibrary | PictureLibrary | WebPageLibrary} ] [[-Site] <SharePointSite> ] [[-EnableVersioning]] [[-ForceCheckout]] [ <CommonParameters>]

Detailed Description

The New-WssMsoSharePointLibrary cmdlet creates a library. A site stores the library.

Parameters

-Description<String>

Specifies a description of a library. The cmdlet creates the library with the description that you specify.

Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-EnableVersioning

Indicates that versioning is enabled for this library.

Aliases

none

Required?

false

Position?

5

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ForceCheckout

Indicates that force checkout is enabled for this library.

Aliases

none

Required?

false

Position?

6

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-LibraryType<SharePointLibraryType>

Specifies the type of a library. The cmdlet creates the library with the type that you specify.

Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of a library. The cmdlet creates the library with the name that you specify.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-Site<SharePointSite>

Specifies a site. The cmdlet creates the library in the site that you specify. If you do not specify this parameter, the cmdlet creates the library under the default site.

Aliases

none

Required?

false

Position?

4

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

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.

  • System.String

    Name

    Type: System.String

    Description: Name of the SharePoint library

Outputs

The output type is the type of the objects that the cmdlet emits.

  • SharePointLibrary

Examples

Example 1: Create a SharePoint library

The first command uses the Get-WssMsoSharePointSite cmdlet to get a site, and saves the result in the $Site variable.

The second command creates a SharePoint Online library in the site specified in the $Site variable.

PS C:\> $Site = Get-WssMSOSharePointSite | Select-Object -First 1
PS C:\> New-WssMsoSharePointLibrary -Name "Documents" -Description "SharePoint library used to share documents." -LibraryType "DocumentLibrary" -Site $Site -EnableVersioning

Get-WssMsoSharePointLibrary

Remove-WssMsoSharePointLibrary

Set-WssMsoSharePointLibrary