npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

skyline-sppowershell

v3.0.8

Published

Skyline NPM PowerShell Scripts for SharePoint

Downloads

13

Readme

Skyline SPPowershell

Add-SkylineContentEditorWebPart

SYNOPSIS

Uploads a content editor webpart to the Web Part Gallery

SYNTAX

Add-SkylineContentEditorWebPart [-Title] <String> [-ContentLink] <String> [[-Description] <String>] [[-Group] <String>] [[-FileName] <String>] [[-Web] <Web>] [<CommonParameters>]

DESCRIPTION

Uploads a content editor webpart to the Web Part Gallery

PARAMETERS

-Title <String>

Name of the webpart

Required?                    true
Position?                    1
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-ContentLink <String>

Absolute path of of the Content Link property

Example: "https://site.sharepoint.com/style library/webparts/widget1.html"

Required?                    true
Position?                    2
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Description <String>

Description of the webpart

Required?                    false
Position?                    3
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Group <String>

Group which the webpart should belong to. Default is 'Custom'

Required?                    false
Position?                    4
Default value                Custom
Accept pipeline input?       false
Accept wildcard characters?  false

-FileName <String>

File name of the webpart file that gets uploaded to the web part gallery. File extension will be added if not included. Default is Title parameter with .dwp extension (e.g. -Title "MyWebPart" becomes -FileName "MyWebPart.dwp")

Required?                    false
Position?                    5
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Web <Web>

The web to apply the command to. Omit this parameter to use the current web.

Required?                    false
Position?                    6
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

NOTES

EXAMPLES

EXAMPLE 1

PS C:\>Add new content editor web part with the group 'Intranet' and content link 'https://site.sharepoint.com/style library/webparts/widget1.html'

Add-SkylineContentEditorWebPart -Title "Widget1" -Description "The best widget" -Group "Intranet" -ContentLink "https://site.sharepoint.com/style library/webparts/widget1.html"

Add-SkylineCSSLinkCustomAction

SYNOPSIS

Adds a script block custom action which loads the specified CSS url on the page

SYNTAX

Add-SkylineCSSLinkCustomAction [-Name] <String> [-Url] <String> [[-Sequence] <Int32>] [[-Scope] <String>] [-HideBodyOnLoad] [[-Web] <Web>] [<CommonParameters>]

DESCRIPTION

Adds a script block custom action which loads the specified CSS url on the page

PARAMETERS

-Name <String>

Name of the CSS link custom action

Required?                    true
Position?                    1
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Url <String>

Absolute path of of the CSS Link

Example: "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"

Required?                    true
Position?                    2
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Sequence <Int32>

A sequence number that defines the order on the page, defaults to 100

Required?                    false
Position?                    3
Default value                100
Accept pipeline input?       false
Accept wildcard characters?  false

-Scope <String>

The scope of the script to add to. Either Web or Site, defaults to Site

Required?                    false
Position?                    4
Default value                Site
Accept pipeline input?       false
Accept wildcard characters?  false

-HideBodyOnLoad <SwitchParameter>

Optionally hide tag via opacity:0 while the css url is being loaded to prevent jarring user experience

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Accept wildcard characters?  false

-Web <Web>

The web to apply the command to. Omit this parameter to use the current web.

Required?                    false
Position?                    5
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

NOTES

EXAMPLES

EXAMPLE 1

PS C:\>Add bootstrap CSS to every page in the site collection

Add-SkylineCSSLinkCustomAction -Name "BootstrapCss" -Url "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"

Add-SkylineFieldIndex

SYNOPSIS

Sets a SharePoint list field to be indexed

SYNTAX

Add-SkylineFieldIndex [-Identity] <String> [-List] <String> [[-Web] <Web>] [<CommonParameters>]

DESCRIPTION

Sets a SharePoint list field to be indexed

PARAMETERS

-Identity <String>

Name of the field to update

Required?                    true
Position?                    1
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-List <String>

Display name of the list which contains the field

Required?                    true
Position?                    2
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Web <Web>

The web to apply the command to. Omit this parameter to use the current web.

Required?                    false
Position?                    3
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

NOTES

EXAMPLES

EXAMPLE 1

PS C:\>Set the Title field on the Announcements list to be indexed

Add-SkylineFieldIndex -Identity "Title" -List "Announcements"

EXAMPLE 2

PS C:\>Set the Title field on the Announcements list to be indexed on a specific Web which may not be the currently connected web

Add-SkylineFieldIndex -Identity "Title" -List "Announcements" -Web $Subweb

Add-SkylineFiles

SYNOPSIS

Uploads multiple files and folders from a local path to a remote site

SYNTAX

