New-WssMsoSharePointLibrary
Creates a sp_online_2 library.
New-WssMsoSharePointLibrary
[-Name] <String>
[[-Description] <String>]
[[-LibraryType] <SharePointLibraryType>]
[[-Site] <SharePointSite>]
[-EnableVersioning]
[-ForceCheckout]
[<CommonParameters>]
The New-WssMsoSharePointLibrary cmdlet creates a sp_online_1 library. A office_365_1 site stores the sp_online_2 library.
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
SharePointLibraryType: DocumentLibrary = 101, PictureLibrary = 109, WebPageLibrary = 119
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.
Specifies a description of a sp_online_2 library. The cmdlet creates the library with the description that you specify.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Indicates that versioning is enabled for this library.
Type: | SwitchParameter |
Position: | 4 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Indicates that force checkout is enabled for this library.
Type: | SwitchParameter |
Position: | 5 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the type of a sp_online_2 library. The cmdlet creates the library with the type that you specify.
Type: | SharePointLibraryType |
Accepted values: | NoListTemplate, DocumentLibrary, PictureLibrary, WebPageLibrary, InvalidType |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the name of a library. The cmdlet creates the sp_online_2 library with the name that you specify.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies a sp_online_2 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.
Type: | SharePointSite |
Position: | 3 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
SharePointLibrary