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.Sites", "Microsoft.Graph.Files" | |
function Get-SiteDriveItem | |
{ | |
[CmdletBinding(DefaultParameterSetName="root")] | |
param | |
( | |
[Parameter(Mandatory=$true,ParameterSetName="root")] | |
[Parameter(Mandatory=$true,ParameterSetName="item")] | |
[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
#requires -modules "PnP.PowerShell" | |
function Test-ListItemPath | |
{ | |
[CmdletBinding()] | |
param | |
( | |
[parameter(mandatory=$true)] | |
[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
function Test-CodeSign | |
{ | |
write-Host "HELLO WORLD" | |
} | |
<# | |
$params = @{ | |
Subject = "CN=PowerShell Script Code Signing" | |
Type = "CodeSigningCert" |
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-ItemAnalytics | |
{ | |
[CmdletBinding()] | |
param | |
( | |
[parameter(mandatory=$true)] | |
[string] | |
$ItemDriveUrl, |
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
$ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop | |
Import-Module -Name "Microsoft.Graph.Authentication" | |
Import-Module -Name "Microsoft.Graph.Users" | |
Import-Module -Name "ExchangeOnlineManagement" | |
Import-Module -Name "PnP.PowerShell" | |
class MailboxRequest | |
{ | |
[int] |
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
function New-Password | |
{ | |
[CmdletBinding()] | |
param | |
( | |
[Parameter(Mandatory=$true)] | |
[ValidateRange(2,128)] | |
[int] | |
$Length, |
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
function ConvertTo-Base64UrlEncodedString | |
{ | |
[CmdletBinding()] | |
param | |
( | |
[Parameter(Mandatory=$true)] | |
[byte[]] | |
$Bytes | |
) |
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 -version 7 | |
#requires -modules "Microsoft.Graph.Authentication", "Microsoft.Graph.Beta.Identity.DirectoryManagement" | |
$params = @{ | |
Values = @( | |
@{ | |
Name = "EnableMIPLabels" | |
Value = "True" | |
} | |
) |
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:O365_TENANT-admin.sharepoint.com" ` | |
-ClientId $env:O365_CLIENTID ` | |
-Thumbprint $env:O365_THUMBPRINT ` | |
-Tenant $env:O365_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 -modules "PnP.PowerShell" | |
function ConvertTo-ContainerStatusString | |
{ | |
param | |
( | |
[Parameter(Mandatory=$true)] | |
[int] | |
$ContainerStatus | |
) |
NewerOlder