Add-SkylineFiles [-Path] <String> [-Folder] <String> [[-Includes] <String[]>] [[-Excludes] <String[]>] [-Recurse] [-Checkout] [[-CheckInComment] <String>] [-Approve] [[-ApproveComment] <String>] [-Publish] [[-PublishComment] <String>] [-UseWebDav] [[-Web] <Web>] [<CommonParameters>]

DESCRIPTION

Uploads multiple files and folders from a local path to a remote site

PARAMETERS

-Path <String>

Local path to folder containing files to upload

Required?                    true
Position?                    1
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Folder <String>

Remote site-relative folder to upload files into

Required?                    true
Position?                    2
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Includes <String[]>

Array of wildcard-like strings which are matched against local file paths and included in upload. When -Includes is specified, everything else is excluded by default.

Example 1: -Includes ".js", ".css" Example 2: -Includes "/dist/js/"

Required?                    false
Position?                    3
Default value                @()
Accept pipeline input?       false
Accept wildcard characters?  false

-Excludes <String[]>

Array of wildcard-like strings which are matches against local files paths and excluded from upload. When -Excludes is specified with an -Includes, the -Excludes will run after and exclude from the narrowed result set.

Example 1: -Excludes "/img/" Example 2: -Excludes ".map"

Required?                    false
Position?                    4
Default value                @()
Accept pipeline input?       false
Accept wildcard characters?  false

-Recurse <SwitchParameter>

TRUE by default. Will recurively upload any subfolders found in the -Path directory. Set -Recurse:$False to disable and only upload the files found in the -Path directory.

Required?                    false
Position?                    named
Default value                True
Accept pipeline input?       false
Accept wildcard characters?  false

-Checkout <SwitchParameter>

If versioning is enabled, this will check out the file first if it exists, upload the file, then check it in again.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Accept wildcard characters?  false

-CheckInComment <String>

The comment added to the checkin.

Required?                    false
Position?                    5
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Approve <SwitchParameter>

Will auto approve the uploaded file.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Accept wildcard characters?  false

-ApproveComment <String>

The comment added to the approval.

Required?                    false
Position?                    6
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Publish <SwitchParameter>

Will auto publish the file.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Accept wildcard characters?  false

-PublishComment <String>

The comment added to the publish action.

Required?                    false
Position?                    7
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-UseWebDav <SwitchParameter>

Use Web Dav for the upload.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       false
Accept wildcard characters?  false

-Web <Web>

The web to apply the command to. Omit this parameter to use the current web.

Required?                    false
Position?                    8
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

NOTES

EXAMPLES

EXAMPLE 1

PS C:\>Add-SkylineFiles -Path C:\dev\app\dist -Folder "Style Library/app" -Includes "*.js", "*.css"

Add-SkylineScriptEditorWebPart

SYNOPSIS

Uploads a script editor webpart to the Web Part Gallery

SYNTAX

Add-SkylineScriptEditorWebPart [-Title] <String> [-Content] <String> [[-Description] <String>] [[-Group] <String>] [[-FileName] <String>] [[-Web] <Web>] [<CommonParameters>]

DESCRIPTION

Uploads a script editor webpart to the Web Part Gallery

PARAMETERS

-Title <String>

Name of the webpart

Required?                    true
Position?                    1
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Content <String>

Script to include within the script editor web part

Required?                    true
Position?                    2
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Description <String>

Description of the webpart

Required?                    false
Position?                    3
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Group <String>

Group which the webpart should belong to. Default is 'Custom'

Required?                    false
Position?                    4
Default value                Custom
Accept pipeline input?       false
Accept wildcard characters?  false

-FileName <String>

File name of the webpart file that gets uploaded to the web part gallery. File extension will be added if not included. Default is Title parameter with .webpart extension (e.g. -Title "MyWebPart" becomes -FileName "MyWebPart.webpart")

Required?                    false
Position?                    5
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Web <Web>

The web to apply the command to. Omit this parameter to use the current web.

Required?                    false
Position?                    6
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

NOTES

EXAMPLES

EXAMPLE 1

PS C:\>Add new script editor web part with the group 'Intranet' and javascript hello world alert

Add-SkylineScriptEditorWebPart -Title "Widget1" -Description "The best widget" -Group "Intranet" -Content "<script>window.alert('hello world');</script>"

Add-SkylineWebPart

SYNOPSIS

Uploads a webpart file to the Web Part Gallery

SYNTAX

Add-SkylineWebPart -Path <String> [-Group <String>] [-Web <Web>] [<CommonParameters>]



Add-SkylineWebPart -Stream <Object> -FileName <String> [-Group <String>] [-Web <Web>] [<CommonParameters>]

DESCRIPTION

Uploads a webpart file to the Web Part Gallery

PARAMETERS

-Path <String>

