Skip to content

Add-OrgAssetsLibrary

SharePoint Online: Adds an organization assets library

#Requires -Version 5.1
#Requires -Modules Microsoft.Online.SharePoint.PowerShell

[CmdletBinding()]
Param(
    [Parameter(Mandatory = $true)]
    [string]$LibraryUrl
)

Process {
    try {
        $result = Add-SPOOrgAssetsLibrary -LibraryUrl $LibraryUrl -ErrorAction Stop | Select-Object *
        if ($null -ne $result) { $result | Add-Member -NotePropertyName Timestamp -NotePropertyValue (Get-Date -Format "yyyy-MM-dd HH:mm:ss") -PassThru -Force }
    }
    catch { throw }
}

URL of the library to add as an organization asset

An interactive directory of PowerShell scripts.