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
[CmdletBinding(DefaultParameterSetName = "Interactive")] | |
param ( | |
[Parameter(Mandatory, ParameterSetName = "UserPassword")] | |
[Parameter(Mandatory, ParameterSetName = "Interactive")] | |
[Parameter(Mandatory, ParameterSetName = "AppIDCertificate")] | |
[string] $Url, | |
[Parameter(Mandatory, ParameterSetName = "UserPassword")] | |
[pscredential] $Credentials, |
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=$true)] | |
[string]$BuildOutput, | |
[Parameter(Mandatory=$true)] | |
[string]$ExeFile, | |
[Parameter(Mandatory=$true)] | |
[string]$WebApp, | |
[Parameter(Mandatory=$true)] | |
[string]$ResourceGroup, | |
[Parameter(Mandatory=$true)] |
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 ( | |
[string]$Url, | |
[string]$Listname, | |
[int]$ItemId, | |
$Credentials, | |
[string]$DownloadFolder | |
) | |
if ($Credentials -eq $null) | |
{ |
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 ( | |
$InFile, | |
$OutFile, | |
$MailDomain, | |
$ReplaceWith | |
) | |
$regexFind = "\b[A-Z0-9._%+-]+@$MailDomain\b" | |
$inputContent = Get-Content $InFile |
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
$date = Get-Date | |
$zulu = $date.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") |
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 ( | |
[string]$Url, | |
[string]$List, | |
[int]$NumberOfItems, | |
[int]$StartAt = 1, | |
[int]$CommitAfter = 100, | |
$Credentials | |
) | |
if ($Credentials -eq $null) |
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
$pnpModulePath = (Get-Module -Name SharePointPnPPowerShellOnline).Path | |
Add-Type -Path "$pnpModulePath\Microsoft.SharePoint.Client.dll" | |
Add-Type -Path "$pnpModulePath\Microsoft.SharePoint.Client.Runtime.dll" | |
Add-Type -Path "$pnpModulePath\Microsoft.SharePoint.Client.WorkflowServices.dll" |
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=$true)] | |
[string]$TranscriptPath | |
) | |
$scriptName = $MyInvocation.MyCommand.Name.Substring(0, $MyInvocation.MyCommand.Name.IndexOf(".")) | |
$transcriptExtension = Get-Date -Format yyyyMMdd-HHmmss | |
$transcriptFile = "$TranscriptPath\$scriptName" + "_Transcript_$transcriptExtension.txt" |
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 ( | |
[string]$Url, | |
$Credentials | |
) | |
function LoopWebs | |
{ | |
param ( | |
$WebCollection | |
) |
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
Connect-PnPOnline -Url {your_site_url} | |
$web = Get-PnPWeb | |
$list = $web.Lists.EnsureSiteAssetsLibrary() | |
(Get-PnPContext).Load($list) | |
Invoke-PnPQuery |
NewerOlder