This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$PolicyNameID = "Enter your Policy Name ID here" | |
$ApplicationId = "xxxxx" | |
$ClientSecret = "xxxxx" | |
$TenantId = "xxxxx" | |
# Connect to PowerApps and Microsoft Graph | |
# Ensure you have the required modules installed: Microsoft.PowerApps.Administration.PowerShell and Microsoft.Graph | |
Add-PowerAppsAccount -ApplicationId $ApplicationId -ClientSecret $ClientSecret -TenantID $TenantId |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -Modules Microsoft.Graph | |
# Install the module. (You need admin on the machine.) | |
# Install-Module Microsoft.Graph | |
# Set Static Variables | |
$TenantID="Enter your tenant ID here" | |
$AutomationAccountDisplayname ="Enter your Automation Account Display Name here" | |
# Define dynamic variables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set environment variables or edit the corresponding values here. | |
$endpoint = "XXXXXXXXXXXXXXXXX" | |
$api_key = "XXXXXXXXXXXXXXXXX" | |
$api_version = 'preview' | |
$headers = @{ | |
"api-key" = $api_key | |
"Content-Type" = "application/json" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param | |
( | |
[Parameter(Mandatory=$false)] | |
[object] $WebhookData | |
) | |
$threshold = 5 | |
# Jira authentication | |
$Text = "[email protected]:$(Get-AutomationVariable -Name 'JIRA')" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script will get all VMs with the guest OS "Windows Server" and send the details to a webhook URL in JSON format. | |
$VMs = get-vm | Where-Object{$_.guest -match "Windows Server"} |Select-Object -Property Name,Guest,CreateDate | |
# Convert the VM details to JSON format | |
$body = $VMs | ConvertTo-Json | |
$webhookURI = "Enter your webhook URL here" | |
# Send the JSON data to the webhook URL for the Azure Automation runbook |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Alexander Holmeset | |
# Version 1.0 | |
# This script is designed to extract sensitivity labels from files in SharePoint document libraries in one tenant and apply them to the same files in another tenant. | |
# It uses Microsoft Graph API to interact with SharePoint and sensitivity labels. | |
# The script connects to two different tenants using app registrations and retrieves files from SharePoint document libraries. | |
# App regstiration permissions source: Directory.Read.All, Files.Read.All, Sites.Read.All and InformationProtectionPolicy.Read.All | |
# App regstiration permissions target: Directory.Read.All, Files.ReadWrite.All, Sites.Read.All and InformationProtectionPolicy.Read.All | |
# Parameters for the app registration source tenant | |
$ClientId = "xxxxxxx" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Threshold for the last activity | |
$threshold = 50 | |
$CopilotLicenseGroupID = "xxxxx-xxx-xxxx-xxx" | |
# Connect to Microsoft Graph using the Tenant ID and Client Secret Credential | |
Connect-MgGraph -identity |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -Modules Microsoft.Graph | |
# Install the module. (You need admin on the machine.) | |
# Install-Module Microsoft.Graph | |
# Set Static Variables | |
$TenantID="Enter your Tenant ID" | |
$LogicAppDisplayname = "CopilotActivityCheck" | |
# Define dynamic variables | |
$ServicePrincipalFilter = "displayName eq '$($LogicAppDisplayname)'" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -Modules Microsoft.Graph | |
# Install the module. (You need admin on the machine.) | |
# Install-Module Microsoft.Graph | |
# Set Static Variables | |
$TenantID="Enter your Tenant ID" | |
$LogicAppDisplayname = "NewCopilotUserEmail" | |
# Define dynamic variables | |
$ServicePrincipalFilter = "displayName eq '$($LogicAppDisplayname)'" |
NewerOlder