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" | |
function Get-TenantInformation | |
{ | |
[cmdletbinding()] | |
param | |
( | |
) | |
$response = Invoke-PnPSPRestMethod -Method "Get" -Url "/_api/TenantInformationCollection" |
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.Graph.Authentication", "Microsoft.Graph.Teams", "Microsoft.Graph.Users" | |
# context requires Microsoft Graph application permissions: User.Read.All + AppCatalog.Read.All | |
Connect-MgGraph ` | |
-ClientId $env:CDX_CLIENTID ` | |
-CertificateThumbprint $env:CDX_THUMBPRINT ` | |
-TenantId $env:CDX_TENANTID ` | |
-ErrorAction Stop | |
$skuId = "06ebc4ee-1bb5-47dd-8120-11324bc54e06" # Microsoft 365 E5 |
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
Import-Module -Name PSSQLite | |
function Initialize-Database | |
{ | |
[CmdletBinding()] | |
param | |
( | |
[parameter(mandatory=$true)] | |
[string] | |
$Path, |
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 @{ ModuleName="PnP.PowerShell"; ModuleVersion="2.4.0" } | |
function New-Recording | |
{ | |
[CmdletBinding()] | |
param | |
( | |
[parameter(mandatory=$true)] | |
[AllowEmptyString()] | |
[string] |
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-MicrosoftTeams | |
$rows = Import-Csv -Path "C:\_temp\manageAppsPage_manageAppsList_3-31-2025.csv" | |
foreach( $row in $rows ) | |
{ | |
if( $row.'Supported on' -notmatch "Copilot" ) | |
{ | |
continue | |
} |
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.Graph.Authentication" | |
function Get-TeamsMeetingId | |
{ | |
[CmdletBinding()] | |
param | |
( | |
[Parameter(Mandatory=$true)] | |
[Guid] | |
$UserObjectId, |
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.Graph.Authentication", "Microsoft.Graph.Users" | |
function Get-ManagerHierarchy | |
{ | |
[CmdletBinding()] | |
param | |
( | |
[Parameter(Mandatory = $true)] | |
[string] | |
$Identity |
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" | |
# requires SharePoint > Application > Sites.FullControl.All | |
Connect-PnPOnline -Url "https://$env:CDX_TENANT-admin.sharepoint.com" ` | |
-ClientId $env:CDX_CLIENTID ` | |
-Thumbprint $env:CDX_THUMBPRINT ` | |
-Tenant $env:CDX_TENANTID ` | |
-ErrorAction Stop |
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 Microsoft Forms > Application > Forms.Read.All | |
Connect-PnPOnline -Url "https://$env:CDX_TENANT-admin.sharepoint.com" ` | |
-ClientId $env:CDX_CLIENTID ` | |
-Thumbprint $env:CDX_THUMBPRINT ` | |
-Tenant $env:CDX_TENANTID ` | |
-ErrorAction Stop | |
$userObjectId = "a8734c7e-a19b-41c6-b384-........" | |
$formId = "pVQHEDt5kk....." |
NewerOlder