New command: `m365 spo folder sharinglink clear`
MathijsVerbeeck opened this issue ยท 4 comments
MathijsVerbeeck commented
Usage
m365 spo folder sharinglink clear [options]
Description
Removes all sharing links of a folder
Options
Option | Description |
---|---|
-u, --webUrl <webUrl> |
The URL of the site where the file is located |
--folderUrl [folderUrl] |
The server- or site-relative decoded URL of the folder. Specify either folderUrl or folderId but not both |
--folderId [folderId] |
The unique ID (GUID) of the folder. Specify either folderUrl or folderId but not both |
-s, --scope [scope] |
Scope of the sharing link. Possible options are: anonymous , users or organization . If not specified, all links will be removed. |
-f, --force |
Don't prompt for confirmation |
Examples
Removes a specific sharing link from a folder by id without prompting for confirmation
m365 spo folder sharinglink clear --webUrl https://contoso.sharepoint.com/sites/demo --folderId daebb04b-a773-4baa-b1d1-3625418e3234 --id 1 --confirm
Removes a specific sharing link from a folder by url with prompting for confirmation
m365 spo folder sharinglink clear --webUrl https://contoso.sharepoint.com/sites/demo --folderUrl /sites/demo/shared%20documents/Folder --id 1
Default properties
No response
Additional Info
No response
Adam-it commented
- in the examples you refer to the
remove
command instead ofclear
- if I understand it properly if
clear
means removing all sharinglinks then why would we need theid
option and why even make it required? Seems to me this option will allow toclear
single sharinglink which is the same as theremove
command right. - maybe the
scope
should also have an optionall
which will be just default. What is your take on that? - also what @milanholemans pointed out in other issue - folderUrl should allow server and site-relative URLs
@pnp/cli-for-microsoft-365-maintainers anyone else up for ๐ on this ๐
MathijsVerbeeck commented
- in the examples you refer to the
remove
command instead ofclear
My bad
- if I understand it properly if
clear
means removing all sharinglinks then why would we need theid
option and why even make it required? Seems to me this option will allow toclear
single sharinglink which is the same as theremove
command right.
Again, too hasty
- maybe the
scope
should also have an optionall
which will be just default. What is your take on that?
Why would we do that? We have it in quite a lot of commands that we simply use all when nothing is specified
- also what @milanholemans pointed out in other issue - folderUrl should allow server and site-relative URLs
Changed that
Saurabh7019 commented
Can I work on it?
Adam-it commented
@Saurabh7019 the stage is yours ๐
You Rock ๐คฉ