Search Results for

    Show / Hide Table of Contents

    Remove-PnPFolderSharingLink

    SYNOPSIS

    Removes sharing links associated with a folder.

    SYNTAX

    Remove-PnPFolderSharingLink -Folder <FolderPipeBind> -Identity <String> -Force <SwitchParamter> [-Connection <PnPConnection>] 
    

    DESCRIPTION

    Removes sharing links associated with a folder.

    EXAMPLES

    EXAMPLE 1

    Remove-PnPFolderSharingLink -Folder "/sites/demo/Shared Documents/Test"
    

    This will delete all the sharing links associated with the Test folder in the Shared Documents document library.

    EXAMPLE 2

    Remove-PnPFolderSharingLink -Folder "/sites/demo/Shared Documents/Test" -Force
    

    This will delete all the sharing links associated with the Test folder in the Shared Documents document library. User will not be prompted for confirmation.

    EXAMPLE 3

    $sharingLinks = Get-PnPFolderSharingLink -Folder "/sites/demo/Shared Documents/Test"
    Remove-PnPFolderSharingLink -Folder "/sites/demo/Shared Documents/Test" -Identity $sharingLinks[0].Id -Force
    

    This will delete the first sharing link associated with the Test folder in the Shared Documents document library. User will not be prompted for confirmation.

    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
    

    -Identity

    The Id of the sharing link associated with the folder. You can retrieve the identity using Get-PnPFolderSharingLink cmdlet.

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

    -Force

    If provided, no confirmation will be requested and the action will be performed

    Type: String
    Parameter Sets: (All)
    
    Required: False
    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