Local path to the webpart xml file

Required?                    true
Position?                    named
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Stream <Object>

Stream with the file contents

Required?                    true
Position?                    named
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-FileName <String>

Name of the webpart file when using a stream, be sure to include .dwp or .webpart (e.g. mywebpart.dwp)

Required?                    true
Position?                    named
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Group <String>

Group which the webpart should belong to. Default is 'Custom'

Required?                    false
Position?                    named
Default value                Custom
Accept pipeline input?       false
Accept wildcard characters?  false

-Web <Web>

The web to apply the command to. Omit this parameter to use the current web.

Required?                    false
Position?                    named
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

NOTES

EXAMPLES

EXAMPLE 1

PS C:\>Uploads a webpart file from local machine to Web Part Gallery

Add-SkylineWebPart -Path "C:\Webparts\MyWebpart.dwp" -Group "Intranet"

Apply-SkylineSchemas

SYNOPSIS

Find all .xml files in a directory and applies them to a site

SYNTAX

Apply-SkylineSchemas [-Directory] <String> [[-Web] <Web>] [<CommonParameters>]

DESCRIPTION

Find all .xml files in a directory and applies them to a site

Reference: https://github.com/SharePoint/PnP-Provisioning-Schema

PARAMETERS

-Directory <String>

Local directory where the XML files are located

Required?                    true
Position?                    1
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Web <Web>

The web to apply the command to. Omit this parameter to use the current web.

Required?                    false
Position?                    2
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

NOTES

EXAMPLES

EXAMPLE 1

PS C:\>Save-SkylineListProvisioningSchema -Directory "C:\Schemas"

Get-SkylineCustomAction

SYNOPSIS

Gets all site and web scoped custom actions

SYNTAX

Get-SkylineCustomAction [[-Name] <String>] [[-Web] <Web>] [<CommonParameters>]

DESCRIPTION

Gets all site and web scoped custom actions

PARAMETERS

-Name <String>

Name of the custom action to get, can be site or web scoped

Required?                    false
Position?                    1
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Web <Web>

The web to apply the command to. Omit this parameter to use the current web.

Required?                    false
Position?                    2
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

NOTES

EXAMPLES

EXAMPLE 1

PS C:\>Get-SkylineCustomAction

EXAMPLE 2

PS C:\>Get-SkylineCustomAction -Name "SiteOrWebCustomAction"

EXAMPLE 3

PS C:\>Get-SkylineCustomAction -Web $Subweb

Get-SkylineExperience

SYNOPSIS

Gets the experience for a site collection or web

SYNTAX

Get-SkylineExperience [-Scope] <String> [[-Web] <Web>] [<CommonParameters>]

DESCRIPTION

Gets the experience for a site collection or web

PARAMETERS

-Scope <String>

Specify whether to get the experience on the Web or Site

Required?                    true
Position?                    1
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Web <Web>

The web to apply the command to. Omit this parameter to use the current web.

Required?                    false
Position?                    2
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

NOTES

EXAMPLES

EXAMPLE 1

PS C:\>Get-SkylineExperience -Scope Site

EXAMPLE 2

PS C:\>Get-SkylineExperience -Scope Web

Remove-SkylineFieldIndex

SYNOPSIS

Removes a SharePoint list field index

SYNTAX

Remove-SkylineFieldIndex [-Identity] <String> [-List] <String> [[-Web] <Web>] [<CommonParameters>]

DESCRIPTION

Removes a SharePoint list field index

PARAMETERS

-Identity <String>

Name of the field to update

Required?                    true
Position?                    1
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-List <String>

Display name of the list which contains the field

Required?                    true
Position?                    2
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Web <Web>

The web to apply the command to. Omit this parameter to use the current web.

Required?                    false
Position?                    3
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

NOTES

EXAMPLES

EXAMPLE 1

PS C:\>Removes the Title field index on the Announcements list

Remove-SkylineFieldIndex -Identity "Title" -List "Announcements"

EXAMPLE 2

PS C:\>Removes the Title field index on the Announcements list on a specific Web which may not be the currently connected web

Remove-SkylineFieldIndex -Identity "Title" -List "Announcements" -Web $Subweb

Save-SkylineContentTypeSchema

SYNOPSIS

Extracts the PnP Provisioning Schema XML for the specific site content type(s)

SYNTAX

Save-SkylineContentTypeSchema [-ContentType] <String[]> [-Path] <String> [[-Web] <Web>] [<CommonParameters>]

DESCRIPTION

Extracts the PnP Provisioning Schema XML for the specific site content type(s)

Reference: https://github.com/SharePoint/PnP-Provisioning-Schema

PARAMETERS

-ContentType <String[]>

Title of the target content type. May pass multiple content types as -ContentType "ContentType1", "ContentType2"

