From c164b74942f007e5103dc560fca5d1d7a6367cbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3jcik?= Date: Sun, 17 Nov 2024 22:59:01 +0100 Subject: [PATCH 1/3] Updates sample scripts to align with v10. Closes #6369 --- .../entra/analyze-user-profile-photos/assets/sample.json | 2 +- .../entra/analyze-users-haveibeenpwnd/assets/sample.json | 2 +- .../entra/bulk-manage-group-users/assets/sample.json | 2 +- .../sample-scripts/entra/bulk-manage-group-users/index.mdx | 2 +- .../assets/sample.json | 2 +- .../entra/delete-m365-groups/assets/sample.json | 2 +- .../assets/sample.json | 2 +- .../entra/replace-membership-of-selected-groups/index.mdx | 2 +- .../replace-owner-with-a-different-one/assets/sample.json | 2 +- .../entra/replace-owner-with-a-different-one/index.mdx | 2 +- .../entra/scan-groups-with-user-names/assets/sample.json | 2 +- docs/docs/sample-scripts/spo/add-ci-cd-pipeline/index.mdx | 6 +++--- .../sample-scripts/spo/list-all-checked-out-files/index.mdx | 4 ++-- .../spo/list-all-files-specific-name/index.mdx | 2 +- .../spo/list-all-list-folders-itemcount/index.mdx | 6 +++--- .../spo/list-all-sites-with-app-installed/index.mdx | 2 +- .../sample-scripts/spo/list-empty-folders-on-site/index.mdx | 2 +- .../spo/list-large-files-within-a-site/index.mdx | 2 +- .../sample-scripts/spo/list-site-collection-lists/index.mdx | 2 +- .../sp-add-ins-and-azure-acs-retirement-report/index.mdx | 2 +- .../teams/create-team-and-add-members-and-owners/index.mdx | 2 +- 21 files changed, 26 insertions(+), 26 deletions(-) diff --git a/docs/docs/sample-scripts/entra/analyze-user-profile-photos/assets/sample.json b/docs/docs/sample-scripts/entra/analyze-user-profile-photos/assets/sample.json index 15006a553f2..203e946e67e 100644 --- a/docs/docs/sample-scripts/entra/analyze-user-profile-photos/assets/sample.json +++ b/docs/docs/sample-scripts/entra/analyze-user-profile-photos/assets/sample.json @@ -11,7 +11,7 @@ "This script uses Azure Cognitive Service API and Microsoft 365 CLI to analyze user profile pictures and assess whether they meet the standards placed by the organization. It can be customized to ban content within an org channel or collaboration network where employees post pictures, memes, etc." ], "products": [ - "AAD" + "Entra" ], "categories": [], "tags": [ diff --git a/docs/docs/sample-scripts/entra/analyze-users-haveibeenpwnd/assets/sample.json b/docs/docs/sample-scripts/entra/analyze-users-haveibeenpwnd/assets/sample.json index 1ad115aca39..fb567781696 100644 --- a/docs/docs/sample-scripts/entra/analyze-users-haveibeenpwnd/assets/sample.json +++ b/docs/docs/sample-scripts/entra/analyze-users-haveibeenpwnd/assets/sample.json @@ -11,7 +11,7 @@ "Validate all your users against known breaches with the have I been pwned api. That way you can quickly scan if your users are part of any known breaches." ], "products": [ - "AAD" + "Entra" ], "categories": [], "tags": [ diff --git a/docs/docs/sample-scripts/entra/bulk-manage-group-users/assets/sample.json b/docs/docs/sample-scripts/entra/bulk-manage-group-users/assets/sample.json index bfb6597e2fa..88ccd6c83af 100644 --- a/docs/docs/sample-scripts/entra/bulk-manage-group-users/assets/sample.json +++ b/docs/docs/sample-scripts/entra/bulk-manage-group-users/assets/sample.json @@ -11,7 +11,7 @@ "Companies pursue to hasten profits growth or enter new marketplace through Mergers and Acquisitions (M&A). M&A typically fails during integration. This also applies to migrating users and data in Microsoft Teams and Groups. Partial acquisition can be pretty tricky. To help make the activity as charming as possible, I have created the following sample script to add/remove bulk users to/from Microsoft Teams team or Microsoft 365 group using CLI for Microsoft 365 commands." ], "products": [ - "AAD" + "Entra" ], "categories": [], "tags": [ diff --git a/docs/docs/sample-scripts/entra/bulk-manage-group-users/index.mdx b/docs/docs/sample-scripts/entra/bulk-manage-group-users/index.mdx index 03469a7e8ef..1a175f19080 100644 --- a/docs/docs/sample-scripts/entra/bulk-manage-group-users/index.mdx +++ b/docs/docs/sample-scripts/entra/bulk-manage-group-users/index.mdx @@ -51,7 +51,7 @@ Note: Refactor the code as per your requirement. } } ElseIf ($action -eq "remove") { - m365 entra m365group user remove --groupId $group.id --userName $user.mail --force + m365 entra m365group user remove --groupId $group.id --userNames $user.mail --force Write-Host $user.mail " removed from " $group.mailNickname } Else { diff --git a/docs/docs/sample-scripts/entra/delete-m365-groups-and-sharepoint-sites/assets/sample.json b/docs/docs/sample-scripts/entra/delete-m365-groups-and-sharepoint-sites/assets/sample.json index 042ba0e0113..b2c41d84174 100644 --- a/docs/docs/sample-scripts/entra/delete-m365-groups-and-sharepoint-sites/assets/sample.json +++ b/docs/docs/sample-scripts/entra/delete-m365-groups-and-sharepoint-sites/assets/sample.json @@ -11,7 +11,7 @@ "Another example how you can delete all Microsoft 365 Groups and SharePoint Online sites in your development environment." ], "products": [ - "AAD" + "Entra" ], "categories": [], "tags": [ diff --git a/docs/docs/sample-scripts/entra/delete-m365-groups/assets/sample.json b/docs/docs/sample-scripts/entra/delete-m365-groups/assets/sample.json index 3e0a3828d3a..dc51e727013 100644 --- a/docs/docs/sample-scripts/entra/delete-m365-groups/assets/sample.json +++ b/docs/docs/sample-scripts/entra/delete-m365-groups/assets/sample.json @@ -11,7 +11,7 @@ "There are so many different ways to create Microsoft 365 groups. Teams, Planner, SharePoint team sites, etc. — you can accumulate a lot of them very fast. Use this script below to delete the ones you no longer need." ], "products": [ - "AAD" + "Entra" ], "categories": [], "tags": [ diff --git a/docs/docs/sample-scripts/entra/replace-membership-of-selected-groups/assets/sample.json b/docs/docs/sample-scripts/entra/replace-membership-of-selected-groups/assets/sample.json index 57008d4612f..36b1de39454 100644 --- a/docs/docs/sample-scripts/entra/replace-membership-of-selected-groups/assets/sample.json +++ b/docs/docs/sample-scripts/entra/replace-membership-of-selected-groups/assets/sample.json @@ -11,7 +11,7 @@ "This script can be used to replace the membership of a user for a selected list of Groups. It might be useful when a person changes role in an organization or is about to leave it." ], "products": [ - "AAD" + "Entra" ], "categories": [], "tags": [ diff --git a/docs/docs/sample-scripts/entra/replace-membership-of-selected-groups/index.mdx b/docs/docs/sample-scripts/entra/replace-membership-of-selected-groups/index.mdx index 1c5663f655d..391c808ff50 100644 --- a/docs/docs/sample-scripts/entra/replace-membership-of-selected-groups/index.mdx +++ b/docs/docs/sample-scripts/entra/replace-membership-of-selected-groups/index.mdx @@ -111,7 +111,7 @@ This script can be used to replace the membership of a user for a selected list try { Write-Host "Removing $oldUser..." - m365 entra m365group user remove --groupId $groupId --userName $oldUser | Get-CLIValue + m365 entra m365group user remove --groupId $groupId --userNames $oldUser | Get-CLIValue } catch { Write-Host $_.Exception.Message -ForegroundColor Red diff --git a/docs/docs/sample-scripts/entra/replace-owner-with-a-different-one/assets/sample.json b/docs/docs/sample-scripts/entra/replace-owner-with-a-different-one/assets/sample.json index 825b7370ce9..7df9e2061ce 100644 --- a/docs/docs/sample-scripts/entra/replace-owner-with-a-different-one/assets/sample.json +++ b/docs/docs/sample-scripts/entra/replace-owner-with-a-different-one/assets/sample.json @@ -11,7 +11,7 @@ "Find all the Microsoft 365 Groups that a user is an Owner of and replace them with someone else useful for when an employee leaves and ownership needs to be updated." ], "products": [ - "AAD" + "Entra" ], "categories": [], "tags": [ diff --git a/docs/docs/sample-scripts/entra/replace-owner-with-a-different-one/index.mdx b/docs/docs/sample-scripts/entra/replace-owner-with-a-different-one/index.mdx index 7f98a594c7d..9071c574921 100644 --- a/docs/docs/sample-scripts/entra/replace-owner-with-a-different-one/index.mdx +++ b/docs/docs/sample-scripts/entra/replace-owner-with-a-different-one/index.mdx @@ -80,7 +80,7 @@ Find all the Microsoft 365 Groups that a user is an Owner of and replace them wi try { Write-Host "Removing $oldUser permissions..." - m365 entra m365group user remove --groupId $group.id --userName $oldUser | Get-CLIValue + m365 entra m365group user remove --groupId $group.id --userNames $oldUser | Get-CLIValue } catch { Write-Host $_.Exception.Message -ForegroundColor Red diff --git a/docs/docs/sample-scripts/entra/scan-groups-with-user-names/assets/sample.json b/docs/docs/sample-scripts/entra/scan-groups-with-user-names/assets/sample.json index 4bce4d1b6dd..53b74130d0a 100644 --- a/docs/docs/sample-scripts/entra/scan-groups-with-user-names/assets/sample.json +++ b/docs/docs/sample-scripts/entra/scan-groups-with-user-names/assets/sample.json @@ -11,7 +11,7 @@ "We can use the group naming policy to enforce a consistent naming strategy for groups created by users in our organization. A naming policy can help us and our users identify the function of the group. We can use the policy to block specific words from being used in group names and aliases. But what if we need to find out the list of Microsoft 365 groups created with user’s givenName or surname as their mail? This sample script scans the Microsoft 365 groups that may contain user’s first or last name as the group mail." ], "products": [ - "AAD" + "Entra" ], "categories": [], "tags": [ diff --git a/docs/docs/sample-scripts/spo/add-ci-cd-pipeline/index.mdx b/docs/docs/sample-scripts/spo/add-ci-cd-pipeline/index.mdx index 0543946047c..a257861a511 100644 --- a/docs/docs/sample-scripts/spo/add-ci-cd-pipeline/index.mdx +++ b/docs/docs/sample-scripts/spo/add-ci-cd-pipeline/index.mdx @@ -83,7 +83,7 @@ Depending on what authentication method you chose, you will need to add the foll For the application login method: -- `APP_ID` - client id of the registered AAD application +- `APP_ID` - client id of the registered Entra application - `CERTIFICATE_ENCODED` - application's encoded certificate - `CERTIFICATE_PASSWORD` - certificate password. This applies only if the certificate is encoded which is the recommended approach - `TENANT` - Tenant ID @@ -214,10 +214,10 @@ For the application login method you will need to fill in the following variable } if ($Scope -eq "tenant") { - m365 spfx project github workflow add --loginMethod $LoginMethod --name $Name --branchName $BranchName $ManuallyTriggerStr $SkipFeatureDeploymentStr --overwrite + m365 spfx project github workflow add --loginMethod $LoginMethod --name $Name --branchName $BranchName $ManuallyTriggerStr $SkipFeatureDeploymentStr } else { - m365 spfx project github workflow add --loginMethod $LoginMethod --name $Name --branchName $BranchName --scope "sitecollection" --siteUrl $SiteUrl $ManuallyTriggerStr $SkipFeatureDeploymentStr --overwrite + m365 spfx project github workflow add --loginMethod $LoginMethod --name $Name --branchName $BranchName --scope "sitecollection" --siteUrl $SiteUrl $ManuallyTriggerStr $SkipFeatureDeploymentStr } # show github guidance diff --git a/docs/docs/sample-scripts/spo/list-all-checked-out-files/index.mdx b/docs/docs/sample-scripts/spo/list-all-checked-out-files/index.mdx index 84c0de04a53..85b95924342 100644 --- a/docs/docs/sample-scripts/spo/list-all-checked-out-files/index.mdx +++ b/docs/docs/sample-scripts/spo/list-all-checked-out-files/index.mdx @@ -31,7 +31,7 @@ This script will retrieve all the checked out files in a particular site. $resultsForSite = @() foreach($library in $allLibs){ - $allDocs = m365 spo file list --webUrl $siteURL --folder $library.Url --recursive -o json | ConvertFrom-Json + $allDocs = m365 spo file list --webUrl $siteURL --folder $library.RootFolder.ServerRelativeUrl --recursive -o json | ConvertFrom-Json foreach($document in $allDocs){ if($document.CheckOutType -eq [int64]0){ @@ -122,7 +122,7 @@ Depending on the number of sites in your .csv file, the number of libraries as w foreach($lib in $allLibraries){ #Get all the documents - $allDocs = m365 spo file list --webUrl $row.siteURL --folder $lib.Url --recursive -o json | ConvertFrom-Json + $allDocs = m365 spo file list --webUrl $row.siteURL --folder $lib.RootFolder.ServerRelativeUrl --recursive -o json | ConvertFrom-Json foreach($docu in $allDocs){ if($docu.CheckOutType -eq [int64]0){ diff --git a/docs/docs/sample-scripts/spo/list-all-files-specific-name/index.mdx b/docs/docs/sample-scripts/spo/list-all-files-specific-name/index.mdx index 3ffd6ac7b1a..a59ed791f78 100644 --- a/docs/docs/sample-scripts/spo/list-all-files-specific-name/index.mdx +++ b/docs/docs/sample-scripts/spo/list-all-files-specific-name/index.mdx @@ -42,7 +42,7 @@ This script will retrieve all the files in a site that have a specific word (i.e $i++ if ($ShowProgress) { Write-Host "Processing '$($lib.Title)' - ($i/$($allLibs.length))" } - $allFiles = m365 spo file list --webUrl $site --folder $lib.Url --recursive -o json | ConvertFrom-Json + $allFiles = m365 spo file list --webUrl $site --folder $lib.RootFolder.ServerRelativeUrl --recursive -o json | ConvertFrom-Json foreach ($file in $allFiles) { if ($ShowProgress) { Write-Host "Processing file '$($file.ServerRelativeUrl)'" } diff --git a/docs/docs/sample-scripts/spo/list-all-list-folders-itemcount/index.mdx b/docs/docs/sample-scripts/spo/list-all-list-folders-itemcount/index.mdx index c644af207f8..6ce491e44ad 100644 --- a/docs/docs/sample-scripts/spo/list-all-list-folders-itemcount/index.mdx +++ b/docs/docs/sample-scripts/spo/list-all-list-folders-itemcount/index.mdx @@ -47,10 +47,10 @@ List all Lists, the folders and sub folders in a given site, and output the item foreach ($list in $allLists) { if ($false -eq $list.Hidden -and $list.BaseTemplate -eq "101") { - Write-Output "Processing $($list.Url)" - [void]$results.Add([PSCustomObject]@{ Url = $list.Url; ItemCount = $list.ItemCount; Type = "List"; }) + Write-Output "Processing $($list.RootFolder.ServerRelativeUrl)" + [void]$results.Add([PSCustomObject]@{ Url = $list.RootFolder.ServerRelativeUrl; ItemCount = $list.ItemCount; Type = "List"; }) - Get-Folders $siteUrl $list.Url + Get-Folders $siteUrl $list.RootFolder.ServerRelativeUrl } } diff --git a/docs/docs/sample-scripts/spo/list-all-sites-with-app-installed/index.mdx b/docs/docs/sample-scripts/spo/list-all-sites-with-app-installed/index.mdx index c64badbb680..8781236985c 100644 --- a/docs/docs/sample-scripts/spo/list-all-sites-with-app-installed/index.mdx +++ b/docs/docs/sample-scripts/spo/list-all-sites-with-app-installed/index.mdx @@ -53,7 +53,7 @@ This script helps you to list all sites in SharePoint Online, where a particular Write-Host "Processing site $($site.Url)..." $appInstance = m365 spo app instance list --siteUrl $site.Url --query $queryText | ConvertFrom-Json - if ($appInstance) { + if ($appInstance.count -gt 0) { $results += [pscustomobject]@{ SiteURL = $site.Url Title = $site.Title diff --git a/docs/docs/sample-scripts/spo/list-empty-folders-on-site/index.mdx b/docs/docs/sample-scripts/spo/list-empty-folders-on-site/index.mdx index 87733563a1a..72ccd02dc2f 100644 --- a/docs/docs/sample-scripts/spo/list-empty-folders-on-site/index.mdx +++ b/docs/docs/sample-scripts/spo/list-empty-folders-on-site/index.mdx @@ -39,7 +39,7 @@ The script loops through each document library in a site where the folder size s foreach($library in $allLibs) { Write-Host "Processing document library: $($library.Title)" - $allFolders = m365 spo folder list --webUrl $WebUrl --parentFolderUrl $library.Url --fields "Name,ServerRelativeUrl,TimeCreated,CreatedBy,TimeLastModified" --recursive --filter "ItemCount eq 0" -o json | ConvertFrom-Json + $allFolders = m365 spo folder list --webUrl $WebUrl --parentFolderUrl $library.RootFolder.ServerRelativeUrl --fields "Name,ServerRelativeUrl,TimeCreated,CreatedBy,TimeLastModified" --recursive --filter "ItemCount eq 0" -o json | ConvertFrom-Json foreach($folder in $allFolders) { $resultsEmptyFolders += [PSCustomObject]@{ diff --git a/docs/docs/sample-scripts/spo/list-large-files-within-a-site/index.mdx b/docs/docs/sample-scripts/spo/list-large-files-within-a-site/index.mdx index 421fd707c5e..0ace118d213 100644 --- a/docs/docs/sample-scripts/spo/list-large-files-within-a-site/index.mdx +++ b/docs/docs/sample-scripts/spo/list-large-files-within-a-site/index.mdx @@ -43,7 +43,7 @@ The following script will help you find every files in a specific SharePoint Onl $i++ if ($ShowProgress) { Write-Host "Processing '$($lib.Title)' - ($i/$($allLibs.length))" } - $allFiles = m365 spo file list --webUrl $site --folder $lib.Url --recursive -o json | ConvertFrom-Json + $allFiles = m365 spo file list --webUrl $site --folder $lib.RootFolder.ServerRelativeUrl --recursive -o json | ConvertFrom-Json foreach ($file in $allFiles) { if ($ShowProgress) { Write-Host "Processing file '$($file.ServerRelativeUrl)'" } diff --git a/docs/docs/sample-scripts/spo/list-site-collection-lists/index.mdx b/docs/docs/sample-scripts/spo/list-site-collection-lists/index.mdx index a3f74f16859..a0f687094cf 100644 --- a/docs/docs/sample-scripts/spo/list-site-collection-lists/index.mdx +++ b/docs/docs/sample-scripts/spo/list-site-collection-lists/index.mdx @@ -56,7 +56,7 @@ This script helps you to list and export all site collection and their lists Sha $results += [pscustomobject][ordered]@{ Type = "list" Title = $list.Title - Url = $list.Url + Url = $list.RootFolder.ServerRelativeUrl Template = $list.BaseTemplate } } diff --git a/docs/docs/sample-scripts/spo/sp-add-ins-and-azure-acs-retirement-report/index.mdx b/docs/docs/sample-scripts/spo/sp-add-ins-and-azure-acs-retirement-report/index.mdx index 71e72096843..7b95cbed89f 100644 --- a/docs/docs/sample-scripts/spo/sp-add-ins-and-azure-acs-retirement-report/index.mdx +++ b/docs/docs/sample-scripts/spo/sp-add-ins-and-azure-acs-retirement-report/index.mdx @@ -186,7 +186,7 @@ function GetRetirementStatus { foreach ($List in $Lists) { $EventReveiversOnList = m365 spo eventreceiver list --webUrl $WebUrl --listId $List.Id --query "[?!contains(ReceiverAssembly,'Microsoft.')]" --output json | ConvertFrom-Json - $EventReceivers += GetEventReceiversDataToOutputList -EventReceivers $EventReveiversOnList -Location "List" -LocationUrl $List.Url + $EventReceivers += GetEventReceiversDataToOutputList -EventReceivers $EventReveiversOnList -Location "List" -LocationUrl $List.RootFolder.ServerRelativeUrl } return $EventReceivers } diff --git a/docs/docs/sample-scripts/teams/create-team-and-add-members-and-owners/index.mdx b/docs/docs/sample-scripts/teams/create-team-and-add-members-and-owners/index.mdx index 88b2da90032..e7fadd76b2a 100644 --- a/docs/docs/sample-scripts/teams/create-team-and-add-members-and-owners/index.mdx +++ b/docs/docs/sample-scripts/teams/create-team-and-add-members-and-owners/index.mdx @@ -86,7 +86,7 @@ This sample script shows you how to create a Team and add members and owners usi # remove yourself from the owners group if ($removeYourSelfFromOwners -and $owners.IndexOf($whoAmI.connectedAs) -eq -1) { Write-Host "Removing $($whoAmI.connectedAs) from the owners list" - m365 entra m365group user remove --groupId $group.id --userName $whoAmI.connectedAs --force + m365 entra m365group user remove --groupId $group.id --userNames $whoAmI.connectedAs --force } Write-Host "Completed." From b7458968996f5aadbdfb34bce385237b486162df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3jcik?= Date: Sat, 23 Nov 2024 22:27:52 +0100 Subject: [PATCH 2/3] fixup --- .../entra/replace-owner-with-a-different-one/index.mdx | 2 +- .../sample-scripts/spo/add-ci-cd-pipeline/assets/sample.json | 2 +- .../index.mdx | 2 +- .../spo/delete-non-group-connected-modern-sites/index.mdx | 4 ++-- .../spo/list-all-checked-out-files/assets/sample.json | 2 +- .../spo/list-all-files-specific-name/assets/sample.json | 2 +- .../spo/list-all-list-folders-itemcount/assets/sample.json | 2 +- .../spo/list-all-sites-with-app-installed/assets/sample.json | 2 +- .../spo/list-empty-folders-on-site/assets/sample.json | 2 +- .../spo/list-large-files-within-a-site/assets/sample.json | 2 +- .../spo/list-site-collection-lists/assets/sample.json | 2 +- .../spo/remove-orphaned-redirect-sites/index.mdx | 4 ++-- .../assets/sample.json | 2 +- .../create-team-and-add-members-and-owners/assets/sample.json | 2 +- 14 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/docs/sample-scripts/entra/replace-owner-with-a-different-one/index.mdx b/docs/docs/sample-scripts/entra/replace-owner-with-a-different-one/index.mdx index 9071c574921..f918fbc9811 100644 --- a/docs/docs/sample-scripts/entra/replace-owner-with-a-different-one/index.mdx +++ b/docs/docs/sample-scripts/entra/replace-owner-with-a-different-one/index.mdx @@ -67,7 +67,7 @@ Find all the Microsoft 365 Groups that a user is an Owner of and replace them wi $hasOwner = $null # verify if the old user is in the owners list - $hasOwner = m365 entra m365group user list --groupId $group.id --query "[?userType=='Owner' && userPrincipalName=='$oldUser'].[id]" | Get-CLIValue + $hasOwner = m365 entra m365group user list --groupId $group.id --role owner --query "[?userPrincipalName=='$oldUser'].[id]" | Get-CLIValue if ($hasOwner -ne $null) { Write-Host "Found $oldUser" -ForegroundColor Green try { diff --git a/docs/docs/sample-scripts/spo/add-ci-cd-pipeline/assets/sample.json b/docs/docs/sample-scripts/spo/add-ci-cd-pipeline/assets/sample.json index fafcb917963..ca3151d89a0 100644 --- a/docs/docs/sample-scripts/spo/add-ci-cd-pipeline/assets/sample.json +++ b/docs/docs/sample-scripts/spo/add-ci-cd-pipeline/assets/sample.json @@ -25,7 +25,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "7.7.0" + "value": "10.0.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/copy-library-folders-and-contents-to-another-library/index.mdx b/docs/docs/sample-scripts/spo/copy-library-folders-and-contents-to-another-library/index.mdx index e1672462cc3..2621fcb728f 100644 --- a/docs/docs/sample-scripts/spo/copy-library-folders-and-contents-to-another-library/index.mdx +++ b/docs/docs/sample-scripts/spo/copy-library-folders-and-contents-to-another-library/index.mdx @@ -52,7 +52,7 @@ The following script shows how you can copy all library folders and contents to # Copy everything (folders and files) to this target level 1 folder Write-Host "Copying '$($Folder.ServerRelativeUrl)' to '$DestinationFolderUrl'" -ForegroundColor Cyan - m365 spo folder copy --webUrl $SiteURL --sourceUrl $Folder.ServerRelativeUrl --targetUrl $DestinationFolderUrl --allowSchemaMismatch + m365 spo folder copy --webUrl $SiteURL --sourceUrl $Folder.ServerRelativeUrl --targetUrl $DestinationFolderUrl } # Copy files from root diff --git a/docs/docs/sample-scripts/spo/delete-non-group-connected-modern-sites/index.mdx b/docs/docs/sample-scripts/spo/delete-non-group-connected-modern-sites/index.mdx index 6208720995e..b7b00de7054 100644 --- a/docs/docs/sample-scripts/spo/delete-non-group-connected-modern-sites/index.mdx +++ b/docs/docs/sample-scripts/spo/delete-non-group-connected-modern-sites/index.mdx @@ -30,7 +30,7 @@ When you delete Microsoft 365 groups, the modern group-connected team sites get $progress++ write-host $progress / $total":" $site.Title write-host $site.Url - m365 spo site remove --url $site.Url + m365 spo site remove --url $site.Url --force } ``` @@ -74,7 +74,7 @@ When you delete Microsoft 365 groups, the modern group-connected team sites get siteUrl=$(echo ${site} | jq -r '.Url') echo "Deleting site..." echo $siteUrl - m365 spo site remove --url $siteUrl + m365 spo site remove --url $siteUrl --force done ``` diff --git a/docs/docs/sample-scripts/spo/list-all-checked-out-files/assets/sample.json b/docs/docs/sample-scripts/spo/list-all-checked-out-files/assets/sample.json index 04c99a3da44..fdccfd3e927 100644 --- a/docs/docs/sample-scripts/spo/list-all-checked-out-files/assets/sample.json +++ b/docs/docs/sample-scripts/spo/list-all-checked-out-files/assets/sample.json @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "6.3.0" + "value": "10.0.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/list-all-files-specific-name/assets/sample.json b/docs/docs/sample-scripts/spo/list-all-files-specific-name/assets/sample.json index 40b03bc4bd3..370cc24db1e 100644 --- a/docs/docs/sample-scripts/spo/list-all-files-specific-name/assets/sample.json +++ b/docs/docs/sample-scripts/spo/list-all-files-specific-name/assets/sample.json @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "6.3.0" + "value": "10.0.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/list-all-list-folders-itemcount/assets/sample.json b/docs/docs/sample-scripts/spo/list-all-list-folders-itemcount/assets/sample.json index 7d232727c8a..f02617597d5 100644 --- a/docs/docs/sample-scripts/spo/list-all-list-folders-itemcount/assets/sample.json +++ b/docs/docs/sample-scripts/spo/list-all-list-folders-itemcount/assets/sample.json @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "6.3.0" + "value": "10.0.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/list-all-sites-with-app-installed/assets/sample.json b/docs/docs/sample-scripts/spo/list-all-sites-with-app-installed/assets/sample.json index 6c1143f8d56..d76413f243d 100644 --- a/docs/docs/sample-scripts/spo/list-all-sites-with-app-installed/assets/sample.json +++ b/docs/docs/sample-scripts/spo/list-all-sites-with-app-installed/assets/sample.json @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "6.4.0" + "value": "10.0.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/list-empty-folders-on-site/assets/sample.json b/docs/docs/sample-scripts/spo/list-empty-folders-on-site/assets/sample.json index d177b77a00c..1336e715029 100644 --- a/docs/docs/sample-scripts/spo/list-empty-folders-on-site/assets/sample.json +++ b/docs/docs/sample-scripts/spo/list-empty-folders-on-site/assets/sample.json @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "6.9.0" + "value": "10.0.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/list-large-files-within-a-site/assets/sample.json b/docs/docs/sample-scripts/spo/list-large-files-within-a-site/assets/sample.json index 428601a5d48..7e0f3ae42fd 100644 --- a/docs/docs/sample-scripts/spo/list-large-files-within-a-site/assets/sample.json +++ b/docs/docs/sample-scripts/spo/list-large-files-within-a-site/assets/sample.json @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "6.3.0" + "value": "10.0.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/list-site-collection-lists/assets/sample.json b/docs/docs/sample-scripts/spo/list-site-collection-lists/assets/sample.json index cd4c4d5a1f6..e0e1f2e357a 100644 --- a/docs/docs/sample-scripts/spo/list-site-collection-lists/assets/sample.json +++ b/docs/docs/sample-scripts/spo/list-site-collection-lists/assets/sample.json @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "6.3.0" + "value": "10.0.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/remove-orphaned-redirect-sites/index.mdx b/docs/docs/sample-scripts/spo/remove-orphaned-redirect-sites/index.mdx index 5f8c0cfc655..7c2cb1625c6 100644 --- a/docs/docs/sample-scripts/spo/remove-orphaned-redirect-sites/index.mdx +++ b/docs/docs/sample-scripts/spo/remove-orphaned-redirect-sites/index.mdx @@ -42,7 +42,7 @@ Changing the URL of a site results in a new site type: a Redirect Site. However } If($body.StatusCode -eq "404"){ Write-Host -f Red " Target location no longer exists, should be removed" - m365 spo site remove --url $siteUrl + m365 spo site remove --url $siteUrl --force } } } @@ -87,7 +87,7 @@ Changing the URL of a site results in a new site type: a Redirect Site. However siteUrl=$(echo ${site} | jq -r '.Url') echo "Deleting site..." echo $siteUrl - m365 spo site remove --url $siteUrl + m365 spo site remove --url $siteUrl --force done ``` diff --git a/docs/docs/sample-scripts/spo/sp-add-ins-and-azure-acs-retirement-report/assets/sample.json b/docs/docs/sample-scripts/spo/sp-add-ins-and-azure-acs-retirement-report/assets/sample.json index 30944b74fe7..5156c288260 100644 --- a/docs/docs/sample-scripts/spo/sp-add-ins-and-azure-acs-retirement-report/assets/sample.json +++ b/docs/docs/sample-scripts/spo/sp-add-ins-and-azure-acs-retirement-report/assets/sample.json @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "7.4.0" + "value": "10.0.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/teams/create-team-and-add-members-and-owners/assets/sample.json b/docs/docs/sample-scripts/teams/create-team-and-add-members-and-owners/assets/sample.json index 3d86bbc6045..3c14ead9ac0 100644 --- a/docs/docs/sample-scripts/teams/create-team-and-add-members-and-owners/assets/sample.json +++ b/docs/docs/sample-scripts/teams/create-team-and-add-members-and-owners/assets/sample.json @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "7.0.0" + "value": "10.0.0" } ], "thumbnails": [ From baf217e5d69b71d8076c3f19654cee2b65ed523c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3jcik?= Date: Sun, 24 Nov 2024 20:51:02 +0100 Subject: [PATCH 3/3] fixup --- .../assets/sample.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/sample-scripts/spo/copy-library-folders-and-contents-to-another-library/assets/sample.json b/docs/docs/sample-scripts/spo/copy-library-folders-and-contents-to-another-library/assets/sample.json index c1d6d0f1989..856bcb1f9ca 100644 --- a/docs/docs/sample-scripts/spo/copy-library-folders-and-contents-to-another-library/assets/sample.json +++ b/docs/docs/sample-scripts/spo/copy-library-folders-and-contents-to-another-library/assets/sample.json @@ -23,7 +23,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "6.6.0" + "value": "10.0.0" } ], "thumbnails": [