Search Results for

    Show / Hide Table of Contents

    Add-PnPFolderUserSharingLink

    SYNOPSIS

    Creates a sharing link to share a folder with a list of specified users.

    SYNTAX

    Add-PnPFolderUserSharingLink -Folder <FolderPipeBind> -Type <PnP.Core.Model.Security.ShareType> -Users <String[]> [-Connection <PnPConnection>] 
    

    DESCRIPTION

    Creates a new user sharing link for a folder.

    EXAMPLES

    EXAMPLE 1

    Add-PnPFolderUserSharingLink -Folder "/sites/demo/Shared Documents/Test" -Users "john@contoso.onmicrosoft.com","jane@contoso.onmicrosoft.com"
    

    This will create an user sharing link for Test folder in the Shared Documents library which will be viewable to specified users in the organization.

    EXAMPLE 2

    Add-PnPFolderUserSharingLink -Folder "/sites/demo/Shared Documents/Test" -Type Edit -Users "john@contoso.onmicrosoft.com","jane@contoso.onmicrosoft.com"
    

    This will create an user sharing link for Test folder in the Shared Documents library which will be editable by specified users in the organization.

    PARAMETERS

    -Connection

    Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

    Type: PnPConnection
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Folder

    The folder in the site

    Type: FolderPipeBind
    Parameter Sets: (All)
    
    Required: True
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -ShareType

    The type of sharing that you want to, i.e do you want to enable people in your organization to view the shared content or also edit the content?

    Review and BlocksDownload values are not supported.

    Type: PnP.Core.Model.Security.ShareType
    Parameter Sets: (All)
    
    Required: False
    Position: Named
    Default value: View
    Accept pipeline input: False
    Accept wildcard characters: False
    

    -Users

    The UPN(s) of the user(s) to with whom you would like to share the folder.

    Type: String[]
    Parameter Sets: (All)
    
    Required: True
    Position: Named
    Default value: None
    Accept pipeline input: False
    Accept wildcard characters: False
    

    RELATED LINKS

    Microsoft 365 Patterns and Practices

    Back to top Generated by DocFX spacer