Required?                    true
Position?                    1
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Path <String>

Path to export the provisioning schema to. Example: C:\ProvisioningSchemas\ContentType1.xml

Required?                    true
Position?                    2
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Web <Web>

The web to apply the command to. Omit this parameter to use the current web.

Required?                    false
Position?                    3
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

NOTES

EXAMPLES

EXAMPLE 1

PS C:\>Save-SkylineContentTypeSchema -ContentType "ContentType1" -Path "C:\ProvisioningSchemas\ContentType1.xml"

Save-SkylineFieldSchema

SYNOPSIS

Extracts the PnP Provisioning Schema XML for the specific site fields(s)

SYNTAX

Save-SkylineFieldSchema [-Field] <String[]> [-Path] <String> [[-Web] <Web>] [<CommonParameters>]

DESCRIPTION

Extracts the PnP Provisioning Schema XML for the specific site fields(s)

Reference: https://github.com/SharePoint/PnP-Provisioning-Schema

PARAMETERS

-Field <String[]>

Title of the target field. May pass multiple fields as -ContentType "SiteField1", "SiteField1"

Required?                    true
Position?                    1
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Path <String>

Path to export the provisioning schema to. Example: C:\ProvisioningSchemas\SiteField1.xml

Required?                    true
Position?                    2
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Web <Web>

The web to apply the command to. Omit this parameter to use the current web.

Required?                    false
Position?                    3
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

NOTES

EXAMPLES

EXAMPLE 1

PS C:\>Save-SkylineFieldSchema -Field "SiteField1" -Path "C:\ProvisioningSchemas\SiteField1.xml"

Save-SkylineListSchema

SYNOPSIS

Extracts the PnP Provisioning Schema XML for the specific list(s)

SYNTAX

Save-SkylineListSchema [-List] <String[]> [-Path] <String> [[-Web] <Web>] [<CommonParameters>]

DESCRIPTION

Extracts the PnP Provisioning Schema XML for the specific list(s)

Reference: https://github.com/SharePoint/PnP-Provisioning-Schema

PARAMETERS

-List <String[]>

Title of the target list. May pass multiple lists as -List "List1", "List2"

Required?                    true
Position?                    1
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Path <String>

Path to export the schema to. Example: C:\Schemas\Documents.xml

Required?                    true
Position?                    2
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Web <Web>

The web to apply the command to. Omit this parameter to use the current web.

Required?                    false
Position?                    3
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

NOTES

EXAMPLES

EXAMPLE 1

PS C:\>Save-SkylineListProvisioningSchema -List "Documents" -Path "C:\Schemas\Documents.xml"

Save-SkylineTermSetSchema

SYNOPSIS

Extracts the PnP Provisioning Schema XML for the specific term group and term set

SYNTAX

Save-SkylineTermSetSchema [-TermGroup] <String> [-TermSet] <String> [-Path] <String> [[-Web] <Web>] [<CommonParameters>]

DESCRIPTION

Extracts the PnP Provisioning Schema XML for the specific term group and term set

Reference: https://github.com/SharePoint/PnP-Provisioning-Schema

PARAMETERS

-TermGroup <String>

Name of the parent term group

Required?                    true
Position?                    1
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-TermSet <String>

Name of the term set

Required?                    true
Position?                    2
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Path <String>

Path to export the schema to. Example: C:\Schemas\Terms.xml

Required?                    true
Position?                    3
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Web <Web>

The web to apply the command to. Omit this parameter to use the current web.

Required?                    false
Position?                    4
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

NOTES

EXAMPLES

EXAMPLE 1

PS C:\>Save-SkylineListProvisioningSchema -TermGroup "Skyline" -TermSet "Departments" -Path "C:\Schemas\Terms.xml"

Set-SkylineExperience

SYNOPSIS

Sets the experience for a site collection or web to classic or modern

SYNTAX

Set-SkylineExperience [-Mode] <String> [-Scope] <String> [[-Web] <Web>] [<CommonParameters>]

DESCRIPTION

Sets the experience for a site collection or web to classic or modern

PARAMETERS

-Mode <String>

Specify Classic or Modern experience

Required?                    true
Position?                    1
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Scope <String>

Specify whether to apply the experience to the Web or Site

Required?                    true
Position?                    2
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

-Web <Web>

The web to apply the command to. Omit this parameter to use the current web.

Required?                    false
Position?                    3
Default value
Accept pipeline input?       false
Accept wildcard characters?  false

NOTES

EXAMPLES

EXAMPLE 1

PS C:\>Set-SkylineExperience -Mode Classic -Scope Site

EXAMPLE 2

PS C:\>Set-SkylineExperience -Mode Modern -Scope Web