This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#requires -modules "PnP.PowerShell" | |
Connect-PnPOnline ` | |
-Url "https://$env:O365_TENANT-admin.sharepoint.com" ` | |
-ClientId $env:O365_CLIENTID ` | |
-Thumbprint $env:O365_THUMBPRINT ` | |
-Tenant $env:O365_TENANTID ` | |
-ErrorAction Stop | |
$unifiedGroups = Get-PnPMicrosoft365Group |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#requires -module "PnP.PowerShell" | |
# Required permissions: | |
# Microsoft Graph API : One of Directory.Read.All, Directory.ReadWrite.All, Group.Read.All, Group.ReadWrite.All, GroupMember.Read.All, GroupMember.ReadWrite.All | |
# SharePoint Online : Sites.FullControl.All | |
Connect-PnPOnline ` | |
-Url "https://$env:O365_TENANT-admin.sharepoint.com" ` | |
-ClientId $env:O365_CLIENTID ` | |
-Thumbprint $env:O365_THUMBPRINT ` | |
-Tenant $env:O365_TENANTID ` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#requires -modules "Microsoft.Xrm.Data.Powershell" | |
$ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop | |
$credential = [PSCredential]::new( 'powerplatfromadmin@contoso.com', ( '<password>' | ConvertTo-SecureString -AsPlainText -Force) ) | |
$environments = Get-CrmOrganizations -OnLineType Office365 -Credential $credential | |
$timestamp = Get-Date -Format FileDateTime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Connect-SPOService -Url "https://contoso-admin.sharepoint.com" | |
$counter = 1 | |
$token = $null | |
$containers = do | |
{ | |
Write-Host "[$(Get-Date)] - Fetching Containers page: $counter" | |
$containers = if( -not $token ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#requires -modules "PnP.PowerShell" | |
# permission requirements | |
# - Microsoft Graph > Application > one of Directory.Read.All, Directory.ReadWrite.All, Group.Read.All, Group.ReadWrite.All, GroupMember.Read.All, GroupMember.ReadWrite.All | |
# - SharePoint > Application > Sites.FullControl.All | |
Connect-PnPOnline ` | |
-Url "https://$env:O365_TENANT-admin.sharepoint.com" ` | |
-ClientId $env:O365_CLIENTID ` | |
-Thumbprint $env:O365_THUMBPRINT ` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#requies -modules "PnP.PowerShell" | |
function Get-FolderChildCount | |
{ | |
[CmdletBinding()] | |
param | |
( | |
[Parameter(Mandatory=$true)] | |
[Microsoft.SharePoint.Client.List] | |
$List, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#requires -modules "PnP.PowerShell" | |
# permissions required SharePoint > Application > Sites.FullControl.All | |
Connect-PnPOnline ` | |
-Url "https://$env:O365_TENANT-admin.sharepoint.com" ` | |
-ClientId $env:O365_CLIENTID ` | |
-Thumbprint $env:O365_THUMBPRINT ` | |
-Tenant $env:O365_TENANT ` | |
-ErrorAction Stop |
NewerOlder