This is useful in combination with the SharePoint - Send an HTTP request to SharePoint
action.
This could be expanded to include other combinations of header values, but this is what I've used so far:
param( | |
[Parameter(Mandatory = $true)] | |
[string]$SourceEnv, | |
[Parameter(Mandatory = $true)] | |
[string]$DestinationEnv | |
) | |
$ErrorActionPreference = "Stop" | |
# Note: these values could be loaded from elsewhere, e.g. CSV/XML (or dynamically if you want to get fancy) |
param( | |
[Parameter(Mandatory = $true)] | |
[string]$ListTitle, | |
[Parameter(Mandatory = $true)] | |
[bool]$AllowDeletion | |
) | |
$list = Get-PnPList -Identity $ListTitle | |
$list.AllowDeletion = $AllowDeletion | |
$list.Update() |
{ | |
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"$connections": { | |
"defaultValue": {}, | |
"type": "Object" | |
}, | |
"$authentication": { | |
"defaultValue": {}, |
# This script creates a set of modern team sites without an associated Group from a CSV file, | |
# using the New-SPOModernTeamSite.ps1 script. | |
# The script must be run from the SharePoint Online Management Shell and | |
# you must connect to your SharePoint tenant admin URL with Connect-SPOService before running it. | |
param( | |
# Path: Path/File name of a CSV file that contains populated Title, Url, Owner and AdditionalOwner columns | |
[Parameter(Mandatory = $true)] | |
[string]$Path |
$tenantUrl = "https://yourtenant.sharepoint.com" | |
$credentials = Get-Credential | |
Connect-PnPOnline -Url $tenantUrl -Credentials $credentials | |
$sites = Get-PnPSiteSearchQueryResults -All | |
Disconnect-PnPOnline | |
$script:wfStatuses = @() | |
function Get-WebWorkflowData($web) { |
Remove-Item d:\home\site\wwwroot\* -recurse |