From 94bf1f9a13229deaed27b236a80617e27904e618 Mon Sep 17 00:00:00 2001 From: Milan Holemans <11723921+milanholemans@users.noreply.github.com> Date: Sat, 18 Feb 2023 01:36:55 +0100 Subject: [PATCH] Aligns script sample command options with v6.3 release. Closes #4441 --- .../analyze-user-profile-photos/assets/sample.json | 4 ++-- .../analyze-users-haveibeenpwnd/assets/sample.json | 4 ++-- .../assets/sample.json | 4 ++-- .../aad/delete-m365-groups/assets/sample.json | 4 ++-- .../sample-scripts/aad/delete-m365-groups/index.md | 2 +- .../flag-groups-with-user-names/assets/sample.json | 4 ++-- .../aad/manage-group-users/assets/sample.json | 4 ++-- .../sample-scripts/aad/manage-group-users/index.md | 2 +- .../assets/sample.json | 4 ++-- .../replace-membership-of-selected-groups/index.md | 2 +- .../assets/sample.json | 4 ++-- .../replace-owner-with-a-different-one/index.md | 2 +- .../assets/sample.json | 4 ++-- .../flow/cancel-all-running-flow-runs/index.md | 12 +++++------- .../assets/sample.json | 4 ++-- .../flow/export-all-flows-in-environment/index.md | 6 +++--- .../flow/export-flow-logicapp/assets/sample.json | 4 ++-- .../flow/export-flow-logicapp/index.md | 8 ++++---- .../flow/flow-runs-day-summary/assets/sample.json | 4 ++-- .../flow/flow-runs-day-summary/index.md | 9 +++------ .../inventory-flows-by-author/assets/sample.json | 4 ++-- .../flow/inventory-flows-by-author/index.md | 4 ++-- .../assets/sample.json | 4 ++-- .../flow/resubmit-all-failed-flow-runs/index.md | 12 +++++------- .../search-flows-for-connection/assets/sample.json | 4 ++-- .../flow/search-flows-for-connection/index.md | 4 ++-- .../graph/call-graph/assets/sample.json | 4 ++-- .../planner/add-multiple-tasks/assets/sample.json | 4 ++-- .../assets/sample.json | 4 ++-- .../list-environments-flows-apps/index.md | 2 +- .../spo/add-app-catalog/assets/sample.json | 4 ++-- .../sample-scripts/spo/add-app-catalog/index.md | 4 ++-- .../assets/sample.json | 4 ++-- .../assets/sample.json | 4 ++-- .../assets/sample.json | 4 ++-- .../add-multiple-lists-in-multiple-sites/index.md | 2 +- .../assets/sample.json | 4 ++-- .../assets/sample.json | 4 ++-- .../index.md | 2 +- .../assets/sample.json | 4 ++-- .../spo/change-owner-group-membership/index.md | 9 ++++----- .../assets/sample.json | 4 ++-- .../spo/copy-files-to-another-library/index.md | 4 ++-- .../assets/sample.json | 4 ++-- .../spo/copy-listitems-sharepointlist/index.md | 2 +- .../assets/sample.json | 4 ++-- .../index.md | 2 +- .../assets/sample.json | 4 ++-- .../index.md | 2 +- .../assets/sample.json | 4 ++-- .../spo/disable-tenant-wide-extension/index.md | 4 ++-- .../assets/sample.json | 4 ++-- .../spo/empty-tenant-recyclebin/assets/sample.json | 4 ++-- .../ensure-siteassets-library/assets/sample.json | 4 ++-- .../assets/sample.json | 4 ++-- .../export-configs-tenant-wide-extensions/index.md | 2 +- .../grant-api-permissions-aad/assets/sample.json | 4 ++-- .../spo/grant-api-permissions-aad/index.md | 13 ++++++++----- .../assets/sample.json | 4 ++-- .../spo/hide-list-from-site-contents/index.md | 4 ++-- .../assets/sample.json | 4 ++-- .../insert-sp-library-pictures-into-word/index.md | 2 +- .../assets/sample.json | 4 ++-- .../spo/list-all-application-customizers/index.md | 4 ++-- .../list-all-checked-out-files/assets/sample.json | 4 ++-- .../assets/sample.json | 4 ++-- .../assets/sample.json | 4 ++-- .../index.md | 6 +++--- .../assets/sample.json | 4 ++-- .../index.md | 4 ++-- .../assets/sample.json | 4 ++-- .../spo/list-all-list-folders-itemcount/index.md | 2 +- .../assets/sample.json | 4 ++-- .../list-attachment-names-from-spo-lists/index.md | 2 +- .../assets/sample.json | 4 ++-- .../spo/list-externalusers-in-sitegroups/index.md | 2 +- .../spo/list-failed-sitedesigns/assets/sample.json | 4 ++-- .../assets/sample.json | 4 ++-- .../spo/list-site-app-catalogs/assets/sample.json | 4 ++-- .../spo/list-site-app-catalogs/index.md | 4 ++-- .../list-site-collection-lists/assets/sample.json | 4 ++-- .../list-site-collection-owners/assets/sample.json | 4 ++-- .../spo/list-site-externalusers/assets/sample.json | 4 ++-- .../list-tenant-wide-extensions/assets/sample.json | 4 ++-- .../assets/sample.json | 4 ++-- .../assets/sample.json | 4 ++-- .../index.md | 2 +- .../assets/sample.json | 4 ++-- .../spo/planner-migrate-sharepoint-list/index.md | 6 +++--- .../spo/remove-api-permissions/assets/sample.json | 4 ++-- .../spo/remove-api-permissions/index.md | 4 ++-- .../spo/remove-custom-themes/assets/sample.json | 4 ++-- .../assets/sample.json | 4 ++-- .../assets/sample.json | 4 ++-- .../index.md | 4 ++-- .../spo/remove-site-designs/assets/sample.json | 4 ++-- .../spo/remove-site-scripts/assets/sample.json | 4 ++-- .../assets/sample.json | 4 ++-- .../spo/remove-siteCollection-admin-user/index.md | 2 +- .../assets/sample.json | 4 ++-- .../spo/replace-site-collection-admin/index.md | 1 - .../spo/setup-example-site/assets/sample.json | 4 ++-- .../sample-scripts/spo/setup-example-site/index.md | 14 +++++++------- .../assets/sample.json | 4 ++-- .../sync-splib-into-az-storage-container/index.md | 2 +- .../assets/sample.json | 4 ++-- .../teams/add-bulk-users-teams/assets/sample.json | 4 ++-- .../teams/add-bulk-users-teams/index.md | 2 +- .../assets/sample.json | 4 ++-- .../index.md | 2 +- .../create-team-from-group/assets/sample.json | 4 ++-- .../teams/create-team-from-group/index.md | 2 +- .../teams/deploy-teams-app/assets/sample.json | 4 ++-- .../sample-scripts/teams/deploy-teams-app/index.md | 2 +- .../export-all-channels-teams/assets/sample.json | 4 ++-- .../export-teams-conversations/assets/sample.json | 4 ++-- .../assets/sample.json | 4 ++-- .../teams/govern-orphan-teams/assets/sample.json | 4 ++-- .../teams/install-personal-app/assets/sample.json | 4 ++-- .../teams/install-personal-app/index.md | 5 ++--- .../teams/list-all-tabs-teams/assets/sample.json | 4 ++-- .../list-all-teammembers-teams/assets/sample.json | 4 ++-- .../teams/list-teams-app-usage/assets/sample.json | 4 ++-- .../teams/list-teams-app-usage/index.md | 4 ++-- .../assets/sample.json | 4 ++-- .../assets/sample.json | 4 ++-- .../assets/sample.json | 4 ++-- .../index.md | 2 +- .../teams/remove-personal-app/assets/sample.json | 4 ++-- .../teams/remove-personal-app/index.md | 3 +-- .../teams/remove-wikitab-teams/assets/sample.json | 4 ++-- .../teams/remove-wikitab-teams/index.md | 2 +- .../teams/share-socialchampions/assets/sample.json | 4 ++-- .../assets/sample.json | 4 ++-- .../cleanup-completed-todos/assets/sample.json | 4 ++-- 135 files changed, 268 insertions(+), 276 deletions(-) diff --git a/docs/docs/sample-scripts/aad/analyze-user-profile-photos/assets/sample.json b/docs/docs/sample-scripts/aad/analyze-user-profile-photos/assets/sample.json index a6abd2b5b1a..27900509be5 100644 --- a/docs/docs/sample-scripts/aad/analyze-user-profile-photos/assets/sample.json +++ b/docs/docs/sample-scripts/aad/analyze-user-profile-photos/assets/sample.json @@ -5,7 +5,7 @@ "title": "Analyze User Profile Photos using Azure Computer Vision API", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/aad/analyze-user-profile-photos", "creationDateTime": "2020-11-05", - "updateDateTime": "2020-11-05", + "updateDateTime": "2023-02-28", "shortDescription": "This script uses Azure Cognitive Service API and Microsoft 365 CLI to analyze user profile pictures.", "longDescription": [ "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." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/aad/analyze-users-haveibeenpwnd/assets/sample.json b/docs/docs/sample-scripts/aad/analyze-users-haveibeenpwnd/assets/sample.json index e834e907ca4..e06c433cad8 100644 --- a/docs/docs/sample-scripts/aad/analyze-users-haveibeenpwnd/assets/sample.json +++ b/docs/docs/sample-scripts/aad/analyze-users-haveibeenpwnd/assets/sample.json @@ -5,7 +5,7 @@ "title": "Analyze users for known data breaches with have i been pwned", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/aad/analyze-users-haveibeenpwnd", "creationDateTime": "2022-02-07", - "updateDateTime": "2022-02-07", + "updateDateTime": "2023-02-28", "shortDescription": "Validate all your users against known breaches with the have i been pwned api.", "longDescription": [ "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." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/aad/delete-m365-groups-and-sharepoint-sites/assets/sample.json b/docs/docs/sample-scripts/aad/delete-m365-groups-and-sharepoint-sites/assets/sample.json index eedd43f8b30..0b6c3979991 100644 --- a/docs/docs/sample-scripts/aad/delete-m365-groups-and-sharepoint-sites/assets/sample.json +++ b/docs/docs/sample-scripts/aad/delete-m365-groups-and-sharepoint-sites/assets/sample.json @@ -5,7 +5,7 @@ "title": "CLI - Delete all Microsoft 365 groups and SharePoint sites", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/aad/delete-m365-groups-and-sharepoint-sites", "creationDateTime": "2021-03-15", - "updateDateTime": "2021-03-15", + "updateDateTime": "2023-02-28", "shortDescription": "delete all Microsoft 365 Groups and SharePoint Online site.", "longDescription": [ "Another example how you can delete all Microsoft 365 Groups and SharePoint Online sites in your development environment." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/aad/delete-m365-groups/assets/sample.json b/docs/docs/sample-scripts/aad/delete-m365-groups/assets/sample.json index d7b2cce7e2d..76728d58c00 100644 --- a/docs/docs/sample-scripts/aad/delete-m365-groups/assets/sample.json +++ b/docs/docs/sample-scripts/aad/delete-m365-groups/assets/sample.json @@ -5,7 +5,7 @@ "title": "CLI - Delete all Microsoft 365 groups", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/aad/delete-m365-groups", "creationDateTime": "2020-03-15", - "updateDateTime": "2020-03-15", + "updateDateTime": "2023-02-28", "shortDescription": "this script deletes the AAD groups you no longer need.", "longDescription": [ "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." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/aad/delete-m365-groups/index.md b/docs/docs/sample-scripts/aad/delete-m365-groups/index.md index 111d9995088..baa43fb11f2 100644 --- a/docs/docs/sample-scripts/aad/delete-m365-groups/index.md +++ b/docs/docs/sample-scripts/aad/delete-m365-groups/index.md @@ -65,6 +65,6 @@ There are so many different ways to create Microsoft 365 groups. Teams, Planner, displayName=$(echo $o365group | cut -d';' -f 1) id=$(echo $o365group | cut -d';' -f 2) echo "Deleting $displayName..." - m365 aad o365group remove --id "$id" --confirm + m365 aad o365group remove --id $id --confirm done ``` diff --git a/docs/docs/sample-scripts/aad/flag-groups-with-user-names/assets/sample.json b/docs/docs/sample-scripts/aad/flag-groups-with-user-names/assets/sample.json index d4f88dea851..2b6895a9cc8 100644 --- a/docs/docs/sample-scripts/aad/flag-groups-with-user-names/assets/sample.json +++ b/docs/docs/sample-scripts/aad/flag-groups-with-user-names/assets/sample.json @@ -5,7 +5,7 @@ "title": "Scan for Microsoft 365 Groups created with user's first or last name", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/aad/flag-groups-with-user-names", "creationDateTime": "2020-03-28", - "updateDateTime": "2020-03-28", + "updateDateTime": "2023-02-28", "shortDescription": "This sample script scans the Microsoft 365 groups that may contain user’s first or last name as the group mail.", "longDescription": [ "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." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/aad/manage-group-users/assets/sample.json b/docs/docs/sample-scripts/aad/manage-group-users/assets/sample.json index c6319fd0e0c..cffcbba7eda 100644 --- a/docs/docs/sample-scripts/aad/manage-group-users/assets/sample.json +++ b/docs/docs/sample-scripts/aad/manage-group-users/assets/sample.json @@ -5,7 +5,7 @@ "title": "Bulk add/remove users to Microsoft Teams and Microsoft 365 Groups", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/aad/manage-group-users", "creationDateTime": "2020-05-09", - "updateDateTime": "2020-05-09", + "updateDateTime": "2023-02-28", "shortDescription": "Sample script to add/remove bulk users to/from Microsoft Teams team or Microsoft 365 groupl.", "longDescription": [ "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." @@ -23,7 +23,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/aad/manage-group-users/index.md b/docs/docs/sample-scripts/aad/manage-group-users/index.md index 2839931fb06..b4019f33eaf 100644 --- a/docs/docs/sample-scripts/aad/manage-group-users/index.md +++ b/docs/docs/sample-scripts/aad/manage-group-users/index.md @@ -35,7 +35,7 @@ Note: Refactor the code as per your requirement. If ($action -eq "add") { If ($role -eq "owner") { - m365 aad o365group user add --groupId $group.id --userName $user.mail --role Owner; + m365 aad o365group user add --groupId $group.id --userName $user.mail --role Owner Write-Host $user.mail " added as owner in " $group.mailNickname } ElseIf ($role -eq "member") { diff --git a/docs/docs/sample-scripts/aad/replace-membership-of-selected-groups/assets/sample.json b/docs/docs/sample-scripts/aad/replace-membership-of-selected-groups/assets/sample.json index 0b4f4f95568..e8eeee79d6d 100644 --- a/docs/docs/sample-scripts/aad/replace-membership-of-selected-groups/assets/sample.json +++ b/docs/docs/sample-scripts/aad/replace-membership-of-selected-groups/assets/sample.json @@ -5,7 +5,7 @@ "title": "CLI - Replace a user's membership in selected Microsoft 365 Groups or Teams", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/aad/replace-membership-of-selected-groups", "creationDateTime": "2021-05-04", - "updateDateTime": "2021-05-04", + "updateDateTime": "2023-02-28", "shortDescription": "This script can be used to replace the membership of a user for a selected list of Groups.", "longDescription": [ "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." @@ -24,7 +24,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/aad/replace-membership-of-selected-groups/index.md b/docs/docs/sample-scripts/aad/replace-membership-of-selected-groups/index.md index a37402c392d..9b9bed425ad 100644 --- a/docs/docs/sample-scripts/aad/replace-membership-of-selected-groups/index.md +++ b/docs/docs/sample-scripts/aad/replace-membership-of-selected-groups/index.md @@ -107,7 +107,7 @@ This script can be used to replace the membership of a user for a selected list try { Write-Host "Removing $oldUser..." - m365 aad o365group user remove --groupId $groupId --userName $oldUser --confirm $false | Get-CLIValue + m365 aad o365group user remove --groupId $groupId --userName $oldUser | Get-CLIValue } catch { Write-Host $_.Exception.Message -ForegroundColor Red diff --git a/docs/docs/sample-scripts/aad/replace-owner-with-a-different-one/assets/sample.json b/docs/docs/sample-scripts/aad/replace-owner-with-a-different-one/assets/sample.json index a05a43897d1..2252d31c7bc 100644 --- a/docs/docs/sample-scripts/aad/replace-owner-with-a-different-one/assets/sample.json +++ b/docs/docs/sample-scripts/aad/replace-owner-with-a-different-one/assets/sample.json @@ -5,7 +5,7 @@ "title": "CLI - Replace an owner in a Microsoft 365 Group or Microsoft Team", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/aad/replace-owner-with-a-different-one", "creationDateTime": "2021-04-28", - "updateDateTime": "2021-04-28", + "updateDateTime": "2023-02-28", "shortDescription": "Find all the Microsoft 365 Groups that a user is an Owner of and replace them with someone else.", "longDescription": [ "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." @@ -23,7 +23,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/aad/replace-owner-with-a-different-one/index.md b/docs/docs/sample-scripts/aad/replace-owner-with-a-different-one/index.md index fdc056fbf76..481c1cfc829 100644 --- a/docs/docs/sample-scripts/aad/replace-owner-with-a-different-one/index.md +++ b/docs/docs/sample-scripts/aad/replace-owner-with-a-different-one/index.md @@ -76,7 +76,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 aad o365group user remove --groupId $group.id --userName $oldUser --confirm $false | Get-CLIValue + m365 aad o365group user remove --groupId $group.id --userName $oldUser | Get-CLIValue } catch { Write-Host $_.Exception.Message -ForegroundColor Red diff --git a/docs/docs/sample-scripts/flow/cancel-all-running-flow-runs/assets/sample.json b/docs/docs/sample-scripts/flow/cancel-all-running-flow-runs/assets/sample.json index de8fcee408d..16f23e2c54f 100644 --- a/docs/docs/sample-scripts/flow/cancel-all-running-flow-runs/assets/sample.json +++ b/docs/docs/sample-scripts/flow/cancel-all-running-flow-runs/assets/sample.json @@ -5,7 +5,7 @@ "title": "Cancel all running flow runs for a flow in an environment", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/flow/cancel-all-running-flow-runs", "creationDateTime": "2021-06-04", - "updateDateTime": "2021-06-04", + "updateDateTime": "2023-02-28", "shortDescription": "This script will cancel all running flow runs.", "longDescription": [ "This script will cancel all running flow runs of a Power Automate flow created in an environment. Pass the Flow environment id and the flow guid as parameter while running the script." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/flow/cancel-all-running-flow-runs/index.md b/docs/docs/sample-scripts/flow/cancel-all-running-flow-runs/index.md index 6eea2fc8889..3eab669ac46 100644 --- a/docs/docs/sample-scripts/flow/cancel-all-running-flow-runs/index.md +++ b/docs/docs/sample-scripts/flow/cancel-all-running-flow-runs/index.md @@ -19,13 +19,11 @@ This script will cancel all running flow runs of a Power Automate flow created i ```powershell $flowEnvironment = $args[0] $flowGUID = $args[1] - $flowRuns = m365 flow run list --environment $flowEnvironment --flow $flowGUID --output json | ConvertFrom-Json + $flowRuns = m365 flow run list --environmentName $flowEnvironment --flow $flowGUID --status Running --output json | ConvertFrom-Json foreach ($run in $flowRuns) { - if ($run.status -eq "Running") { - Write-Output "Run details: " $run - # Cancel all the running flow runs - m365 flow run cancel --environment $flowEnvironment --flow $flowGUID --name $run.name --confirm - Write-Output "Run Cancelled successfully" - } + Write-Output "Run details: " $run + # Cancel all the running flow runs + m365 flow run cancel --environmentName $flowEnvironment --flow $flowGUID --name $run.name --confirm + Write-Output "Run Cancelled successfully" } ``` diff --git a/docs/docs/sample-scripts/flow/export-all-flows-in-environment/assets/sample.json b/docs/docs/sample-scripts/flow/export-all-flows-in-environment/assets/sample.json index a6a2ee6ca3b..cb995107c62 100644 --- a/docs/docs/sample-scripts/flow/export-all-flows-in-environment/assets/sample.json +++ b/docs/docs/sample-scripts/flow/export-all-flows-in-environment/assets/sample.json @@ -5,7 +5,7 @@ "title": "CLI - Export all flows in environment", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/flow/export-all-flows-in-environment", "creationDateTime": "2021-06-16", - "updateDateTime": "2021-06-16", + "updateDateTime": "2023-02-28", "shortDescription": "This script will get all flows in your default environment and export them.", "longDescription": [ "This script will get all flows in your default environment and export them as both a ZIP file for importing back into Power Automate and as a JSON file for importing into Azure as an Azure Logic App." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/flow/export-all-flows-in-environment/index.md b/docs/docs/sample-scripts/flow/export-all-flows-in-environment/index.md index 115be49aa8b..48218e1b526 100644 --- a/docs/docs/sample-scripts/flow/export-all-flows-in-environment/index.md +++ b/docs/docs/sample-scripts/flow/export-all-flows-in-environment/index.md @@ -21,7 +21,7 @@ This script will get all flows in your default environment and export them as bo $environment = m365 flow environment list --query '[?properties.isDefault==`true`].name' --output json | ConvertFrom-JSON Write-Output "Getting Flows info..." - $flows = m365 flow list --environment $environment --asAdmin --output json | ConvertFrom-JSON + $flows = m365 flow list --environmentName $environment --asAdmin --output json | ConvertFrom-JSON Write-Output "Found $($flows.Count) Flows to export..." @@ -32,8 +32,8 @@ This script will get all flows in your default environment and export them as bo $exportPath = "$($filename)_$($timestamp)" $flowId = $_.Name - m365 flow export --id $flowId --environment $environment --packageDisplayName $_.displayName --path "$exportPath.zip" - m365 flow export --id $flowId --environment $environment --format json --path "$exportPath.json" + m365 flow export --id $flowId --environmentName $environment --packageDisplayName $_.displayName --path "$exportPath.zip" + m365 flow export --id $flowId --environmentName $environment --format json --path "$exportPath.json" } Write-Output "Complete" diff --git a/docs/docs/sample-scripts/flow/export-flow-logicapp/assets/sample.json b/docs/docs/sample-scripts/flow/export-flow-logicapp/assets/sample.json index ea74dcc6fe4..5bd70a37197 100644 --- a/docs/docs/sample-scripts/flow/export-flow-logicapp/assets/sample.json +++ b/docs/docs/sample-scripts/flow/export-flow-logicapp/assets/sample.json @@ -5,7 +5,7 @@ "title": "Export a single flow to a Logic App", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/flow/export-flow-logicapp", "creationDateTime": "2021-02-07", - "updateDateTime": "2021-02-07", + "updateDateTime": "2023-02-28", "shortDescription": "This script will export the Power Automate flow.", "longDescription": [ "This script will export the Power Automate flow *Your sample test flow*, make sure to pass the correct name in the script, and your flow will be exported right away." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/flow/export-flow-logicapp/index.md b/docs/docs/sample-scripts/flow/export-flow-logicapp/index.md index a342eadc890..9a17879684c 100644 --- a/docs/docs/sample-scripts/flow/export-flow-logicapp/index.md +++ b/docs/docs/sample-scripts/flow/export-flow-logicapp/index.md @@ -23,10 +23,10 @@ This script will export the Power Automate flow *Your sample test flow*, make su ```powershell Write-Output "Getting environment info..." $environmentId = $(m365 flow environment list --query "[?displayName == '(default)']" -o json | ConvertFrom-Json).Name - $flowId = $(m365 flow list --environment $environmentId --query "[?displayName == 'Your sample test flow']" -o json | ConvertFrom-Json)[0].Name + $flowId = $(m365 flow list --environmentName $environmentId --query "[?displayName == 'Your sample test flow']" -o json | ConvertFrom-Json)[0].Name Write-Output "Getting Flow info..." - m365 flow export --environment $environmentId --id $flowId -f 'json' + m365 flow export --environmentName $environmentId --id $flowId -f 'json' Write-Output "Complete" ``` @@ -36,7 +36,7 @@ This script will export the Power Automate flow *Your sample test flow*, make su ```bash #!/bin/bash ENV_NAME=m365 flow environment list --query '[?contains(displayName,`default`)] .name' - FLOW_NAME=m365 flow list --environment $environmentId --query '[?displayName == `Your sample test flow`] .name' + FLOW_NAME=m365 flow list --environmentName $environmentId --query '[?displayName == `Your sample test flow`] .name' echo "Exporting your flow" - m365 flow export --environment $ENV_NAME --id $FLOW_NAME -f 'json' + m365 flow export --environmentName $ENV_NAME --id $FLOW_NAME -f 'json' ``` diff --git a/docs/docs/sample-scripts/flow/flow-runs-day-summary/assets/sample.json b/docs/docs/sample-scripts/flow/flow-runs-day-summary/assets/sample.json index 71bea3f2ca6..fb387e7524a 100644 --- a/docs/docs/sample-scripts/flow/flow-runs-day-summary/assets/sample.json +++ b/docs/docs/sample-scripts/flow/flow-runs-day-summary/assets/sample.json @@ -5,7 +5,7 @@ "title": "CLI - Flow runs day summary report", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/flow/flow-runs-day-summary", "creationDateTime": "2021-10-16", - "updateDateTime": "2021-10-16", + "updateDateTime": "2023-02-28", "shortDescription": "This script creates a report of all flow runs from current day.", "longDescription": [ "This script creates a report of all flow runs from current day and sends the report as an adaptive card to the provided url." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/flow/flow-runs-day-summary/index.md b/docs/docs/sample-scripts/flow/flow-runs-day-summary/index.md index 6706d115b5c..fc1cf6d5c2f 100644 --- a/docs/docs/sample-scripts/flow/flow-runs-day-summary/index.md +++ b/docs/docs/sample-scripts/flow/flow-runs-day-summary/index.md @@ -25,19 +25,16 @@ This script creates a report of all flow runs from current day and sends the rep $flows = m365 flow list --environmentName $environment --output json $flows = $flows | ConvertFrom-Json - $currentDayDate = Get-Date - $previousDayDate = (Get-Date).AddDays(-1) + $currentDayDate = (Get-Date).ToUniversalTime().ToString("o") + $previousDayDate = (Get-Date).AddDays(-1).ToUniversalTime().ToString("o") $adaptiveCardDescription = "" foreach ($flow in $flows) { - $flowRuns = m365 flow run list --environmentName $environment --flowName $flow.name --output json - $flowRuns = $flowRuns | ConvertFrom-Json + $todayRuns = m365 flow run list --environmentName $environment --flowName $flow.name --triggerStartTime $previousDayDate --triggerEndTime $currentDayDate --output json | ConvertFrom-Json $displayName = $flow.displayName $id = $flow.name - - $todayRuns = $flowRuns.Where({[DateTime]$_.properties.endTime -le $currentDayDate -and [DateTime]$_.properties.endTime -gt $previousDayDate}) $todayRunsCount = 0 $todaySuccessRunsCount = 0 diff --git a/docs/docs/sample-scripts/flow/inventory-flows-by-author/assets/sample.json b/docs/docs/sample-scripts/flow/inventory-flows-by-author/assets/sample.json index 919e1ca1e5c..efe70dbb94f 100644 --- a/docs/docs/sample-scripts/flow/inventory-flows-by-author/assets/sample.json +++ b/docs/docs/sample-scripts/flow/inventory-flows-by-author/assets/sample.json @@ -5,7 +5,7 @@ "title": "Inventory Flows By Creator", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/flow/inventory-flows-by-author", "creationDateTime": "2020-05-05", - "updateDateTime": "2020-05-05", + "updateDateTime": "2023-02-28", "shortDescription": "This script retrieves Flows from the Default Environment and maps creator information from Azure AD to list Flows by owner.", "longDescription": [ "The [Power Automate Admin Center](https://admin.flow.microsoft.com) provides a list of the Flows in your tenant, but there is no way to easily export Flows from the Flow admin center for governance activities. This script retrieves Flows from the Default Environment and maps creator information from Azure AD to list Flows by owner, state and trigger type." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/flow/inventory-flows-by-author/index.md b/docs/docs/sample-scripts/flow/inventory-flows-by-author/index.md index 529e04500b9..377aaf416cb 100644 --- a/docs/docs/sample-scripts/flow/inventory-flows-by-author/index.md +++ b/docs/docs/sample-scripts/flow/inventory-flows-by-author/index.md @@ -47,7 +47,7 @@ The `bash` version of this script uses an external file to process owner mapping # Step 2 - Get all of the flows using the cli and write flows json to a tmp file # Use a JMESPath query to filter the size of the file. See https://github.com/pnp/cli-microsoft365/issues/1266 - m365 flow list --environment $defaultEnvironment ` + m365 flow list --environmentName $defaultEnvironment ` --query '[].{name: name, displayName: properties.displayName,owner: properties.creator.userId, state: properties.state, created: properties.createdTime, lastModified: properties.lastModifiedTime, trigger: properties.definitionSummary.triggers[0].swaggerOperationId, triggerType: properties.definitionSummary.triggers[0].type }' --asAdmin --output json | Out-File "$TMP_FLOWS" -Encoding ASCII $flows = Get-Content "$TMP_FLOWS" | ConvertFrom-Json @@ -140,7 +140,7 @@ The `bash` version of this script uses an external file to process owner mapping #Step 2 - Get all of the flows using the cli and write flows json to a tmp file #See https://github.com/pnp/cli-microsoft365/issues/1266 for temp file usage reason - m365 flow list --environment $DEFAULT_ENVIRONMENT --asAdmin --output json > $TMP_FLOWS + m365 flow list --environmentName $DEFAULT_ENVIRONMENT --asAdmin --output json > $TMP_FLOWS #Step 3 - Get a unique list of the flow owners from the tmp file echo "Flows found, searching for owner values..." diff --git a/docs/docs/sample-scripts/flow/resubmit-all-failed-flow-runs/assets/sample.json b/docs/docs/sample-scripts/flow/resubmit-all-failed-flow-runs/assets/sample.json index 4c20f9ccdec..caf47d5e2af 100644 --- a/docs/docs/sample-scripts/flow/resubmit-all-failed-flow-runs/assets/sample.json +++ b/docs/docs/sample-scripts/flow/resubmit-all-failed-flow-runs/assets/sample.json @@ -5,7 +5,7 @@ "title": "Resubmit all failed flow runs for a flow in an environment", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/flow/resubmit-all-failed-flow-runs", "creationDateTime": "2021-06-04", - "updateDateTime": "2021-06-04", + "updateDateTime": "2023-02-28", "shortDescription": "This script will resubmit all failed flow runs.", "longDescription": [ "This script will resubmit all failed flow runs of a Power Automate flow created in an environment. Pass the Flow environment id and the flow guid as parameter while running the script." @@ -20,7 +20,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/flow/resubmit-all-failed-flow-runs/index.md b/docs/docs/sample-scripts/flow/resubmit-all-failed-flow-runs/index.md index 34f50bac5d4..02d9377e5c7 100644 --- a/docs/docs/sample-scripts/flow/resubmit-all-failed-flow-runs/index.md +++ b/docs/docs/sample-scripts/flow/resubmit-all-failed-flow-runs/index.md @@ -18,13 +18,11 @@ This script will resubmit all failed flow runs of a Power Automate flow created ```powershell $flowEnvironment = $args[0] $flowGUID = $args[1] - $flowRuns = m365 flow run list --environmentName $flowEnvironment --flowName $flowGUID --output json | ConvertFrom-Json + $flowRuns = m365 flow run list --environmentName $flowEnvironment --flowName $flowGUID --status Failed --output json | ConvertFrom-Json foreach ($run in $flowRuns) { - if ($run.status -eq "Failed") { - Write-Output "Run details: " $run - #Resubmit all the failed flows - m365 flow run resubmit --environmentName $flowEnvironment --flowName $flowGUID --name $run.name --confirm - Write-Output "Run resubmitted successfully" - } + Write-Output "Run details: " $run + #Resubmit all the failed flows + m365 flow run resubmit --environmentName $flowEnvironment --flowName $flowGUID --name $run.name --confirm + Write-Output "Run resubmitted successfully" } ``` diff --git a/docs/docs/sample-scripts/flow/search-flows-for-connection/assets/sample.json b/docs/docs/sample-scripts/flow/search-flows-for-connection/assets/sample.json index af02c7e68f0..5daf2eff819 100644 --- a/docs/docs/sample-scripts/flow/search-flows-for-connection/assets/sample.json +++ b/docs/docs/sample-scripts/flow/search-flows-for-connection/assets/sample.json @@ -5,7 +5,7 @@ "title": "Search flows for connections", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/flow/search-flows-for-connection", "creationDateTime": "2021-05-23", - "updateDateTime": "2021-05-23", + "updateDateTime": "2023-02-28", "shortDescription": "This sample allows you to get a report of all flows that are connected to a specific site or list.", "longDescription": [ "Search all flows as, an administrator, for a specific search string and report results. This sample allows you to get a report of all flows that are connected to a specific site or list. The `$searchString` can be any value but results are the best when using a GUID or site collection URL." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/flow/search-flows-for-connection/index.md b/docs/docs/sample-scripts/flow/search-flows-for-connection/index.md index 1c1351a3452..ae76f6f2f3c 100644 --- a/docs/docs/sample-scripts/flow/search-flows-for-connection/index.md +++ b/docs/docs/sample-scripts/flow/search-flows-for-connection/index.md @@ -22,11 +22,11 @@ Search all flows as, an administrator, for a specific search string and report r ForEach ($env in $environments) { Write-Output "Processing $($env.displayName)..." - $flows = m365 flow list --environment $env.name --asAdmin -o json | ConvertFrom-Json + $flows = m365 flow list --environmentName $env.name --asAdmin -o json | ConvertFrom-Json ForEach ($flow in $flows) { Write-Output "Processing $($flow.displayName)..." - m365 flow export --id $flow.name --environment $env.name --format json --path $path + m365 flow export --id $flow.name --environmentName $env.name --format json --path $path $flowData = Get-Content -Path $path -ErrorAction SilentlyContinue diff --git a/docs/docs/sample-scripts/graph/call-graph/assets/sample.json b/docs/docs/sample-scripts/graph/call-graph/assets/sample.json index dafb84898e3..2ed646f7dbd 100644 --- a/docs/docs/sample-scripts/graph/call-graph/assets/sample.json +++ b/docs/docs/sample-scripts/graph/call-graph/assets/sample.json @@ -5,7 +5,7 @@ "title": "Authenticate with and call the Microsoft Graph", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/graph/call-graph", "creationDateTime": "2020-05-02", - "updateDateTime": "2022-10-20", + "updateDateTime": "2023-02-28", "shortDescription": "This script shows different ways to call Graph API.", "longDescription": [ "This script shows different ways to call Graph API." @@ -20,7 +20,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/planner/add-multiple-tasks/assets/sample.json b/docs/docs/sample-scripts/planner/add-multiple-tasks/assets/sample.json index a44346ebcc9..6f0cecc3d31 100644 --- a/docs/docs/sample-scripts/planner/add-multiple-tasks/assets/sample.json +++ b/docs/docs/sample-scripts/planner/add-multiple-tasks/assets/sample.json @@ -5,7 +5,7 @@ "title": "Add multiple tasks in Planner", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/planner/add-multiple-tasks", "creationDateTime": "2022-04-30", - "updateDateTime": "2022-04-30", + "updateDateTime": "2023-02-28", "shortDescription": "This script will create multiple tasks to a Planner plan from the information provided in your `csv` file.", "longDescription": [ "This script will create multiple tasks to a Planner plan from the information provided in your `csv` file. For this particular example, the `csv` file should contain the following columns: `TaskName`, `Description`, `PlanID`, `BucketName`, `StartDateTime`, `AssignedToUserNames`." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/powerplatform/list-environments-flows-apps/assets/sample.json b/docs/docs/sample-scripts/powerplatform/list-environments-flows-apps/assets/sample.json index a8521edeb89..0174866b313 100644 --- a/docs/docs/sample-scripts/powerplatform/list-environments-flows-apps/assets/sample.json +++ b/docs/docs/sample-scripts/powerplatform/list-environments-flows-apps/assets/sample.json @@ -5,7 +5,7 @@ "title": "List all Power Platform Environments and their Flows and Apps", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/powerplatform/list-environments-flows-apps", "creationDateTime": "2022-09-10", - "updateDateTime": "2022-09-10", + "updateDateTime": "2023-02-28", "shortDescription": "This script will retrieve all environments as an Administrator and loop through all Flows and Apps to provide you with a report indicating how much Power Platform components are in use in the tenant.", "longDescription": [ "This script will retrieve all environments as an Administrator and loop through all Flows and Apps to provide you with a report indicating how much Power Platform components are in use in the tenant." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/powerplatform/list-environments-flows-apps/index.md b/docs/docs/sample-scripts/powerplatform/list-environments-flows-apps/index.md index dcf806323b9..8b8684d69f2 100644 --- a/docs/docs/sample-scripts/powerplatform/list-environments-flows-apps/index.md +++ b/docs/docs/sample-scripts/powerplatform/list-environments-flows-apps/index.md @@ -57,7 +57,7 @@ This script will retrieve all environments as an Administrator and loop through } } - $flows = m365 flow list --environment $envId --asAdmin | ConvertFrom-Json + $flows = m365 flow list --environmentName $envId --asAdmin | ConvertFrom-Json Write-Host -f Green "Processing: $($flows.Count) flows" $flows | ForEach-Object { diff --git a/docs/docs/sample-scripts/spo/add-app-catalog/assets/sample.json b/docs/docs/sample-scripts/spo/add-app-catalog/assets/sample.json index 13f60aeba41..8b15b9a09a1 100644 --- a/docs/docs/sample-scripts/spo/add-app-catalog/assets/sample.json +++ b/docs/docs/sample-scripts/spo/add-app-catalog/assets/sample.json @@ -5,7 +5,7 @@ "title": "CLI - Add App Catalog to SharePoint site", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/add-app-catalog", "creationDateTime": "2020-03-28", - "updateDateTime": "2020-03-28", + "updateDateTime": "2023-02-28", "shortDescription": "Script will create an app catalog for that site.", "longDescription": [ "When you just want to deploy certain SharePoint solution to a specific site, it's required to create an app catalog for that site. The below script will create it for the site. In the article referenced above you can check where you can use App catalog for the site instead of global app catalog." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/add-app-catalog/index.md b/docs/docs/sample-scripts/spo/add-app-catalog/index.md index b07ac131840..5e600b2a361 100644 --- a/docs/docs/sample-scripts/spo/add-app-catalog/index.md +++ b/docs/docs/sample-scripts/spo/add-app-catalog/index.md @@ -15,7 +15,7 @@ When you just want to deploy certain SharePoint solution to a specific site, it' ```powershell $site = "https://contoso.sharepoint.com/sites/site" m365 login - m365 spo site appcatalog add --url $site + m365 spo site appcatalog add --siteUrl $site Write-output "App Catalog Created on " $site ``` @@ -27,6 +27,6 @@ When you just want to deploy certain SharePoint solution to a specific site, it' site=https://tricks365.sharepoint.com/sites/site m365 login - m365 spo site appcatalog add --url $site + m365 spo site appcatalog add --siteUrl $site echo "App Catalog Created on $site" ``` diff --git a/docs/docs/sample-scripts/spo/add-custom-clientside-webpart-to-modern-page/assets/sample.json b/docs/docs/sample-scripts/spo/add-custom-clientside-webpart-to-modern-page/assets/sample.json index c6582210064..022b9bb8f0a 100644 --- a/docs/docs/sample-scripts/spo/add-custom-clientside-webpart-to-modern-page/assets/sample.json +++ b/docs/docs/sample-scripts/spo/add-custom-clientside-webpart-to-modern-page/assets/sample.json @@ -5,7 +5,7 @@ "title": "Add custom client-side web part to modern page", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/add-custom-clientside-webpart-to-modern-page", "creationDateTime": "2020-05-20", - "updateDateTime": "2020-05-20", + "updateDateTime": "2023-02-28", "shortDescription": "This sample helps you add your web part to the page.", "longDescription": [ "You've built an amazing new web part and now you want to programmatically add it to a modern page. This sample helps you add your web part to the page with your custom properties that might be dynamic according to your script." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/add-multiple-folders-in-libraries-using-csv-file/assets/sample.json b/docs/docs/sample-scripts/spo/add-multiple-folders-in-libraries-using-csv-file/assets/sample.json index bec4bf04090..bdfdded5546 100644 --- a/docs/docs/sample-scripts/spo/add-multiple-folders-in-libraries-using-csv-file/assets/sample.json +++ b/docs/docs/sample-scripts/spo/add-multiple-folders-in-libraries-using-csv-file/assets/sample.json @@ -5,7 +5,7 @@ "title": "CLI - Add multiple folders in libraries using a csv file", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/add-multiple-folders-in-libraries-using-csv-file", "creationDateTime": "2021-05-10", - "updateDateTime": "2021-05-10", + "updateDateTime": "2023-02-28", "shortDescription": "Adds multiple folders in libraries using a csv file.", "longDescription": [ "Adds multiple folders in libraries using a csv file." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/add-multiple-lists-in-multiple-sites/assets/sample.json b/docs/docs/sample-scripts/spo/add-multiple-lists-in-multiple-sites/assets/sample.json index 36cfb1f4a13..8d6c05a56d3 100644 --- a/docs/docs/sample-scripts/spo/add-multiple-lists-in-multiple-sites/assets/sample.json +++ b/docs/docs/sample-scripts/spo/add-multiple-lists-in-multiple-sites/assets/sample.json @@ -5,7 +5,7 @@ "title": "Add multiple lists in multiple sites", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/add-multiple-lists-in-multiple-sites", "creationDateTime": "2021-07-05", - "updateDateTime": "2021-07-05", + "updateDateTime": "2023-02-28", "shortDescription": "Adds multiple lists in multiple sites.", "longDescription": [ "Adds multiple lists in multiple sites." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/add-multiple-lists-in-multiple-sites/index.md b/docs/docs/sample-scripts/spo/add-multiple-lists-in-multiple-sites/index.md index cf11666b1be..a017c6cef36 100644 --- a/docs/docs/sample-scripts/spo/add-multiple-lists-in-multiple-sites/index.md +++ b/docs/docs/sample-scripts/spo/add-multiple-lists-in-multiple-sites/index.md @@ -45,7 +45,7 @@ Author: [Sudharsan Kesavanarayanan](https://twitter.com/sudharsank) if ($null -eq $list) { m365 spo list add -t $listTitle --baseTemplate DocumentLibrary -u $FinalSiteUrl --contentTypesEnabled true --enableVersioning true --listExperienceOptions 1 --onQuickLaunch false $list = m365 spo list get -t $listTitle -u $FinalSiteUrl --properties "Title,Id" --output 'json' | ConvertFrom-Json - m365 spo list contenttype add -l $list.Id -u $FinalSiteUrl -c $ContentTypeId --output 'json' | ConvertFrom-Json + m365 spo list contenttype add -l $list.Id -u $FinalSiteUrl -i $ContentTypeId --output 'json' | ConvertFrom-Json $listContentType = m365 spo list contenttype list -l $list.Id -u $FinalSiteUrl --output 'json' | ConvertFrom-Json m365 spo list contenttype default set -l $list.Id -u $FinalSiteUrl -c $listContentType.StringId[2] --output 'json' | ConvertFrom-Json Write-Output "Successfully created list '$listTitle'" diff --git a/docs/docs/sample-scripts/spo/add-site-collection-admin-using-csv-file/assets/sample.json b/docs/docs/sample-scripts/spo/add-site-collection-admin-using-csv-file/assets/sample.json index 7299888f1e4..770cdfe8b38 100644 --- a/docs/docs/sample-scripts/spo/add-site-collection-admin-using-csv-file/assets/sample.json +++ b/docs/docs/sample-scripts/spo/add-site-collection-admin-using-csv-file/assets/sample.json @@ -5,7 +5,7 @@ "title": "Add a Site Collection Admin using a csv file", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/add-site-collection-admin-using-csv-file", "creationDateTime": "2021-04-28", - "updateDateTime": "2021-04-28", + "updateDateTime": "2023-02-28", "shortDescription": "Adds a Site Collection Admin using a csv file.", "longDescription": [ "Adds a Site Collection Admin using a csv file." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/add-users-associatedspgroup-site-csv-file/assets/sample.json b/docs/docs/sample-scripts/spo/add-users-associatedspgroup-site-csv-file/assets/sample.json index 148ca040725..fb2cd964d07 100644 --- a/docs/docs/sample-scripts/spo/add-users-associatedspgroup-site-csv-file/assets/sample.json +++ b/docs/docs/sample-scripts/spo/add-users-associatedspgroup-site-csv-file/assets/sample.json @@ -5,7 +5,7 @@ "title": "Add users to the Associated SharePoint Groups of a site from a CSV File", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/add-users-associatedspgroup-site-csv-file", "creationDateTime": "2021-10-16", - "updateDateTime": "2021-10-16", + "updateDateTime": "2023-02-28", "shortDescription": "Script which adds multiple users to associated SharePoint groups.", "longDescription": [ "This is a script which adds multiple users to associated SharePoint groups (Owners, Members, Visitors) of a site from a CSV file." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/add-users-associatedspgroup-site-csv-file/index.md b/docs/docs/sample-scripts/spo/add-users-associatedspgroup-site-csv-file/index.md index a79f44fe760..f3283166505 100644 --- a/docs/docs/sample-scripts/spo/add-users-associatedspgroup-site-csv-file/index.md +++ b/docs/docs/sample-scripts/spo/add-users-associatedspgroup-site-csv-file/index.md @@ -77,6 +77,6 @@ Permission Level mapping assumptions are given below Foreach ($PermissionLevel in $GroupedResult) { Write-Host "Adding $($PermissionLevel.PermissionLevel) Permission users to the SharePoint Group ID: $($PermissionLevel.SPGroupId)" #Since the command supports multiple usernames to be added in the single command, script will add users in single command execution - m365 spo group user add --webUrl $siteURL --groupId $PermissionLevel.SPGroupId --userName $PermissionLevel.UsernameValues + m365 spo group member add --webUrl $siteURL --groupId $PermissionLevel.SPGroupId --userName $PermissionLevel.UsernameValues } ``` diff --git a/docs/docs/sample-scripts/spo/change-owner-group-membership/assets/sample.json b/docs/docs/sample-scripts/spo/change-owner-group-membership/assets/sample.json index 617c8d42356..9f72818e296 100644 --- a/docs/docs/sample-scripts/spo/change-owner-group-membership/assets/sample.json +++ b/docs/docs/sample-scripts/spo/change-owner-group-membership/assets/sample.json @@ -5,7 +5,7 @@ "title": "Change group membership of all SharePoint Online sites", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/change-owner-group-membership", "creationDateTime": "2022-03-19", - "updateDateTime": "2022-03-19", + "updateDateTime": "2023-02-28", "shortDescription": "Script which downgrades the permission to the default member group.", "longDescription": [ "This is a script which takes a subset or all members of the default owner group and downgrades the permission to the default member group." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/change-owner-group-membership/index.md b/docs/docs/sample-scripts/spo/change-owner-group-membership/index.md index be0b72b5d67..21d65141f30 100644 --- a/docs/docs/sample-scripts/spo/change-owner-group-membership/index.md +++ b/docs/docs/sample-scripts/spo/change-owner-group-membership/index.md @@ -30,19 +30,18 @@ This is a script which takes a subset or all members of the default owner group Write-Host "Processing site No : $SiteCounter / $TotalSiteCount." Write-Host "Site URL - $($site.Url)" # Getting only Associated Owner and Member Groups using JMES Query - $AssociatedGroups = m365 spo web get --webUrl $site.Url --withGroups --query "{MemberGroup: AssociatedMemberGroup, OwnerGroup: AssociatedOwnerGroup}" --output json | ConvertFrom-Json + $AssociatedGroups = m365 spo web get --url $site.Url --withGroups --query "{MemberGroup: AssociatedMemberGroup, OwnerGroup: AssociatedOwnerGroup}" --output json | ConvertFrom-Json # Getting list of members from the Owner Group - $UserList = m365 spo group user list --webUrl $site.Url --groupId $AssociatedGroups.OwnerGroup.Id --query "value" --output json | ConvertFrom-Json + $UserList = m365 spo group member list --webUrl $site.Url --groupId $AssociatedGroups.OwnerGroup.Id --query "value" --output json | ConvertFrom-Json Write-Host "Total Users available in the Group, $($AssociatedGroups.OwnerGroup.Title) : "$UserList.Count Foreach ($User in $UserList){ - # Adding the user to Member Group - m365 spo group user add --webUrl $site.Url --groupId $AssociatedGroups.MemberGroup.Id --userName "$($User.UserPrincipalName)" + m365 spo group member add --webUrl $site.Url --groupId $AssociatedGroups.MemberGroup.Id --userName "$($User.UserPrincipalName)" # Removing the user from Owner Group - m365 spo group user remove --webUrl $site.Url --groupId $AssociatedGroups.OwnerGroup.Id --userName "$($User.UserPrincipalName)" --confirm + m365 spo group member remove --webUrl $site.Url --groupId $AssociatedGroups.OwnerGroup.Id --userName "$($User.UserPrincipalName)" --confirm } $SiteCounter++ } diff --git a/docs/docs/sample-scripts/spo/copy-files-to-another-library/assets/sample.json b/docs/docs/sample-scripts/spo/copy-files-to-another-library/assets/sample.json index 2b71674d783..c4537a0c8b4 100644 --- a/docs/docs/sample-scripts/spo/copy-files-to-another-library/assets/sample.json +++ b/docs/docs/sample-scripts/spo/copy-files-to-another-library/assets/sample.json @@ -5,7 +5,7 @@ "title": "Copy files to another SharePoint Library in another site", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/copy-files-to-another-library", "creationDateTime": "2021-04-20", - "updateDateTime": "2021-04-20", + "updateDateTime": "2023-02-28", "shortDescription": "This script shows how you can use the CLI to copy all files and folders from source library to a different library.", "longDescription": [ "This script shows how you can use the CLI to copy all files and folders from source library to a different library." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/copy-files-to-another-library/index.md b/docs/docs/sample-scripts/spo/copy-files-to-another-library/index.md index 708508d5269..5d1a5393856 100644 --- a/docs/docs/sample-scripts/spo/copy-files-to-another-library/index.md +++ b/docs/docs/sample-scripts/spo/copy-files-to-another-library/index.md @@ -40,7 +40,7 @@ This script shows how you can use the CLI to: $allFiles = $allFiles | ConvertFrom-Json foreach ($file in $allFiles) { $fileUrl = $file.ServerRelativeUrl -replace $sourceSite, '' - m365 spo file copy --webUrl "$tenatUrl$sourceSite" --sourceUrl $fileUrl --targetUrl "$targetSite/$targetLibrary" --allowSchemaMismatch + m365 spo file copy --webUrl "$tenatUrl$sourceSite" --sourceUrl $fileUrl --targetUrl "$targetSite/$targetLibrary" } } @@ -67,7 +67,7 @@ This script shows how you can use the CLI to: $allFiles = $allFiles | ConvertFrom-Json foreach ($file in $allFiles) { $fileUrl = $file.ServerRelativeUrl -replace $sourceSite, '' - m365 spo file copy --webUrl "$tenatUrl$sourceSite" --sourceUrl $fileUrl --targetUrl "$targetSite/$targetLibrary" --allowSchemaMismatch + m365 spo file copy --webUrl "$tenatUrl$sourceSite" --sourceUrl $fileUrl --targetUrl "$targetSite/$targetLibrary" } } else { diff --git a/docs/docs/sample-scripts/spo/copy-listitems-sharepointlist/assets/sample.json b/docs/docs/sample-scripts/spo/copy-listitems-sharepointlist/assets/sample.json index c7f6303d157..1fddc8a61ea 100644 --- a/docs/docs/sample-scripts/spo/copy-listitems-sharepointlist/assets/sample.json +++ b/docs/docs/sample-scripts/spo/copy-listitems-sharepointlist/assets/sample.json @@ -5,7 +5,7 @@ "title": "Copy list items between SharePoint lists", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/copy-listitems-sharepointlist", "creationDateTime": "2021-12-15", - "updateDateTime": "2021-12-15", + "updateDateTime": "2023-02-28", "shortDescription": "This script helps you to copy list items from one list to another list.", "longDescription": [ "This script helps you to copy list items from one list to another list. I have written script logics to migrate list items from one site collection to another site collection." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/copy-listitems-sharepointlist/index.md b/docs/docs/sample-scripts/spo/copy-listitems-sharepointlist/index.md index 810e47c3c38..06a9ab34efc 100644 --- a/docs/docs/sample-scripts/spo/copy-listitems-sharepointlist/index.md +++ b/docs/docs/sample-scripts/spo/copy-listitems-sharepointlist/index.md @@ -22,7 +22,7 @@ This script helps you to copy list items from one list to another list. I have w $SourceList = Read-Host -Prompt 'Source list name' $DestinationList = Read-Host -Prompt 'Destination list name' - $listItems = m365 spo listitem list --title $SourceList --webUrl $SourceSite --output json | ConvertFrom-Json + $listItems = m365 spo listitem list --listTitle $SourceList --webUrl $SourceSite --output json | ConvertFrom-Json Write-Host 'Total count in the source list is'-> -fore Green $listItems.Count $count = 0 $reportLocation = Get-Location diff --git a/docs/docs/sample-scripts/spo/delete-non-group-connected-modern-sites/assets/sample.json b/docs/docs/sample-scripts/spo/delete-non-group-connected-modern-sites/assets/sample.json index 0c04ba7e621..9314ae759fc 100644 --- a/docs/docs/sample-scripts/spo/delete-non-group-connected-modern-sites/assets/sample.json +++ b/docs/docs/sample-scripts/spo/delete-non-group-connected-modern-sites/assets/sample.json @@ -5,7 +5,7 @@ "title": "Delete all (non-group connected) modern SharePoint sites", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/delete-non-group-connected-modern-sites", "creationDateTime": "2020-06-25", - "updateDateTime": "2020-06-25", + "updateDateTime": "2023-02-28", "shortDescription": "The script handles the remaining modern sites: communication sites and groupless team sites.", "longDescription": [ "When you delete Microsoft 365 groups, the modern group-connected team sites get deleted with them. The script handles the remaining modern sites: communication sites and groupless team sites." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/delete-non-group-connected-modern-sites/index.md b/docs/docs/sample-scripts/spo/delete-non-group-connected-modern-sites/index.md index c60caea6ad7..69079b10ff5 100644 --- a/docs/docs/sample-scripts/spo/delete-non-group-connected-modern-sites/index.md +++ b/docs/docs/sample-scripts/spo/delete-non-group-connected-modern-sites/index.md @@ -14,7 +14,7 @@ When you delete Microsoft 365 groups, the modern group-connected team sites get ```powershell $sparksjoy = "Cat Lovers United", "Extranet", "Hub" - $sites = m365 spo site list |ConvertFrom-Json + $sites = m365 spo site list | ConvertFrom-Json $sites = $sites | where { $_.template -eq "SITEPAGEPUBLISHING#0" -or $_.template -eq "STS#3" -and -not ($sparksjoy -contains $_.Title)} if ($sites.Count -eq 0) { break } $sites | Format-Table Title, Url, Template diff --git a/docs/docs/sample-scripts/spo/detecting-pii-exists-in-sharepointlist-column/assets/sample.json b/docs/docs/sample-scripts/spo/detecting-pii-exists-in-sharepointlist-column/assets/sample.json index dce530147f8..e48907b3995 100644 --- a/docs/docs/sample-scripts/spo/detecting-pii-exists-in-sharepointlist-column/assets/sample.json +++ b/docs/docs/sample-scripts/spo/detecting-pii-exists-in-sharepointlist-column/assets/sample.json @@ -5,7 +5,7 @@ "title": "Detecting PII exists in SharePoint List using AWS Comprehend", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/detecting-pii-exists-in-sharepointlist-column", "creationDateTime": "2022-02-12", - "updateDateTime": "2022-02-12", + "updateDateTime": "2023-02-28", "shortDescription": "The script uses Amazon Comprehend to detect PII entities from a specific SharePoint List column record the results in another list and CSV report.", "longDescription": [ "In this post, I showcased using Amazon Comprehend to detect PII entities from a specific SharePoint List column and record the results in another list and CSV report via the AWS CLI and CLI for Microsoft 365." @@ -20,7 +20,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/detecting-pii-exists-in-sharepointlist-column/index.md b/docs/docs/sample-scripts/spo/detecting-pii-exists-in-sharepointlist-column/index.md index 4a435c8386f..9efb1c3024e 100644 --- a/docs/docs/sample-scripts/spo/detecting-pii-exists-in-sharepointlist-column/index.md +++ b/docs/docs/sample-scripts/spo/detecting-pii-exists-in-sharepointlist-column/index.md @@ -50,7 +50,7 @@ Source & Target Lists: } $spolSiteUrl = "${spolHostName}${spolSiteRelativeUrl}" - $spolListItems = m365 spo listitem list --title $spolListToAuditTitle --webUrl $spolSiteUrl --fields $spolListFields -o json | ConvertFrom-Json -AsHashtable + $spolListItems = m365 spo listitem list --listTitle $spolListToAuditTitle --webUrl $spolSiteUrl --fields $spolListFields -o json | ConvertFrom-Json -AsHashtable if ($spolListItems.Count -gt 0) { ForEach ($spolListItem in $spolListItems) { diff --git a/docs/docs/sample-scripts/spo/disable-tenant-wide-extension/assets/sample.json b/docs/docs/sample-scripts/spo/disable-tenant-wide-extension/assets/sample.json index 9c90863b802..385301b3c15 100644 --- a/docs/docs/sample-scripts/spo/disable-tenant-wide-extension/assets/sample.json +++ b/docs/docs/sample-scripts/spo/disable-tenant-wide-extension/assets/sample.json @@ -5,7 +5,7 @@ "title": "Disable specified Tenant-wide Extension", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/disable-tenant-wide-extension", "creationDateTime": "2020-05-20", - "updateDateTime": "2020-05-20", + "updateDateTime": "2023-02-28", "shortDescription": "Script helps to disable the specified tenant wide extension based on the id parameter.", "longDescription": [ "Tenant Wide Extensions list from the App Catalog helps to manage the activation / deactivation of the tenant wide extensions. The below sample script helps to disable the specified tenant wide extension based on the id parameter." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/disable-tenant-wide-extension/index.md b/docs/docs/sample-scripts/spo/disable-tenant-wide-extension/index.md index b4ce79869c0..0bac8ca7456 100644 --- a/docs/docs/sample-scripts/spo/disable-tenant-wide-extension/index.md +++ b/docs/docs/sample-scripts/spo/disable-tenant-wide-extension/index.md @@ -20,7 +20,7 @@ Note: TenantWideExtensionDisabled column denotes the extension is enabled or dis $appCatalogUrl = m365 spo tenant appcatalogurl get $filterQuery = "Title eq '" + $extensionName + "'" - $appItems = m365 spo listitem list --title $listName --webUrl $appCatalogUrl --fields "Id,Title" --filter $filterQuery --output json + $appItems = m365 spo listitem list --listTitle $listName --webUrl $appCatalogUrl --fields "Id,Title" --filter $filterQuery --output json $extItems = $appItems.Replace("Id", "ExtId") | ConvertFrom-JSON if ($extItems.count -gt 0) { @@ -44,7 +44,7 @@ Note: TenantWideExtensionDisabled column denotes the extension is enabled or dis appCatalogUrl=$(m365 spo tenant appcatalogurl get) filterQuery="Title eq '$extensionName'" - appItemsJson=$(m365 spo listitem list --title "$listName" --webUrl "$appCatalogUrl" --fields "Id,Title" --filter "$filterQuery" --output json) + appItemsJson=$(m365 spo listitem list --listTitle "$listName" --webUrl "$appCatalogUrl" --fields "Id,Title" --filter "$filterQuery" --output json) appItemId=( $(jq -r '.[].Id' <<< $appItemsJson)) if [[ $appItemId -gt 0 ]] diff --git a/docs/docs/sample-scripts/spo/download-attachments-from-list/assets/sample.json b/docs/docs/sample-scripts/spo/download-attachments-from-list/assets/sample.json index 3328c934f40..c972d8c5c87 100644 --- a/docs/docs/sample-scripts/spo/download-attachments-from-list/assets/sample.json +++ b/docs/docs/sample-scripts/spo/download-attachments-from-list/assets/sample.json @@ -5,7 +5,7 @@ "title": "Download attachments from a SharePoint Online list", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/download-attachments-from-list", "creationDateTime": "2023-02-18", - "updateDateTime": "2023-02-18", + "updateDateTime": "2023-02-28", "shortDescription": "Script helps to download attachments from a SharePoint Online list.", "longDescription": [ "Download attachments from a SharePoint Online list to a local directory " @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "6.2.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/empty-tenant-recyclebin/assets/sample.json b/docs/docs/sample-scripts/spo/empty-tenant-recyclebin/assets/sample.json index 0ffcd523207..46d9c6e2fb6 100644 --- a/docs/docs/sample-scripts/spo/empty-tenant-recyclebin/assets/sample.json +++ b/docs/docs/sample-scripts/spo/empty-tenant-recyclebin/assets/sample.json @@ -5,7 +5,7 @@ "title": "CLI - Empty the tenant recycle bin", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/empty-tenant-recyclebin", "creationDateTime": "2021-06-13", - "updateDateTime": "2021-06-13", + "updateDateTime": "2023-02-28", "shortDescription": "Script deletes modern SharePoint sites from recycle bin.", "longDescription": [ "Your deleted modern SharePoint sites are not going to disappear from the UI before they have been removed from the tenant recycle bin. You can either wait for three months, delete them manually via the SharePoint admin center, or run the CLI for Microsoft 365 script below." @@ -20,7 +20,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/ensure-siteassets-library/assets/sample.json b/docs/docs/sample-scripts/spo/ensure-siteassets-library/assets/sample.json index d731a8b7b31..06efa27134f 100644 --- a/docs/docs/sample-scripts/spo/ensure-siteassets-library/assets/sample.json +++ b/docs/docs/sample-scripts/spo/ensure-siteassets-library/assets/sample.json @@ -5,7 +5,7 @@ "title": "Ensure the Site Assets Library is created", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/ensure-siteassets-library", "creationDateTime": "2020-04-12", - "updateDateTime": "2020-04-12", + "updateDateTime": "2023-02-28", "shortDescription": "Ensure that the Site Assets library is created.", "longDescription": [ "There are occasions when creating a new modern SharePoint site using the CLI/REST API that the Site Assets library isn't created, use this script to ensure that the Site Assets library is created." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/export-configs-tenant-wide-extensions/assets/sample.json b/docs/docs/sample-scripts/spo/export-configs-tenant-wide-extensions/assets/sample.json index e3c77a8a505..a5d0dc7f288 100644 --- a/docs/docs/sample-scripts/spo/export-configs-tenant-wide-extensions/assets/sample.json +++ b/docs/docs/sample-scripts/spo/export-configs-tenant-wide-extensions/assets/sample.json @@ -5,7 +5,7 @@ "title": "Export Configurations of Tenant Wide Extensions", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/export-configs-tenant-wide-extensions", "creationDateTime": "2020-08-21", - "updateDateTime": "2020-08-21", + "updateDateTime": "2023-02-28", "shortDescription": "This script retrieves Tenant Wide Extension configurations from the App Catalog and exports the same to CSV file.", "longDescription": [ "The SharePoint Admin Center provides various governance features, but there is no way to easily export Configurations of Tenant Wide Extensions from the SharePoint admin center for governance activities. This script retrieves Tenant Wide Extension configurations from the App Catalog and exports the same in a comma-separated values (CSV) file." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/export-configs-tenant-wide-extensions/index.md b/docs/docs/sample-scripts/spo/export-configs-tenant-wide-extensions/index.md index 19946aee267..3d746f2cd6d 100644 --- a/docs/docs/sample-scripts/spo/export-configs-tenant-wide-extensions/index.md +++ b/docs/docs/sample-scripts/spo/export-configs-tenant-wide-extensions/index.md @@ -29,7 +29,7 @@ The SharePoint Admin Center provides various governance features, but there is n $appCatalogUrl = m365 spo tenant appcatalogurl get if ($appCatalogUrl) { - $spolItems = m365 spo listitem list --title $listName --webUrl $appCatalogUrl --fields $fields -o json | ConvertFrom-Json + $spolItems = m365 spo listitem list --listTitle $listName --webUrl $appCatalogUrl --fields $fields -o json | ConvertFrom-Json if ($spolItems.Count -gt 0) { $configurations = @() diff --git a/docs/docs/sample-scripts/spo/grant-api-permissions-aad/assets/sample.json b/docs/docs/sample-scripts/spo/grant-api-permissions-aad/assets/sample.json index 88f78bdb60d..d9764e1e315 100644 --- a/docs/docs/sample-scripts/spo/grant-api-permissions-aad/assets/sample.json +++ b/docs/docs/sample-scripts/spo/grant-api-permissions-aad/assets/sample.json @@ -5,7 +5,7 @@ "title": "Grant API permissions to SharePoint Azure AD Application", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/grant-api-permissions-aad", "creationDateTime": "2021-03-19", - "updateDateTime": "2021-03-19", + "updateDateTime": "2023-02-28", "shortDescription": "Grants API permissions to SharePoint Azure AD Application.", "longDescription": [ "Grants API permissions to SharePoint Azure AD Application." @@ -20,7 +20,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/grant-api-permissions-aad/index.md b/docs/docs/sample-scripts/spo/grant-api-permissions-aad/index.md index af36cd1087f..9698dec10b7 100644 --- a/docs/docs/sample-scripts/spo/grant-api-permissions-aad/index.md +++ b/docs/docs/sample-scripts/spo/grant-api-permissions-aad/index.md @@ -33,7 +33,10 @@ So what if you could bypass all these steps for both Graph and owned API? === "PowerShell" ```powershell - m365 login # Don't execute that command if you're already logged in + $m365Status = m365 status --output text + if ($m365Status -eq "Logged Out") { + m365 login + } # Granting Microsoft Graph permissions $resourceName = "Microsoft Graph" @@ -52,7 +55,7 @@ So what if you could bypass all these steps for both Graph and owned API? # If permission already granted, you'll face an OAuth permission issue # So you can test the presence of the scope for the requested resource to prevent the error - $scopeToAdd = m365 spo sp grant list --query "[?Resource == '${resourceName}' && Scope == '${permission}']" + $scopeToAdd = m365 spo serviceprincipal grant list --query "[?Resource == '${resourceName}' && Scope == '${permission}']" if ($scopeToAdd -eq "") { m365 spo serviceprincipal grant add --resource "$resourceName" --scope "$permission" Write-Host "Permission '${permission}' for Resource '${resourceName}' granted" -ForegroundColor Green @@ -78,7 +81,7 @@ So what if you could bypass all these steps for both Graph and owned API? # If permission already granted, you'll face an OAuth permission issue # So you can test the presence of the scope for the requested resource to prevent the error - $scopeToAdd = m365 spo sp grant list --query "[?Resource == '${resourceName}' && Scope == '${permission}']" + $scopeToAdd = m365 spo serviceprincipal grant list --query "[?Resource == '${resourceName}' && Scope == '${permission}']" if ($scopeToAdd -eq "") { m365 spo serviceprincipal grant add --resource "$resourceName" --scope "$permission" Write-Host "Permission '${permission}' for Resource '${resourceName}' granted" -ForegroundColor Green @@ -114,7 +117,7 @@ So what if you could bypass all these steps for both Graph and owned API? # If permission already granted, you'll face an OAuth permission issue # So you can test the presence of the scope for the requested resource to prevent the error - scopeToAdd=$( m365 spo sp grant list --query "[?Resource == '$resourceName' && Scope == '${permission}']" ) + scopeToAdd=$( m365 spo serviceprincipal grant list --query "[?Resource == '$resourceName' && Scope == '${permission}']" ) if [ "$( [ -z "$scopeToAdd" ] && echo "Empty" )" == "Empty" ]; then m365 spo serviceprincipal grant add --resource "$resourceName" --scope "$permission" echo -e "${GREEN}Permission '${permission}' for Resource '${resourceName}' granted${NOCOLOR}" @@ -136,7 +139,7 @@ So what if you could bypass all these steps for both Graph and owned API? # If permission already granted, you'll face an OAuth permission issue # So you can test the presence of the scope for the requested resource to prevent the error - scopeToAdd=$( m365 spo sp grant list --query "[?Resource == '$resourceName' && Scope == '${permission}']" ) + scopeToAdd=$( m365 spo serviceprincipal grant list --query "[?Resource == '$resourceName' && Scope == '${permission}']" ) if [ "$( [ -z "$scopeToAdd" ] && echo "Empty" )" == "Empty" ]; then m365 spo serviceprincipal grant add --resource "$resourceName" --scope "$permission" echo -e "${GREEN}Permission '${permission}' for Resource '${resourceName}' granted${NOCOLOR}" diff --git a/docs/docs/sample-scripts/spo/hide-list-from-site-contents/assets/sample.json b/docs/docs/sample-scripts/spo/hide-list-from-site-contents/assets/sample.json index 7b1af25a02e..b288d062c7e 100644 --- a/docs/docs/sample-scripts/spo/hide-list-from-site-contents/assets/sample.json +++ b/docs/docs/sample-scripts/spo/hide-list-from-site-contents/assets/sample.json @@ -5,7 +5,7 @@ "title": "CLI - Hide SharePoint list from Site Contents", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/hide-list-from-site-contents", "creationDateTime": "2020-03-28", - "updateDateTime": "2020-03-28", + "updateDateTime": "2023-02-28", "shortDescription": "hides the SharePoint list from the UI.", "longDescription": [ "If you need to hide the SharePoint list from the UI this simple PowerShell script will hide a specific list from the site contents. This will prevent users from easily accessing the list while, for example, you are still setting it up." @@ -20,7 +20,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/hide-list-from-site-contents/index.md b/docs/docs/sample-scripts/spo/hide-list-from-site-contents/index.md index e0fc9470ba9..da5da60e427 100644 --- a/docs/docs/sample-scripts/spo/hide-list-from-site-contents/index.md +++ b/docs/docs/sample-scripts/spo/hide-list-from-site-contents/index.md @@ -17,7 +17,7 @@ If you need to hide the SharePoint list from the UI this simple PowerShell scrip m365 login $list = m365 spo list get --webUrl $site -t $listName -o json | ConvertFrom-Json - m365 spo list set --webUrl $site -i $list.Id -t $listName --hidden true + m365 spo list set --webUrl $site --id $list.Id --hidden true ``` === "Bash" @@ -32,5 +32,5 @@ If you need to hide the SharePoint list from the UI this simple PowerShell scrip m365 login listId=$(m365 spo list get --webUrl $site -t "$listName" -o json | jq ".Id") - m365 spo list set --webUrl $site -i $listId -t $listName --hidden true + m365 spo list set --webUrl $site --id $listId --hidden true ``` diff --git a/docs/docs/sample-scripts/spo/insert-sp-library-pictures-into-word/assets/sample.json b/docs/docs/sample-scripts/spo/insert-sp-library-pictures-into-word/assets/sample.json index 925bad2145d..76816fd50a2 100644 --- a/docs/docs/sample-scripts/spo/insert-sp-library-pictures-into-word/assets/sample.json +++ b/docs/docs/sample-scripts/spo/insert-sp-library-pictures-into-word/assets/sample.json @@ -5,7 +5,7 @@ "title": "Insert pictures in a SharePoint Document Library into a Word document", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/insert-sp-library-pictures-into-word", "creationDateTime": "2020-06-20", - "updateDateTime": "2020-06-20", + "updateDateTime": "2023-02-28", "shortDescription": "Script shows how to download and insert many pictures.", "longDescription": [ "This PowerShell script shows how to download and insert many pictures in a SharePoint Document Library into a Word document in a two-column table with file name using CLI for Microsoft 365 commands and PowerShell Script." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/insert-sp-library-pictures-into-word/index.md b/docs/docs/sample-scripts/spo/insert-sp-library-pictures-into-word/index.md index f21278b6d21..b38cc4b3e95 100644 --- a/docs/docs/sample-scripts/spo/insert-sp-library-pictures-into-word/index.md +++ b/docs/docs/sample-scripts/spo/insert-sp-library-pictures-into-word/index.md @@ -14,7 +14,7 @@ Customers have multiple pictures in a SharePoint Document Library, and they need Prerequisites: -- Windows 10 +- Windows 10 or higher - Windows PowerShell - CLI for Microsoft 365 - Office 2007 or Higher version diff --git a/docs/docs/sample-scripts/spo/list-all-application-customizers/assets/sample.json b/docs/docs/sample-scripts/spo/list-all-application-customizers/assets/sample.json index fe859d197e7..7a8435354ee 100644 --- a/docs/docs/sample-scripts/spo/list-all-application-customizers/assets/sample.json +++ b/docs/docs/sample-scripts/spo/list-all-application-customizers/assets/sample.json @@ -5,7 +5,7 @@ "title": "List all application customizers in a tenant", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/list-all-application-customizers", "creationDateTime": "2021-06-17", - "updateDateTime": "2021-06-17", + "updateDateTime": "2023-02-28", "shortDescription": "List all the application customizers in a tenant.", "longDescription": [ "List all the application customizers in a tenant." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/list-all-application-customizers/index.md b/docs/docs/sample-scripts/spo/list-all-application-customizers/index.md index fcb1b9a6d0a..66ef686edd7 100644 --- a/docs/docs/sample-scripts/spo/list-all-application-customizers/index.md +++ b/docs/docs/sample-scripts/spo/list-all-application-customizers/index.md @@ -17,7 +17,7 @@ List all the application customizers in a tenant. Scope is default `All`. Here w foreach ($site in $sites) { write-host $site.Title write-host $site.Path - m365 spo customaction list --url $site.Path + m365 spo customaction list --webUrl $site.Path } ``` @@ -38,6 +38,6 @@ List all the application customizers in a tenant. Scope is default `All`. Here w siteName=$(echo ${site} | jq -r '.Title') echo $siteUrl echo $siteName - m365 spo customaction list --url $siteUrl + m365 spo customaction list --webUrl $siteUrl 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 025df692275..04c99a3da44 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 @@ -5,7 +5,7 @@ "title": "List all checked out files in SharePoint", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/list-all-checked-out-files", "creationDateTime": "2022-02-19", - "updateDateTime": "2022-02-19", + "updateDateTime": "2023-02-28", "shortDescription": "This script will retrieve all the checked out files in a particular site.", "longDescription": [ "This script will retrieve all the checked out files in a particular site." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.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 69b781b61e1..40b03bc4bd3 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 @@ -5,7 +5,7 @@ "title": "List all documents with a specific name within a SharePoint site", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/list-all-files-specific-name", "creationDateTime": "2022-02-01", - "updateDateTime": "2022-02-01", + "updateDateTime": "2023-02-28", "shortDescription": "This script will retrieve all the files in a site that have a specific word.", "longDescription": [ "This script will retrieve all the files in a site that have a specific word (i.e.: search all documents where the word 'CLI' is part of the file name)." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/list-all-files-with-missing-required-metadata/assets/sample.json b/docs/docs/sample-scripts/spo/list-all-files-with-missing-required-metadata/assets/sample.json index 53db362bb9f..b75c22ad3c1 100644 --- a/docs/docs/sample-scripts/spo/list-all-files-with-missing-required-metadata/assets/sample.json +++ b/docs/docs/sample-scripts/spo/list-all-files-with-missing-required-metadata/assets/sample.json @@ -5,7 +5,7 @@ "title": "List all files with missing required metadata", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/list-all-files-with-missing-required-metadata", "creationDateTime": "2022-12-31", - "updateDateTime": "2022-12-31", + "updateDateTime": "2023-02-28", "shortDescription": "List all files with missing required metadata.", "longDescription": [ "List all files with missing required metadata." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "6.0.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/list-all-files-with-missing-required-metadata/index.md b/docs/docs/sample-scripts/spo/list-all-files-with-missing-required-metadata/index.md index acdd970645f..381f8c0d140 100644 --- a/docs/docs/sample-scripts/spo/list-all-files-with-missing-required-metadata/index.md +++ b/docs/docs/sample-scripts/spo/list-all-files-with-missing-required-metadata/index.md @@ -14,13 +14,13 @@ The following script iterates through all files in all the document libraries of ```powershell $siteUrl = "https://.sharepoint.com/sites/" - $allLists = m365 spo list list --webUrl $($siteURL) --output json | ConvertFrom-Json + $allLists = m365 spo list list --webUrl "$siteURL" --output json | ConvertFrom-Json $allLibs = $allLists | where {$_.BaseTemplate -eq 101} $results = @() $fields = @('FileLeafRef', 'FileSystemObjectType') foreach ($lib in $allLibs) { - $allRequiredFields = m365 spo field list --webUrl $($siteURL) --listId $($lib.Id) --query "[?Required == ``true``]" --output json | ConvertFrom-Json + $allRequiredFields = m365 spo field list --webUrl "$siteURL" --listId $lib.Id --query "[?Required == ``true``]" --output json | ConvertFrom-Json if($allRequiredFields.Length -eq 0){ continue @@ -36,7 +36,7 @@ The following script iterates through all files in all the document libraries of } } - $allItems = m365 spo listitem list --webUrl $($siteURL) --listId $($lib.Id) --fields $($allRequiredFieldsInternalName -join ",") --output json | ConvertFrom-Json + $allItems = m365 spo listitem list --webUrl "$siteURL" --listId $lib.Id --fields $($allRequiredFieldsInternalName -join ",") --output json | ConvertFrom-Json $allItems = $allItems | where {$_.FileSystemObjectType -eq 0} foreach($item in $allItems){ diff --git a/docs/docs/sample-scripts/spo/list-all-items-with-unique-permissions/assets/sample.json b/docs/docs/sample-scripts/spo/list-all-items-with-unique-permissions/assets/sample.json index 4d1f039cde3..fe1a721f482 100644 --- a/docs/docs/sample-scripts/spo/list-all-items-with-unique-permissions/assets/sample.json +++ b/docs/docs/sample-scripts/spo/list-all-items-with-unique-permissions/assets/sample.json @@ -5,7 +5,7 @@ "title": "List all items with unique permissions", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/list-all-items-with-unique-permissions", "creationDateTime": "2022-02-09", - "updateDateTime": "2022-02-09", + "updateDateTime": "2023-02-28", "shortDescription": "List all items for a specific SharePoint list on a site.", "longDescription": [ "List all items for a specific SharePoint list on a site." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/list-all-items-with-unique-permissions/index.md b/docs/docs/sample-scripts/spo/list-all-items-with-unique-permissions/index.md index daf6176e857..71887c6a404 100644 --- a/docs/docs/sample-scripts/spo/list-all-items-with-unique-permissions/index.md +++ b/docs/docs/sample-scripts/spo/list-all-items-with-unique-permissions/index.md @@ -16,7 +16,7 @@ Author: [Veronique Lengelle](https://twitter.com/veronicageek), Inspired by [Sal #Declare variables $siteURL = "https://.sharepoint.com/sites/" $listName = "" - $allItems = m365 spo listitem list --webUrl $siteUrl --title $listName --fields "ID, HasUniqueRoleAssignments, Title" | ConvertFrom-Json + $allItems = m365 spo listitem list --webUrl $siteUrl --listTitle $listName --fields "ID,HasUniqueRoleAssignments,Title" | ConvertFrom-Json $results = @() #Loop through each item in the list @@ -44,7 +44,7 @@ Author: [Veronique Lengelle](https://twitter.com/veronicageek), Inspired by [Sal foreach($list in $allLists){ if ($list.Hidden -eq $false){ - $allItems = m365 spo listitem list --webUrl $siteURL --id $list.Id --fields "ID, HasUniqueRoleAssignments, Title" | ConvertFrom-Json + $allItems = m365 spo listitem list --webUrl $siteURL --listId $list.Id --fields "ID,HasUniqueRoleAssignments,Title" | ConvertFrom-Json foreach($item in $allItems){ $results += [pscustomobject][ordered]@{ 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 962ea69988c..7d232727c8a 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 @@ -5,7 +5,7 @@ "title": "Lists number of files in all lists and folders for the given site", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/list-all-list-folders-itemcount", "creationDateTime": "2021-06-22", - "updateDateTime": "2021-06-22", + "updateDateTime": "2023-02-28", "shortDescription": "List all Lists, the folders and sub folders in a given site, and output the item count.", "longDescription": [ "List all Lists, the folders and sub folders in a given site, and output the item count. Each folder is processed recursively. By default only non hidden document libraries are processed." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/list-all-list-folders-itemcount/index.md b/docs/docs/sample-scripts/spo/list-all-list-folders-itemcount/index.md index afe5c449ff7..c745c10892e 100644 --- a/docs/docs/sample-scripts/spo/list-all-list-folders-itemcount/index.md +++ b/docs/docs/sample-scripts/spo/list-all-list-folders-itemcount/index.md @@ -30,7 +30,7 @@ List all Lists, the folders and sub folders in a given site, and output the item $folders = m365 spo folder list -u $webUrl --parentFolderUrl $folderUrl -o json | ConvertFrom-Json foreach ($folder in $folders) { - $folderStats = m365 spo folder get -u $webUrl --folderUrl $folder.ServerRelativeUrl -o json | ConvertFrom-Json + $folderStats = m365 spo folder get -u $webUrl --f $folder.ServerRelativeUrl -o json | ConvertFrom-Json Write-Output "Processing folder: $($folder.ServerRelativeUrl);" [void]$results.Add([pscustomobject]@{ Url = $folder.ServerRelativeUrl; ItemCount = $folderStats.ItemCount; Type = "Folder"; }) diff --git a/docs/docs/sample-scripts/spo/list-attachment-names-from-spo-lists/assets/sample.json b/docs/docs/sample-scripts/spo/list-attachment-names-from-spo-lists/assets/sample.json index de29789e785..6b1b257012e 100644 --- a/docs/docs/sample-scripts/spo/list-attachment-names-from-spo-lists/assets/sample.json +++ b/docs/docs/sample-scripts/spo/list-attachment-names-from-spo-lists/assets/sample.json @@ -5,7 +5,7 @@ "title": "List Attachment Names From SharePoint Lists For A Site", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/list-attachment-names-from-spo-lists", "creationDateTime": "2022-07-29", - "updateDateTime": "2022-07-29", + "updateDateTime": "2023-02-28", "shortDescription": "Lists Attachment Names From SharePoint Lists For A Site.", "longDescription": [ "Lists Attachment Names From SharePoint Lists For A Site." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/list-attachment-names-from-spo-lists/index.md b/docs/docs/sample-scripts/spo/list-attachment-names-from-spo-lists/index.md index bc1e4f3db5e..4910d024847 100644 --- a/docs/docs/sample-scripts/spo/list-attachment-names-from-spo-lists/index.md +++ b/docs/docs/sample-scripts/spo/list-attachment-names-from-spo-lists/index.md @@ -18,7 +18,7 @@ Author: [Veronique Lengelle](https://twitter.com/veronicageek) foreach($list in $allLists){ if ($list.Hidden -eq $false){ - $allItems = m365 spo listitem list --id $list.Id --webUrl $siteUrl | ConvertFrom-Json + $allItems = m365 spo listitem list --listId $list.Id --webUrl $siteUrl | ConvertFrom-Json foreach($item in $allItems){ $allAttachments = m365 spo listitem attachment list --webUrl $siteUrl --listTitle $list.Title --itemId $item.Id | ConvertFrom-Json diff --git a/docs/docs/sample-scripts/spo/list-externalusers-in-sitegroups/assets/sample.json b/docs/docs/sample-scripts/spo/list-externalusers-in-sitegroups/assets/sample.json index fa5343d6299..ae3bf8d7550 100644 --- a/docs/docs/sample-scripts/spo/list-externalusers-in-sitegroups/assets/sample.json +++ b/docs/docs/sample-scripts/spo/list-externalusers-in-sitegroups/assets/sample.json @@ -5,7 +5,7 @@ "title": "List all external users in site groups across all site collections", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/list-externalusers-in-sitegroups", "creationDateTime": "2022-07-25", - "updateDateTime": "2022-07-25", + "updateDateTime": "2023-02-28", "shortDescription": "This script shows how you can check if external users are added to site groups.", "longDescription": [ "This script shows how you can check if external users are added to site groups. It will show all external users across all site collections and the site groups they where added to." @@ -24,7 +24,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/list-externalusers-in-sitegroups/index.md b/docs/docs/sample-scripts/spo/list-externalusers-in-sitegroups/index.md index b4ae092fb41..bc9a84d409f 100644 --- a/docs/docs/sample-scripts/spo/list-externalusers-in-sitegroups/index.md +++ b/docs/docs/sample-scripts/spo/list-externalusers-in-sitegroups/index.md @@ -24,7 +24,7 @@ This script shows how you can check if external users are added to site groups. Write-Host "Retrieving all sites and check external users..." -ForegroundColor Green - $sites = m365 spo site list --type All | ConvertFrom-Json + $sites = m365 spo site list | ConvertFrom-Json $siteCount = $sites.Count $siteCounter = 0 $results = [System.Collections.ArrayList]::new() diff --git a/docs/docs/sample-scripts/spo/list-failed-sitedesigns/assets/sample.json b/docs/docs/sample-scripts/spo/list-failed-sitedesigns/assets/sample.json index bbb9029ea39..fb4a1f9a177 100644 --- a/docs/docs/sample-scripts/spo/list-failed-sitedesigns/assets/sample.json +++ b/docs/docs/sample-scripts/spo/list-failed-sitedesigns/assets/sample.json @@ -5,7 +5,7 @@ "title": "List all failed site design for all sites", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/list-failed-sitedesigns", "creationDateTime": "2021-07-05", - "updateDateTime": "2021-07-05", + "updateDateTime": "2023-02-28", "shortDescription": "Script iterates through all site collections and lists all site design runs with errors.", "longDescription": [ "The following script iterates through all site collections and lists all site design runs with errors. By filtering on `OutcomeCode == '1'` it will return all sites and runs with explicit errors. By filtering on `OutcomeCode != '0'` you can also return any result that is not marked as successful." @@ -20,7 +20,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.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 f08d0826de6..428601a5d48 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 @@ -5,7 +5,7 @@ "title": "List all large files within a SharePoint Site", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/list-large-files-within-a-site", "creationDateTime": "2022-06-28", - "updateDateTime": "2022-06-28", + "updateDateTime": "2023-02-28", "shortDescription": "Script will help you find every files in a specific SharePoint Online site that are over a certain size.", "longDescription": [ "The following script will help you find every files in a specific SharePoint Online site that are over a certain size. It iterates through all libraries and identifies all files larger than the set threshold." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/list-site-app-catalogs/assets/sample.json b/docs/docs/sample-scripts/spo/list-site-app-catalogs/assets/sample.json index 3b729b6a340..c7fbbc75d82 100644 --- a/docs/docs/sample-scripts/spo/list-site-app-catalogs/assets/sample.json +++ b/docs/docs/sample-scripts/spo/list-site-app-catalogs/assets/sample.json @@ -5,7 +5,7 @@ "title": "Lists active SharePoint site collection application catalogs", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/list-site-app-catalogs", "creationDateTime": "2019-11-16", - "updateDateTime": "2019-11-16", + "updateDateTime": "2023-02-28", "shortDescription": "Script will find all installed site collection application catalogs within a tenant.", "longDescription": [ "A sample that shows how to find all installed site collection application catalogs within a tenant. IT Professionals or DevOps can benefit from it when they govern tenants or scan tenant for customizations. Pulling a list with site collection app catalogs can give them valuable information at what scale the tenant site collections are customized. The sample outputs the URL of the site collection, and this can help IT Pros or DevOps to dig deeper and find out what and how many solution packages a site collection app catalog has installed. Check for un-healthy solution packages or such that could be a security risk." @@ -20,7 +20,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/list-site-app-catalogs/index.md b/docs/docs/sample-scripts/spo/list-site-app-catalogs/index.md index 21dc9806354..90d8388d8a1 100644 --- a/docs/docs/sample-scripts/spo/list-site-app-catalogs/index.md +++ b/docs/docs/sample-scripts/spo/list-site-app-catalogs/index.md @@ -14,7 +14,7 @@ Note, because the sample uses the SharePoint search API to identify the site col === "PowerShell" ```powershell - $appCatalogs = m365 spo search --query "contentclass:STS_List_336" --selectProperties SPSiteURL --allResults --output json | ConvertFrom-Json + $appCatalogs = m365 spo search --queryText "contentclass:STS_List_336" --selectProperties SPSiteURL --allResults --output json | ConvertFrom-Json $appCatalogs | ForEach-Object { Write-Host $_.SPSiteURL } Write-Host 'Total count:' $appCatalogs.Count @@ -27,7 +27,7 @@ Note, because the sample uses the SharePoint search API to identify the site col # requires jq: https://stedolan.github.io/jq/ - appCatalogs=$(m365 spo search --query "contentclass:STS_List_336" --selectProperties SPSiteURL --allResults --output json) + appCatalogs=$(m365 spo search --queryText "contentclass:STS_List_336" --selectProperties SPSiteURL --allResults --output json) echo $appCatalogs | jq -r '.[].SPSiteURL' echo "Total count:" $(echo $appCatalogs | jq length) 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 8f1781be77e..cd4c4d5a1f6 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 @@ -5,7 +5,7 @@ "title": "List site collections and their lists", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/list-site-collection-lists", "creationDateTime": "2021-03-12", - "updateDateTime": "2021-03-12", + "updateDateTime": "2023-02-28", "shortDescription": "Script helps you to list and export all site collection and their lists SharePoint Online sites.", "longDescription": [ "This script helps you to list and export all site collection and their lists SharePoint Online sites, ideal for getting insights into the size of your environment." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/list-site-collection-owners/assets/sample.json b/docs/docs/sample-scripts/spo/list-site-collection-owners/assets/sample.json index 6c33a7b2cb4..9b8223aa5d6 100644 --- a/docs/docs/sample-scripts/spo/list-site-collection-owners/assets/sample.json +++ b/docs/docs/sample-scripts/spo/list-site-collection-owners/assets/sample.json @@ -5,7 +5,7 @@ "title": "List site collection owners", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/list-site-collection-owners", "creationDateTime": "2021-02-27", - "updateDateTime": "2021-02-27", + "updateDateTime": "2023-02-28", "shortDescription": "This script helps you to list and export all site collection owners in your SharePoint Online sites.", "longDescription": [ "This script helps you to list and export all site collection owners in your SharePoint Online sites." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/list-site-externalusers/assets/sample.json b/docs/docs/sample-scripts/spo/list-site-externalusers/assets/sample.json index 2adf6e4f405..3bc724d3227 100644 --- a/docs/docs/sample-scripts/spo/list-site-externalusers/assets/sample.json +++ b/docs/docs/sample-scripts/spo/list-site-externalusers/assets/sample.json @@ -5,7 +5,7 @@ "title": "CLI - List all external users in all site collections", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/list-site-externalusers", "creationDateTime": "2021-03-15", - "updateDateTime": "2021-03-15", + "updateDateTime": "2023-02-28", "shortDescription": "This script helps you to list all external users in all SharePoint Online sites.", "longDescription": [ "This script helps you to list all external users in all SharePoint Online sites. It provides insights in who the users are, and if available who they where invited by." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/list-tenant-wide-extensions/assets/sample.json b/docs/docs/sample-scripts/spo/list-tenant-wide-extensions/assets/sample.json index 0dd3df5d014..df29ba823ce 100644 --- a/docs/docs/sample-scripts/spo/list-tenant-wide-extensions/assets/sample.json +++ b/docs/docs/sample-scripts/spo/list-tenant-wide-extensions/assets/sample.json @@ -5,7 +5,7 @@ "title": "CLI - List all tenant-wide extensions", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/list-tenant-wide-extensions", "creationDateTime": "2020-04-12", - "updateDateTime": "2020-04-12", + "updateDateTime": "2023-02-28", "shortDescription": "This script lists all tenant-wide extensions deployed in the tenant.", "longDescription": [ "The following script lists all tenant-wide extensions deployed in the tenant. The sample returns the Id, Title, Extension Location and Extension Disabled status of each extension." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/monitor-site-collection-storage-usage/assets/sample.json b/docs/docs/sample-scripts/spo/monitor-site-collection-storage-usage/assets/sample.json index 3037d155bb2..24231728457 100644 --- a/docs/docs/sample-scripts/spo/monitor-site-collection-storage-usage/assets/sample.json +++ b/docs/docs/sample-scripts/spo/monitor-site-collection-storage-usage/assets/sample.json @@ -5,7 +5,7 @@ "title": "Monitor Site Collections Storage Usage", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/monitor-site-collection-storage-usage", "creationDateTime": "2021-05-04", - "updateDateTime": "2021-05-04", + "updateDateTime": "2023-02-28", "shortDescription": "This script allows you to monitor Site Collections Storage Usage.", "longDescription": [ "This script allows you to monitor Site Collections Storage Usage." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/perform-operations-not-covered-by-cli-for-microsoft-365/assets/sample.json b/docs/docs/sample-scripts/spo/perform-operations-not-covered-by-cli-for-microsoft-365/assets/sample.json index efc0202caa3..53f6c5022a4 100644 --- a/docs/docs/sample-scripts/spo/perform-operations-not-covered-by-cli-for-microsoft-365/assets/sample.json +++ b/docs/docs/sample-scripts/spo/perform-operations-not-covered-by-cli-for-microsoft-365/assets/sample.json @@ -5,7 +5,7 @@ "title": "How to perform operations if a command is not covered by the CLI for Microsoft 365", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/perform-operations-not-covered-by-cli-for-microsoft-365", "creationDateTime": "2021-10-24", - "updateDateTime": "2021-10-24", + "updateDateTime": "2023-02-28", "shortDescription": "This script shows how to perform operations if a command is not covered by the CLI for Microsoft 365.", "longDescription": [ "One of the most powerful tools a Microsoft 365 user has is the CLI for Microsoft 365. The command line allows any user to get a lot of things done in a fast way. There is no boundary to the number of things a seasoned user can do by merely using the CLI for Microsoft 365. This script shows how to perform operations if a command is not covered by the CLI for Microsoft 365." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/perform-operations-not-covered-by-cli-for-microsoft-365/index.md b/docs/docs/sample-scripts/spo/perform-operations-not-covered-by-cli-for-microsoft-365/index.md index 15a6293d070..30d92c5c3f8 100644 --- a/docs/docs/sample-scripts/spo/perform-operations-not-covered-by-cli-for-microsoft-365/index.md +++ b/docs/docs/sample-scripts/spo/perform-operations-not-covered-by-cli-for-microsoft-365/index.md @@ -57,7 +57,7 @@ Prerequisites: Try { #Get All Items from the List - $ListItems = m365 spo listitem list --webUrl $SiteURL --title $ListTitle -o json | ConvertFrom-Json -AsHashtable + $ListItems = m365 spo listitem list --webUrl $SiteURL --listTitle $ListTitle -o json | ConvertFrom-Json -AsHashtable #Iterate through each list item Foreach ($Item in $ListItems) { diff --git a/docs/docs/sample-scripts/spo/planner-migrate-sharepoint-list/assets/sample.json b/docs/docs/sample-scripts/spo/planner-migrate-sharepoint-list/assets/sample.json index 2a689980f85..e9762ee36bb 100644 --- a/docs/docs/sample-scripts/spo/planner-migrate-sharepoint-list/assets/sample.json +++ b/docs/docs/sample-scripts/spo/planner-migrate-sharepoint-list/assets/sample.json @@ -5,7 +5,7 @@ "title": "Planner migration to SharePoint list", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/planner-migrate-sharepoint-list", "creationDateTime": "2022-03-12", - "updateDateTime": "2022-03-12", + "updateDateTime": "2023-02-28", "shortDescription": "This script migrates an existing plan to a SharePoint Online List with this sample.", "longDescription": [ "Use the CLI for Microsoft 365 to migrate an existing plan to a SharePoint Online List with this sample. You can specify the planner plan that you want to migrate and the script will generate a new list for you with the required fields and views. The current sample does migrate all tasks however it skips the following information: Categories, Comments made on tasks, Attachments" @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/planner-migrate-sharepoint-list/index.md b/docs/docs/sample-scripts/spo/planner-migrate-sharepoint-list/index.md index 5c534f25db3..d5145e38343 100644 --- a/docs/docs/sample-scripts/spo/planner-migrate-sharepoint-list/index.md +++ b/docs/docs/sample-scripts/spo/planner-migrate-sharepoint-list/index.md @@ -100,10 +100,10 @@ Use the CLI for Microsoft 365 to migrate an existing plan to a SharePoint Online $viewName = "All Items" $viewFields = @("Progress", "Priority", "Assigned_x0020_to", "Due date", "Start date"); foreach ($field in $viewFields) { - m365 spo list view field add --webUrl $SiteUrl --listTitle $list.title --viewTitle $viewName --fieldTitle $field + m365 spo list view field add --webUrl $SiteUrl --listTitle $list.title --viewTitle $viewName --title $field } - $view = m365 spo list view set --webUrl $SiteUrl --listTitle $list.title --viewTitle $viewName --ViewQuery '' - $view = m365 spo list view set --webUrl $SiteUrl --listTitle $list.title --viewTitle $viewName --ViewType2 "TILES" + $view = m365 spo list view set --webUrl $SiteUrl --listTitle $list.title --title $viewName --ViewQuery '' + $view = m365 spo list view set --webUrl $SiteUrl --listTitle $list.title --title $viewName --ViewType2 "TILES" } Write-Host "Migrating tasks" diff --git a/docs/docs/sample-scripts/spo/remove-api-permissions/assets/sample.json b/docs/docs/sample-scripts/spo/remove-api-permissions/assets/sample.json index 4a182e83528..cd064d54552 100644 --- a/docs/docs/sample-scripts/spo/remove-api-permissions/assets/sample.json +++ b/docs/docs/sample-scripts/spo/remove-api-permissions/assets/sample.json @@ -5,7 +5,7 @@ "title": "Remove SharePoint API permissions", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/remove-api-permissions", "creationDateTime": "2021-06-17", - "updateDateTime": "2021-06-17", + "updateDateTime": "2023-02-28", "shortDescription": "This script helps you to quickly remove SharePoint API permissions.", "longDescription": [ "When building SharePoint Framework solutions connected to APIs secured with Azure Active Directory, you might need to clear the list of granted API permissions. This script helps you to quickly remove SharePoint API permissions." @@ -20,7 +20,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/remove-api-permissions/index.md b/docs/docs/sample-scripts/spo/remove-api-permissions/index.md index 38394e4920d..7c4ce0bc8bc 100644 --- a/docs/docs/sample-scripts/spo/remove-api-permissions/index.md +++ b/docs/docs/sample-scripts/spo/remove-api-permissions/index.md @@ -18,13 +18,13 @@ This script helps you to quickly remove SharePoint API permissions. $.verbose = false; console.log('Retrieving granted API permissions...'); - const apiPermissions = JSON.parse(await $`m365 spo sp grant list -o json`); + const apiPermissions = JSON.parse(await $`m365 serviceprincipal sp grant list -o json`); for (let i = 0; i < apiPermissions.length; i++) { const permission = apiPermissions[i]; console.log(`Removing permission ${permission.Resource}/${permission.Scope} (${permission.ObjectId})...`); try { - await $`m365 spo serviceprincipal grant revoke --grantId ${permission.ObjectId}` + await $`m365 spo serviceprincipal grant revoke --id ${permission.ObjectId}` console.log(chalk.green('DONE')); } catch (err) { diff --git a/docs/docs/sample-scripts/spo/remove-custom-themes/assets/sample.json b/docs/docs/sample-scripts/spo/remove-custom-themes/assets/sample.json index 225303af103..19de93b9618 100644 --- a/docs/docs/sample-scripts/spo/remove-custom-themes/assets/sample.json +++ b/docs/docs/sample-scripts/spo/remove-custom-themes/assets/sample.json @@ -5,7 +5,7 @@ "title": "CLI - Delete custom color themes from SharePoint", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/remove-custom-themes", "creationDateTime": "2019-10-13", - "updateDateTime": "2019-10-13", + "updateDateTime": "2023-02-28", "shortDescription": "This script removes custom color themes from SharePoint.", "longDescription": [ "Have you been creating a lot of beautiful themes lately and testing them in your dev tenant, but don’t want to keep them anymore? If yes, then this PowerShell script is for you." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/remove-orphaned-redirect-sites/assets/sample.json b/docs/docs/sample-scripts/spo/remove-orphaned-redirect-sites/assets/sample.json index 08b77ea0c22..7406f059ed5 100644 --- a/docs/docs/sample-scripts/spo/remove-orphaned-redirect-sites/assets/sample.json +++ b/docs/docs/sample-scripts/spo/remove-orphaned-redirect-sites/assets/sample.json @@ -5,7 +5,7 @@ "title": "CLI - Remove orphaned redirect sites", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/remove-orphaned-redirect-sites", "creationDateTime": "2020-09-06", - "updateDateTime": "2020-09-06", + "updateDateTime": "2023-02-28", "shortDescription": "This script provides you with an overview of all orphaned redirect sites and allows you to quickly delete them.", "longDescription": [ "Changing the URL of a site results in a new site type: a Redirect Site. However this redirect site does not get removed if you delete the newly renamed site. This could result in orphaned redirect site collections that redirect to nothing. This script provides you with an overview of all orphaned redirect sites and allows you to quickly delete them." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/remove-pending-api-permission-requests/assets/sample.json b/docs/docs/sample-scripts/spo/remove-pending-api-permission-requests/assets/sample.json index 2df3cc271c4..1b5b5362ac8 100644 --- a/docs/docs/sample-scripts/spo/remove-pending-api-permission-requests/assets/sample.json +++ b/docs/docs/sample-scripts/spo/remove-pending-api-permission-requests/assets/sample.json @@ -5,7 +5,7 @@ "title": "Remove pending SharePoint API permission requests", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/remove-pending-api-permission-requests", "creationDateTime": "2021-06-17", - "updateDateTime": "2021-06-17", + "updateDateTime": "2023-02-28", "shortDescription": "This script helps you to quickly remove pending SharePoint API permission requests.", "longDescription": [ "When building SharePoint Framework solutions connected to APIs secured with Azure Active Directory, you'll easily end up with many pending permission requests. This script helps you to quickly remove pending SharePoint API permission requests." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/remove-pending-api-permission-requests/index.md b/docs/docs/sample-scripts/spo/remove-pending-api-permission-requests/index.md index 6cdc760cbbd..a15598fb7c2 100644 --- a/docs/docs/sample-scripts/spo/remove-pending-api-permission-requests/index.md +++ b/docs/docs/sample-scripts/spo/remove-pending-api-permission-requests/index.md @@ -19,13 +19,13 @@ This script helps you to quickly remove pending SharePoint API permission reques $.verbose = false; console.log('Retrieving permission requests...'); - const permissionRequests = JSON.parse(await $`m365 spo sp permissionrequest list -o json`); + const permissionRequests = JSON.parse(await $`m365 spo serviceprincipal permissionrequest list -o json`); for (let i = 0; i < permissionRequests.length; i++) { const request = permissionRequests[i]; console.log(`Removing request ${request.Resource}/${request.Scope} (${request.Id})...`); try { - await $`m365 spo sp permissionrequest deny --requestId ${request.Id}` + await $`m365 spo serviceprincipal permissionrequest deny --id ${request.Id}` console.log(chalk.green('DONE')); } catch (err) { diff --git a/docs/docs/sample-scripts/spo/remove-site-designs/assets/sample.json b/docs/docs/sample-scripts/spo/remove-site-designs/assets/sample.json index 3005534e6fe..5d02ef3620f 100644 --- a/docs/docs/sample-scripts/spo/remove-site-designs/assets/sample.json +++ b/docs/docs/sample-scripts/spo/remove-site-designs/assets/sample.json @@ -5,7 +5,7 @@ "title": "CLI - Delete custom SharePoint site designs", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/remove-site-designs", "creationDateTime": "2019-10-20", - "updateDateTime": "2019-10-20", + "updateDateTime": "2023-02-28", "shortDescription": "This script helps you get rid of custom SharePoint site designs.", "longDescription": [ "Site designs and especially site scripts can be something that ends up just hanging around in your tenant for a long time even though you no longer need them for anything. Use the scripts below to get rid of them. You might also find some site scripts that are not linked to any site design and hence never get executed!" @@ -20,7 +20,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/remove-site-scripts/assets/sample.json b/docs/docs/sample-scripts/spo/remove-site-scripts/assets/sample.json index 5f4639d2688..437ae7e8803 100644 --- a/docs/docs/sample-scripts/spo/remove-site-scripts/assets/sample.json +++ b/docs/docs/sample-scripts/spo/remove-site-scripts/assets/sample.json @@ -5,7 +5,7 @@ "title": "CLI - Delete custom SharePoint site scripts", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/remove-site-scripts", "creationDateTime": "2020-03-15", - "updateDateTime": "2020-03-15", + "updateDateTime": "2023-02-28", "shortDescription": "This script helps you get rid of custom SharePoint site scripts.", "longDescription": [ "Site designs and especially site scripts can be something that ends up just hanging around in your tenant for a long time even though you no longer need them for anything. Use the scripts below to get rid of them. You might also find some site scripts that are not linked to any site design and hence never get executed!" @@ -20,7 +20,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/remove-siteCollection-admin-user/assets/sample.json b/docs/docs/sample-scripts/spo/remove-siteCollection-admin-user/assets/sample.json index fa906201eff..6caa8cdd4fb 100644 --- a/docs/docs/sample-scripts/spo/remove-siteCollection-admin-user/assets/sample.json +++ b/docs/docs/sample-scripts/spo/remove-siteCollection-admin-user/assets/sample.json @@ -5,7 +5,7 @@ "title": "Remove a Site Collection Admin User from all Site Collections", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/remove-siteCollection-admin-user", "creationDateTime": "2021-04-23", - "updateDateTime": "2021-04-23", + "updateDateTime": "2023-02-28", "shortDescription": "This script removes a Site Collection Admin User from all Site Collections.", "longDescription": [ "This script removes a Site Collection Admin User from all Site Collections." @@ -23,7 +23,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/remove-siteCollection-admin-user/index.md b/docs/docs/sample-scripts/spo/remove-siteCollection-admin-user/index.md index 229f9e34e70..5bb893973cd 100644 --- a/docs/docs/sample-scripts/spo/remove-siteCollection-admin-user/index.md +++ b/docs/docs/sample-scripts/spo/remove-siteCollection-admin-user/index.md @@ -59,7 +59,7 @@ Inspired By: [Salaudeen Rajack](https://www.sharepointdiary.com/2017/02/sharepoi #Remove the user Write-Host "User $($UserToRemove) is an Admin in $($site.Title). Removing..." -f Blue - m365 spo user remove --webUrl $($site.Url) --id $userToRemoveID --confirm + m365 spo user remove --webUrl "$($site.Url)" --id $userToRemoveID --confirm } } } diff --git a/docs/docs/sample-scripts/spo/replace-site-collection-admin/assets/sample.json b/docs/docs/sample-scripts/spo/replace-site-collection-admin/assets/sample.json index b409f8e845b..73fbd19eb8c 100644 --- a/docs/docs/sample-scripts/spo/replace-site-collection-admin/assets/sample.json +++ b/docs/docs/sample-scripts/spo/replace-site-collection-admin/assets/sample.json @@ -5,7 +5,7 @@ "title": "Replace site collection admin with another user", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/replace-site-collection-admin", "creationDateTime": "2021-05-17", - "updateDateTime": "2021-05-17", + "updateDateTime": "2023-02-28", "shortDescription": "The script removes a user from a site collection and adds a new one as site collection admin.", "longDescription": [ "The script removes a user from a site collection and adds a new one as site collection admin." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/replace-site-collection-admin/index.md b/docs/docs/sample-scripts/spo/replace-site-collection-admin/index.md index b00f48d6726..7b27b9b9055 100644 --- a/docs/docs/sample-scripts/spo/replace-site-collection-admin/index.md +++ b/docs/docs/sample-scripts/spo/replace-site-collection-admin/index.md @@ -23,7 +23,6 @@ The script removes a user from a site collection and adds a new one as site coll if ($m365Status -eq "Logged Out") { # Connection to Microsoft 365 m365 login - $m365Status = m365 status --output text } m365 spo user remove --webUrl $webUrl --loginName "i:0#.f|membership|$userToRemove" --confirm diff --git a/docs/docs/sample-scripts/spo/setup-example-site/assets/sample.json b/docs/docs/sample-scripts/spo/setup-example-site/assets/sample.json index 91b901285d2..246e16fa56b 100644 --- a/docs/docs/sample-scripts/spo/setup-example-site/assets/sample.json +++ b/docs/docs/sample-scripts/spo/setup-example-site/assets/sample.json @@ -5,7 +5,7 @@ "title": "CLI - Setup example site", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/setup-example-site", "creationDateTime": "2021-04-10", - "updateDateTime": "2021-04-10", + "updateDateTime": "2023-02-28", "shortDescription": "This script is a good starting point for a setup script to create site with some assets like columns, content types, lists, navigation etc.", "longDescription": [ "This script is a good starting point for a setup script to create site with some assets like columns, content types, lists, navigation etc." @@ -23,7 +23,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/setup-example-site/index.md b/docs/docs/sample-scripts/spo/setup-example-site/index.md index 3d1933208ac..19d62a60df0 100644 --- a/docs/docs/sample-scripts/spo/setup-example-site/index.md +++ b/docs/docs/sample-scripts/spo/setup-example-site/index.md @@ -48,7 +48,7 @@ This script is a good starting point for a setup script to create site with some Write-host 'add site column' $fieldName = 'Sample Text Column' - $field = m365 spo field get --webUrl $siteUrl --fieldTitle $fieldName --output 'json' + $field = m365 spo field get --webUrl $siteUrl --title $fieldName --output 'json' if ($null -eq $field) { Write-host 'sample site column does not exist, I will create it' $fieldXml = "" @@ -77,7 +77,7 @@ This script is a good starting point for a setup script to create site with some Write-host 'add field to content type' $fieldId = $field.Id $contentTypeId = $contentType.StringId - m365 spo contenttype field set --webUrl $siteUrl --contentTypeId $contentTypeId --fieldId $fieldId --required false + m365 spo contenttype field set --webUrl $siteUrl --contentTypeId $contentTypeId --id $fieldId --required false Write-host 'create generic list' $listName = 'setup test list' @@ -95,7 +95,7 @@ This script is a good starting point for a setup script to create site with some m365 spo list set --webUrl $siteUrl --id $list.Id --contentTypesEnabled true Write-host 'add content type to list' - $contentTypeAddedToList = m365 spo list contenttype add --webUrl $siteUrl --listId $list.Id --contentTypeId $contentTypeId + $contentTypeAddedToList = m365 spo list contenttype add --webUrl $siteUrl --listId $list.Id --id $contentTypeId Write-host 'make list hidden' m365 spo list set --webUrl $siteUrl --id $list.Id --hidden true @@ -114,7 +114,7 @@ This script is a good starting point for a setup script to create site with some Write-host 'add sample column' $columnName = 'Sample Text Column' - $column = m365 spo field get --webUrl $siteUrl --listUrl "Lists/$libName" --fieldTitle $columnName --output 'json' + $column = m365 spo field get --webUrl $siteUrl --listUrl "Lists/$libName" --title $columnName --output 'json' if ($null -eq $column) { Write-host 'sample column in lib does not exist, I will create it' $columnXml = "" @@ -127,7 +127,7 @@ This script is a good starting point for a setup script to create site with some Write-host 'add sample folder' $folderName = 'sample Folder' - $folder = m365 spo folder get --webUrl $siteUrl --folderUrl "/$libName/$folderName" --output 'json' + $folder = m365 spo folder get --webUrl $siteUrl --url "/$libName/$folderName" --output 'json' if ($null -eq $folder) { Write-host 'sample folder in lib does not exist, I will create it' $folder = m365 spo folder add --webUrl $siteUrl --parentFolderUrl "/$libName" --name $folderName --output 'json' @@ -137,10 +137,10 @@ This script is a good starting point for a setup script to create site with some } Write-host 'modify list view' - $views = m365 spo list view list --webUrl $siteUrl --listTitle $libName --output 'json' + $views = m365 spo list view list --webUrl $siteUrl --listTitle "$libName" --output 'json' $views = $views | ConvertFrom-Json $viewName = $views[0].Title # all items view - m365 spo list view field add --webUrl $siteUrl --listTitle $libName --viewTitle $viewName --fieldTitle $columnName + m365 spo list view field add --webUrl $siteUrl --listTitle "$libName" --viewTitle $viewName --title $columnName Write-host 'modify site navigation' $currentNavigation = m365 spo navigation node list --webUrl $siteUrl --location QuickLaunch --output 'json' diff --git a/docs/docs/sample-scripts/spo/sync-splib-into-az-storage-container/assets/sample.json b/docs/docs/sample-scripts/spo/sync-splib-into-az-storage-container/assets/sample.json index b3eb38426e4..a57059400bb 100644 --- a/docs/docs/sample-scripts/spo/sync-splib-into-az-storage-container/assets/sample.json +++ b/docs/docs/sample-scripts/spo/sync-splib-into-az-storage-container/assets/sample.json @@ -5,7 +5,7 @@ "title": "Sync SharePoint Document Library Documents with Azure Storage Container", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/sync-splib-into-az-storage-container", "creationDateTime": "2020-06-15", - "updateDateTime": "2020-06-15", + "updateDateTime": "2023-02-28", "shortDescription": "This script shows how to download and sync documents in a SharePoint Document Library into an Azure Storage Container.", "longDescription": [ "This PowerShell script shows how to download and sync documents in a SharePoint Document Library into an Azure Storage Container using CLI for Microsoft 365 and Azure CLI commands." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/spo/sync-splib-into-az-storage-container/index.md b/docs/docs/sample-scripts/spo/sync-splib-into-az-storage-container/index.md index 9fe95104413..042e0f5be01 100644 --- a/docs/docs/sample-scripts/spo/sync-splib-into-az-storage-container/index.md +++ b/docs/docs/sample-scripts/spo/sync-splib-into-az-storage-container/index.md @@ -34,7 +34,7 @@ Prerequisites: $localFileDownloadFolderPath = $PSScriptRoot $spolSiteUrl = $spolHostName + $spolSiteRelativeUrl - $spolLibItems = m365 spo listitem list --webUrl $spolSiteUrl --title $spolDocLibTitle --fields 'FileRef,FileLeafRef' --filter "FSObjType eq 0" -o json | ConvertFrom-Json + $spolLibItems = m365 spo listitem list --webUrl $spolSiteUrl --listTitle $spolDocLibTitle --fields 'FileRef,FileLeafRef' --filter "FSObjType eq 0" -o json | ConvertFrom-Json if ($spolLibItems.Count -gt 0) { ForEach ($spolLibItem in $spolLibItems) { diff --git a/docs/docs/sample-scripts/spo/upload-local-files-and-folder/assets/sample.json b/docs/docs/sample-scripts/spo/upload-local-files-and-folder/assets/sample.json index 314c0e596bf..647ed3bf87c 100644 --- a/docs/docs/sample-scripts/spo/upload-local-files-and-folder/assets/sample.json +++ b/docs/docs/sample-scripts/spo/upload-local-files-and-folder/assets/sample.json @@ -5,7 +5,7 @@ "title": "Upload local files and folders to SharePoint Online", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/spo/upload-local-files-and-folder", "creationDateTime": "2021-04-13", - "updateDateTime": "2021-04-13", + "updateDateTime": "2023-02-28", "shortDescription": "This script shows how you can use the CLI to upload files located on a local folder to a SharePoint Online library.", "longDescription": [ "This script shows how you can use the CLI to upload files located on a local folder to a SharePoint Online library or subfolder. This is a simple script that could be used for simple data migration scenarios. The given example uploads to the given site to Shared Documents library all files and sub folders of ./import local folder" @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/teams/add-bulk-users-teams/assets/sample.json b/docs/docs/sample-scripts/teams/add-bulk-users-teams/assets/sample.json index a98673a9156..1fb6845d8ed 100644 --- a/docs/docs/sample-scripts/teams/add-bulk-users-teams/assets/sample.json +++ b/docs/docs/sample-scripts/teams/add-bulk-users-teams/assets/sample.json @@ -5,7 +5,7 @@ "title": "Bulk add members to Microsoft Teams team from CSV file", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/teams/add-bulk-users-teams", "creationDateTime": "2021-04-17", - "updateDateTime": "2021-04-17", + "updateDateTime": "2023-02-28", "shortDescription": "Adds bulk users from CSV file to MS Teams.", "longDescription": [ "Adds bulk users from CSV file to MS Teams." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/teams/add-bulk-users-teams/index.md b/docs/docs/sample-scripts/teams/add-bulk-users-teams/index.md index 4b74dabc40a..1d2bb1ee869 100644 --- a/docs/docs/sample-scripts/teams/add-bulk-users-teams/index.md +++ b/docs/docs/sample-scripts/teams/add-bulk-users-teams/index.md @@ -39,6 +39,6 @@ Inspired by: [Rakesh Pandey](https://www.flexmind.co/blog/how-to-add-bulk-users- #Add users to the Team foreach ($row in $usersCsvFile) { Write-Host "Adding $($row.UPN) to the $($row.teamName) Team" -ForegroundColor Magenta - m365 aad o365group user add --groupId $row.teamId --userName $($row.UPN) --role $($row.role) + m365 aad o365group user add --groupId $row.teamId --userName "$($row.UPN)" --role $row.role } ``` 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 76f996f2dba..17033f77db5 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 @@ -5,7 +5,7 @@ "title": "Create a Microsoft Teams team and bulk add members from CSV file", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/teams/create-team-and-add-members-and-owners", "creationDateTime": "2021-04-10", - "updateDateTime": "2021-04-10", + "updateDateTime": "2023-02-28", "shortDescription": "This sample script shows you how to create a Team and add members and owners using a CSV.", "longDescription": [ "This sample script shows you how to create a Team and add members and owners using a CSV." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/teams/create-team-and-add-members-and-owners/index.md b/docs/docs/sample-scripts/teams/create-team-and-add-members-and-owners/index.md index bad374b6ad9..6244afc287a 100644 --- a/docs/docs/sample-scripts/teams/create-team-and-add-members-and-owners/index.md +++ b/docs/docs/sample-scripts/teams/create-team-and-add-members-and-owners/index.md @@ -69,7 +69,7 @@ This sample script shows you how to create a Team and add members and owners usi $trial++ Write-Host "Waiting $waitingTime seconds before teamifying the group (trial $trial/$maxRetry)..." Start-Sleep -Seconds $waitingTime - m365 aad o365group teamify --groupId $($group.id) 2>$null + m365 aad o365group teamify --id $($group.id) 2>$null } while ($Error.Count -gt 0 -and $trial -lt $maxRetry) # if it still failed, output the error and stop diff --git a/docs/docs/sample-scripts/teams/create-team-from-group/assets/sample.json b/docs/docs/sample-scripts/teams/create-team-from-group/assets/sample.json index 6949ad6f9e6..ddfe6321141 100644 --- a/docs/docs/sample-scripts/teams/create-team-from-group/assets/sample.json +++ b/docs/docs/sample-scripts/teams/create-team-from-group/assets/sample.json @@ -5,7 +5,7 @@ "title": "Create a Microsoft Team with channels from a Microsoft 365 Group", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/teams/create-team-from-group", "creationDateTime": "2021-03-10", - "updateDateTime": "2021-03-10", + "updateDateTime": "2023-02-28", "shortDescription": "Creates a Microsoft 365 Group, associates a logo to it and some members.", "longDescription": [ "A sample script which creates a Microsoft 365 Group, associates a logo to it and some members. Afterward, it teamyfies the Group and creates two public channels." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/teams/create-team-from-group/index.md b/docs/docs/sample-scripts/teams/create-team-from-group/index.md index 18239d50fb3..152f82c9bee 100644 --- a/docs/docs/sample-scripts/teams/create-team-from-group/index.md +++ b/docs/docs/sample-scripts/teams/create-team-from-group/index.md @@ -48,7 +48,7 @@ A sample script which creates a Microsoft 365 Group, associates a logo to it and } Write-Host "Teamify the Group" - m365 aad o365group teamify --groupId $group.id + m365 aad o365group teamify --id $group.id Write-Host "Provisioning channels" $channelNames | ForEach-Object { diff --git a/docs/docs/sample-scripts/teams/deploy-teams-app/assets/sample.json b/docs/docs/sample-scripts/teams/deploy-teams-app/assets/sample.json index 47a1d7dae73..48e5839ea61 100644 --- a/docs/docs/sample-scripts/teams/deploy-teams-app/assets/sample.json +++ b/docs/docs/sample-scripts/teams/deploy-teams-app/assets/sample.json @@ -5,7 +5,7 @@ "title": "Deploy Microsoft Teams app from Azure DevOps", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/teams/deploy-teams-app", "creationDateTime": "2020-05-02", - "updateDateTime": "2020-05-02", + "updateDateTime": "2023-02-28", "shortDescription": "Installs or updates a Microsoft Teams app from an Azure DevOps pipeline.", "longDescription": [ "Installs or updates a Microsoft Teams app from an Azure DevOps pipeline. Deploys the app if it hasn't been deployed yet or updates the existing package if it's been previously deployed." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/teams/deploy-teams-app/index.md b/docs/docs/sample-scripts/teams/deploy-teams-app/index.md index 47b04ec15ac..3dbf0deb253 100644 --- a/docs/docs/sample-scripts/teams/deploy-teams-app/index.md +++ b/docs/docs/sample-scripts/teams/deploy-teams-app/index.md @@ -20,7 +20,7 @@ Installs or updates a Microsoft Teams app from an Azure DevOps pipeline. Deploys $app = $apps | Where-Object { $_.externalId -eq $env:APPID} if ($app -eq $null) { # install app - m365 teams app publish -p $(System.DefaultWorkingDirectory)/teams-app-CI/package/teams-app.zip + m365 teams app publish -p $(System.DefaultWorkingDirectory)/teams-app-CI/package/teams-app.zip } else { # update app m365 teams app update -i $app.id -p $(System.DefaultWorkingDirectory)/teams-app-CI/package/teams-app.zip diff --git a/docs/docs/sample-scripts/teams/export-all-channels-teams/assets/sample.json b/docs/docs/sample-scripts/teams/export-all-channels-teams/assets/sample.json index 4cea8770fcb..1d9ed4cbf7d 100644 --- a/docs/docs/sample-scripts/teams/export-all-channels-teams/assets/sample.json +++ b/docs/docs/sample-scripts/teams/export-all-channels-teams/assets/sample.json @@ -5,7 +5,7 @@ "title": "Export all channels in Microsoft Teams teams in the tenant", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/teams/export-all-channels-teams", "creationDateTime": "2021-11-02", - "updateDateTime": "2021-11-02", + "updateDateTime": "2023-02-28", "shortDescription": "Export all the channels from Microsoft Team in a CSV.", "longDescription": [ "Export all the channels from Microsoft Team in a CSV." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/teams/export-teams-conversations/assets/sample.json b/docs/docs/sample-scripts/teams/export-teams-conversations/assets/sample.json index 862a685fe28..1e8ab59b563 100644 --- a/docs/docs/sample-scripts/teams/export-teams-conversations/assets/sample.json +++ b/docs/docs/sample-scripts/teams/export-teams-conversations/assets/sample.json @@ -5,7 +5,7 @@ "title": "Export conversations from Microsoft Teams Channels", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/teams/export-teams-conversations", "creationDateTime": "2021-02-19", - "updateDateTime": "2021-02-19", + "updateDateTime": "2023-02-28", "shortDescription": "This script exports the conversations from Microsoft Teams Channels.", "longDescription": [ "This script uses CLI for Microsoft 365 to export the conversations from Microsoft Teams Channels. You don't need to be a tenant admin to export conversations but you still can only export conversations of Teams of which you are member." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/teams/get-all-teams-specific-user-is-part-of/assets/sample.json b/docs/docs/sample-scripts/teams/get-all-teams-specific-user-is-part-of/assets/sample.json index 10f96741504..4a6b1b98362 100644 --- a/docs/docs/sample-scripts/teams/get-all-teams-specific-user-is-part-of/assets/sample.json +++ b/docs/docs/sample-scripts/teams/get-all-teams-specific-user-is-part-of/assets/sample.json @@ -5,7 +5,7 @@ "title": "Get all the Teams a specific user is part of", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/teams/get-all-teams-specific-user-is-part-of", "creationDateTime": "2021-09-14", - "updateDateTime": "2021-09-14", + "updateDateTime": "2023-02-28", "shortDescription": "Gets all the Teams a specific user is part of.", "longDescription": [ "Gets all the Teams a specific user is part of." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/teams/govern-orphan-teams/assets/sample.json b/docs/docs/sample-scripts/teams/govern-orphan-teams/assets/sample.json index 56ba98088b7..e3321dbe4f1 100644 --- a/docs/docs/sample-scripts/teams/govern-orphan-teams/assets/sample.json +++ b/docs/docs/sample-scripts/teams/govern-orphan-teams/assets/sample.json @@ -5,7 +5,7 @@ "title": "Govern orphaned Microsoft Teams", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/teams/govern-orphan-teams", "creationDateTime": "2020-05-02", - "updateDateTime": "2020-05-02", + "updateDateTime": "2023-02-28", "shortDescription": "This script finds teams that no longer have an owner.", "longDescription": [ "Every team needs an owner, at least one. Common best practice is that you should have at least two users in owner role. Teams is not allowing the last owner to leave the team, but there might occasions when last owner is removed, example when people are leaving the organization and account gets deleted. This script finds those teams that no longer have an owner." @@ -23,7 +23,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/teams/install-personal-app/assets/sample.json b/docs/docs/sample-scripts/teams/install-personal-app/assets/sample.json index f3c5dbdb8cd..65b078d58e0 100644 --- a/docs/docs/sample-scripts/teams/install-personal-app/assets/sample.json +++ b/docs/docs/sample-scripts/teams/install-personal-app/assets/sample.json @@ -5,7 +5,7 @@ "title": "Deploy Microsoft Teams personal app and add it to users", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/teams/install-personal-app", "creationDateTime": "2020-10-18", - "updateDateTime": "2020-10-18", + "updateDateTime": "2023-02-28", "shortDescription": "Installs or updates a Microsoft Teams app.", "longDescription": [ "Installs or updates a Microsoft Teams app from a provided zipped manifest and then, based on the parameters, add it to the current users and / or to a set of users." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/teams/install-personal-app/index.md b/docs/docs/sample-scripts/teams/install-personal-app/index.md index 97a54ff9c31..6cfdaacc68d 100644 --- a/docs/docs/sample-scripts/teams/install-personal-app/index.md +++ b/docs/docs/sample-scripts/teams/install-personal-app/index.md @@ -87,8 +87,7 @@ Installs or updates a Microsoft Teams app from a provided zipped manifest and th if ($CurrentUser) { # Getting the reference of the currently connected user - $connectedAs = m365 status -o json | ConvertFrom-Json - $user = m365 aad user get --userName $connectedAs.connectedAs -o json | ConvertFrom-Json + $user = m365 aad user get --id "@meId" -o json | ConvertFrom-Json if ($user) { $Users += $user.userPrincipalName @@ -106,7 +105,7 @@ Installs or updates a Microsoft Teams app from a provided zipped manifest and th if ($userApp.Length -eq 0) { # Adding the app to the personal apps of the specified user - m365 teams user app add --appId $app.id --userId $user.id + m365 teams user app add --id $app.id --userId $user.id Write-Host "The App '$($app.displayName)' with ID '$($app.id)' was deployed to user '$($user.userPrincipalName)'." } diff --git a/docs/docs/sample-scripts/teams/list-all-tabs-teams/assets/sample.json b/docs/docs/sample-scripts/teams/list-all-tabs-teams/assets/sample.json index c260b33879a..a0f791ece60 100644 --- a/docs/docs/sample-scripts/teams/list-all-tabs-teams/assets/sample.json +++ b/docs/docs/sample-scripts/teams/list-all-tabs-teams/assets/sample.json @@ -5,7 +5,7 @@ "title": "List all tabs in Microsoft Teams teams in the tenant", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/teams/list-all-tabs-teams", "creationDateTime": "2021-02-27", - "updateDateTime": "2021-02-27", + "updateDateTime": "2023-02-28", "shortDescription": "List all tabs in Microsoft Teams teams in the tenant and exports the results in a CSV.", "longDescription": [ "List all tabs in Microsoft Teams teams in the tenant and exports the results in a CSV." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/teams/list-all-teammembers-teams/assets/sample.json b/docs/docs/sample-scripts/teams/list-all-teammembers-teams/assets/sample.json index 9f797adb10c..61f618963ee 100644 --- a/docs/docs/sample-scripts/teams/list-all-teammembers-teams/assets/sample.json +++ b/docs/docs/sample-scripts/teams/list-all-teammembers-teams/assets/sample.json @@ -5,7 +5,7 @@ "title": "List all team members in Microsoft Teams teams in the tenant", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/teams/list-all-teammembers-teams", "creationDateTime": "2021-09-02", - "updateDateTime": "2021-09-02", + "updateDateTime": "2023-02-28", "shortDescription": "List all team members in Microsoft Teams teams in the tenant and exports the results in a CSV.", "longDescription": [ "List all team members in Microsoft Teams teams in the tenant and exports the results in a CSV." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/teams/list-teams-app-usage/assets/sample.json b/docs/docs/sample-scripts/teams/list-teams-app-usage/assets/sample.json index 2f523b68a56..efc2d938f74 100644 --- a/docs/docs/sample-scripts/teams/list-teams-app-usage/assets/sample.json +++ b/docs/docs/sample-scripts/teams/list-teams-app-usage/assets/sample.json @@ -5,7 +5,7 @@ "title": "List app usage in Microsoft Teams", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/teams/list-teams-app-usage", "creationDateTime": "2020-07-17", - "updateDateTime": "2020-07-17", + "updateDateTime": "2023-02-28", "shortDescription": "Iterates through all the teams in your tenant and lists all apps in each team.", "longDescription": [ "A sample script which iterates through all the teams in your tenant and lists all apps in each team. This script will be handy if you want to generate a report of available apps in Teams across your tenant." @@ -22,7 +22,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/teams/list-teams-app-usage/index.md b/docs/docs/sample-scripts/teams/list-teams-app-usage/index.md index 7b321ecad05..ee38e1f378a 100644 --- a/docs/docs/sample-scripts/teams/list-teams-app-usage/index.md +++ b/docs/docs/sample-scripts/teams/list-teams-app-usage/index.md @@ -24,7 +24,7 @@ A sample script which iterates through all the teams in your tenant and lists al } foreach ($team in $availableTeams) { - $apps = m365 teams app list -i $team.Id -a + $apps = m365 teams team app list -i $team.Id Write-Output "All apps in team are given below: $($team.displayName) $($team.id)" Write-Output $apps } @@ -50,7 +50,7 @@ A sample script which iterates through all the teams in your tenant and lists al fi for team in $(echo $availableTeams | jq -c '.[]'); do - apps=$(m365 teams app list -i $(echo $team | jq ''.id) -a) + apps=$(m365 teams team app list -i $(echo $team | jq ''.id) -a) echo "All apps in team are given below: " $(echo $team | jq ''.displayName) " " $(echo $team | jq ''.id) echo $apps done diff --git a/docs/docs/sample-scripts/teams/list-teams-channels-tabs-for-tenant/assets/sample.json b/docs/docs/sample-scripts/teams/list-teams-channels-tabs-for-tenant/assets/sample.json index 3f70478a1e7..d05f79f3a44 100644 --- a/docs/docs/sample-scripts/teams/list-teams-channels-tabs-for-tenant/assets/sample.json +++ b/docs/docs/sample-scripts/teams/list-teams-channels-tabs-for-tenant/assets/sample.json @@ -5,7 +5,7 @@ "title": "List Microsoft Teams teams, channels, and tabs in the tenant", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/teams/list-teams-channels-tabs-for-tenant", "creationDateTime": "2021-10-16", - "updateDateTime": "2021-10-16", + "updateDateTime": "2023-02-28", "shortDescription": "This script allows you to list all teams, channels and tabs.", "longDescription": [ "This script allows you to list all teams, channels and tabs." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/teams/list-teams-owners-and-members/assets/sample.json b/docs/docs/sample-scripts/teams/list-teams-owners-and-members/assets/sample.json index e1f1d1ae256..07c327b62d8 100644 --- a/docs/docs/sample-scripts/teams/list-teams-owners-and-members/assets/sample.json +++ b/docs/docs/sample-scripts/teams/list-teams-owners-and-members/assets/sample.json @@ -5,7 +5,7 @@ "title": "CLI - List all Microsoft Teams team's Owners and Members", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/teams/list-teams-owners-and-members", "creationDateTime": "2021-03-23", - "updateDateTime": "2021-03-23", + "updateDateTime": "2023-02-28", "shortDescription": "This script allows you to list all Teams team's owners and members and export them into a CSV file.", "longDescription": [ "This script allows you to list all Teams team's owners and members and export them into a CSV file." @@ -20,7 +20,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/teams/recognize-most-active-users-specific-team/assets/sample.json b/docs/docs/sample-scripts/teams/recognize-most-active-users-specific-team/assets/sample.json index a5b0f97a379..21307d1df04 100644 --- a/docs/docs/sample-scripts/teams/recognize-most-active-users-specific-team/assets/sample.json +++ b/docs/docs/sample-scripts/teams/recognize-most-active-users-specific-team/assets/sample.json @@ -5,7 +5,7 @@ "title": "Recognize most active users for a specific Team", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/teams/recognize-most-active-users-specific-team", "creationDateTime": "2021-08-27", - "updateDateTime": "2021-08-27", + "updateDateTime": "2023-02-28", "shortDescription": "Retrieves all activities for a specific Microsoft Teams Team and shares the top 3 contributors.", "longDescription": [ "Retrieves all activities for a specific Microsoft Teams Team and shares the top 3 contributors based on their score as an adaptive card to the specified webhook url." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/teams/recognize-most-active-users-specific-team/index.md b/docs/docs/sample-scripts/teams/recognize-most-active-users-specific-team/index.md index 89e69f03cef..cd9c8595afb 100644 --- a/docs/docs/sample-scripts/teams/recognize-most-active-users-specific-team/index.md +++ b/docs/docs/sample-scripts/teams/recognize-most-active-users-specific-team/index.md @@ -85,7 +85,7 @@ Retrieves all activities for a specific Microsoft Teams Team and shares the top #Score per user foreach ($teamsUser in $resultsGrouped) { - $user = m365 aad user get --id $teamsUser.Name --output json | ConvertFrom-Json + $user = m365 aad user get --id $teamsUser.UserId --output json | ConvertFrom-Json # Count points # Each post is two points, 1 extra point awarded for each Post with Subject diff --git a/docs/docs/sample-scripts/teams/remove-personal-app/assets/sample.json b/docs/docs/sample-scripts/teams/remove-personal-app/assets/sample.json index 3225ccd2b29..8d065684340 100644 --- a/docs/docs/sample-scripts/teams/remove-personal-app/assets/sample.json +++ b/docs/docs/sample-scripts/teams/remove-personal-app/assets/sample.json @@ -5,7 +5,7 @@ "title": "Removes Microsoft Teams personal app from users and Microsoft Teams app catalog", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/teams/remove-personal-app", "creationDateTime": "2020-10-27", - "updateDateTime": "2020-10-27", + "updateDateTime": "2023-02-28", "shortDescription": "Uninstalls an app from the specified users and / or unpublish it from the Microsoft Teams app catalog based on the App Id.", "longDescription": [ "Uninstalls an app from the specified users and / or unpublish it from the Microsoft Teams app catalog based on the App Id available in the `manifest.json` of the Teams app." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/teams/remove-personal-app/index.md b/docs/docs/sample-scripts/teams/remove-personal-app/index.md index 7b1a0956427..07976b1e914 100644 --- a/docs/docs/sample-scripts/teams/remove-personal-app/index.md +++ b/docs/docs/sample-scripts/teams/remove-personal-app/index.md @@ -51,8 +51,7 @@ Uninstalls an app from the specified users and / or unpublish it from the Micros if ($Uninstall) { if ($CurrentUser) { # Getting the reference of the currently connected user - $connectedAs = m365 status -o json | ConvertFrom-Json - $user = m365 aad user get --userName $connectedAs.connectedAs -o json | ConvertFrom-Json + $user = m365 aad user get --id "@meId" -o json | ConvertFrom-Json if ($user) { $Users += $user.userPrincipalName diff --git a/docs/docs/sample-scripts/teams/remove-wikitab-teams/assets/sample.json b/docs/docs/sample-scripts/teams/remove-wikitab-teams/assets/sample.json index f1979c21b3f..46a779cf0c7 100644 --- a/docs/docs/sample-scripts/teams/remove-wikitab-teams/assets/sample.json +++ b/docs/docs/sample-scripts/teams/remove-wikitab-teams/assets/sample.json @@ -5,7 +5,7 @@ "title": "Remove Wiki tab in a Microsoft Teams channel", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/teams/remove-wikitab-teams", "creationDateTime": "2020-08-23", - "updateDateTime": "2020-08-23", + "updateDateTime": "2023-02-28", "shortDescription": "Removes the wiki tab of a Microsoft Teams Team's channel.", "longDescription": [ "Removes the wiki tab of a Microsoft Teams Team's channel." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/teams/remove-wikitab-teams/index.md b/docs/docs/sample-scripts/teams/remove-wikitab-teams/index.md index 0dc4d96313a..e698f9bb503 100644 --- a/docs/docs/sample-scripts/teams/remove-wikitab-teams/index.md +++ b/docs/docs/sample-scripts/teams/remove-wikitab-teams/index.md @@ -26,7 +26,7 @@ Removes the wiki tab of a Microsoft Teams Team's channel. if ($null -eq $tabs) { Write-Error "A Wiki tab was not found in the channel" } else { write-host "Removing wiki tab for the channel.." -ForegroundColor Green - m365 teams tab remove --teamId $groups[0].id --channelId $channels[0].id --tabId $tabs[0].id --confirm + m365 teams tab remove --teamId $groups[0].id --channelId $channels[0].id --id $tabs[0].id --confirm write-host " ...Done" -ForegroundColor Green } } diff --git a/docs/docs/sample-scripts/teams/share-socialchampions/assets/sample.json b/docs/docs/sample-scripts/teams/share-socialchampions/assets/sample.json index 379f365eaaf..4d6f2f5ca3d 100644 --- a/docs/docs/sample-scripts/teams/share-socialchampions/assets/sample.json +++ b/docs/docs/sample-scripts/teams/share-socialchampions/assets/sample.json @@ -5,7 +5,7 @@ "title": "Share social champions to Teams", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/teams/share-socialchampions", "creationDateTime": "2021-08-12", - "updateDateTime": "2021-08-12", + "updateDateTime": "2023-02-28", "shortDescription": "Retrieves activities for SharePoint Online, Teams and Yammer and shares the top 3 contributors for each category as an adaptive card to the specified webhook url.", "longDescription": [ "Retrieves activities for SharePoint Online, Teams and Yammer and shares the top 3 contributors for each category as an adaptive card to the specified webhook url." @@ -23,7 +23,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/tenant/tenant-monitor-notify-healthstatus/assets/sample.json b/docs/docs/sample-scripts/tenant/tenant-monitor-notify-healthstatus/assets/sample.json index 4e4868408c7..c14f885c77a 100644 --- a/docs/docs/sample-scripts/tenant/tenant-monitor-notify-healthstatus/assets/sample.json +++ b/docs/docs/sample-scripts/tenant/tenant-monitor-notify-healthstatus/assets/sample.json @@ -5,7 +5,7 @@ "title": "Monitor and notify Microsoft 365 health status", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/tenant/tenant-monitor-notify-healthstatus", "creationDateTime": "2021-03-25", - "updateDateTime": "2021-03-25", + "updateDateTime": "2023-02-28", "shortDescription": "This is a script which monitors the health status of your Microsoft 365 tenant and notifies if something is not normal.", "longDescription": [ "This is a script which monitors the health status of your Microsoft 365 tenant and notifies if something is not normal. Script creates a SharePoint List and will add the outage content to that. It will also send an email notification to the configured user." @@ -20,7 +20,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [ diff --git a/docs/docs/sample-scripts/todo/cleanup-completed-todos/assets/sample.json b/docs/docs/sample-scripts/todo/cleanup-completed-todos/assets/sample.json index 59f27112955..cebaf52e7df 100644 --- a/docs/docs/sample-scripts/todo/cleanup-completed-todos/assets/sample.json +++ b/docs/docs/sample-scripts/todo/cleanup-completed-todos/assets/sample.json @@ -5,7 +5,7 @@ "title": "Cleanup completed Microsoft To Do tasks", "url": "https://pnp.github.io/cli-microsoft365/sample-scripts/todo/cleanup-completed-todos", "creationDateTime": "2021-04-09", - "updateDateTime": "2021-04-09", + "updateDateTime": "2023-02-28", "shortDescription": "This script iterates across all of the task lists and removes the tasks that have been marked as complete.", "longDescription": [ "Microsoft To Do is my task management tool of choice, I use it for tracking everything I do, which means I generate and complete a lot of tasks during a working week. This script iterates across all of the task lists and removes the tasks that have been marked as complete." @@ -21,7 +21,7 @@ "metadata": [ { "key": "CLI-FOR-MICROSOFT365", - "value": "5.3.0" + "value": "6.3.0" } ], "thumbnails": [