Created
May 31, 2021 02:36
-
-
Save ktskumar/7b23f5cb37a57905546fcdb587186f44 to your computer and use it in GitHub Desktop.
Fetch checked out files from SharePoint library using Microsoft 365 CLI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write-host 'ensure logged in' | |
$m365Status = m365 status | |
if($m3656Status -eq "Logged Out"){ | |
m365 login | |
} | |
#Initialize variables | |
$siteUrl ='https://contoso.sharepoint.com' | |
$library ='Documents' | |
#Command to fetch checkedout files from $library | |
m365 spo listitem list --webUrl $siteUrl --title $library --filter "CheckoutUserId ne null" --fields "Id,FileLeafRef,Modified" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment