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
$Username ="azure_*********@azure.com" | |
$Password = ConvertTo-SecureString "********" -AsPlainText -Force | |
$credential = New-Object System.Management.Automation.PSCredential $Username, $Password | |
$SMTPServer = "smtp.sendgrid.net" | |
$EmailFrom = "admin@acme.com" | |
$EmailTo = "user@acme.com" | |
$Subject = "SendGrid test" | |
$Body = "SendGrid testing successful" | |
Send-MailMessage -smtpServer $SMTPServer -Credential $credential -Usessl -Port 587 -from $EmailFrom -to $EmailTo -subject $Subject -Body $Body |
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
public static string ToCsv<T>(string separator, IEnumerable<T> objectlist) | |
{ | |
Type t = typeof(T); | |
FieldInfo[] fields = t.GetFields(); | |
string header = String.Join(separator, fields.Select(f => f.Name).ToArray()); | |
StringBuilder csvdata = new StringBuilder(); | |
csvdata.AppendLine(header); |
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
#!/usr/local/bin/pwsh -File | |
<# | |
.SYNOPSIS | |
The Get-GuestUsers.ps1 script inventories Guest accounts and Sign In Activity from Azure AD into a SharePoint Online List. | |
.DESCRIPTION | |
The Get-GuestUsers.ps1 script inventories Guest accounts from Active Directory using the CLI for M365 | |
and PowerShell's Invoke-RestMethod to query Microsoft Graph for a all Guest accounts and signInActivity. | |
The script can also gather Teams that the Guest account is a member of by inclusing the -InlcudeTeams switch. |
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
# =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= | |
# Script: TW-CreateBlankClientExtranetSite.ps1 | |
# | |
# Author: Pete Skelly | |
# Twitter: ThreeWillLabs | |
# http://www.threewill.com | |
# | |
# Description: Add a blank site collection to an Office 365 tenant in SharePoint Online | |
# | |
# WARNING: Script provided AS IS with no warranty. Your mileage will vary. Use |
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
#!/usr/local/bin/pwsh -File | |
$DIR = Split-Path $script:MyInvocation.MyCommand.Path | |
$TMP_DIR = "./tmp" | |
$FLOWSCSV_SUFFIX = "-flows.csv" | |
$ALLFLOWSCSV = "allflows.csv" | |
function CleanDistFolder { | |
# Remove the dist folder as needed | |
if (Test-Path -Path "$TMP_DIR" -PathType Container) { |
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
APP_NAME="" | |
RESOURCE_GROUP="" | |
CERT_FILE="" | |
CERT_PASSWORD="" | |
thumbprint=$(az webapp config ssl upload \ | |
--name $APP_NAME \ | |
--resource-group $RESOURCE_GROUP \ | |
--certificate-file $CERT_FILE \ |
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
# Create a dictionary based on the $owner.id property from the owners array parameter | |
($owners | map(select(.id != null)) | map( {(.id): {displayName, userPrincipalName, mail}}) | add) as $dict | |
# Output each flow and append the the owner information from each dictionary entry | |
# using the flow's creator.userId property as the key | |
| $flows |.[].properties.creator |= . + $dict[.userId] | |
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
#!/usr/bin/env bash | |
set -e | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" | |
TMP_ENVIRONMENTS=./tmp/environments.json | |
TMP_FLOWS=./tmp/flows.json | |
TMP_OWNERS=./tmp/owners.json | |
TMP_MAPPEDFLOWS=./tmp/mappedFlows.json | |
TMP_FLOWSCSV=flows-frombash.csv |
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
// Place your key bindings in this file to override the defaults | |
[ | |
// Toggle to terminal focus | |
{ | |
"key": "ctrl+`", | |
"command": "workbench.action.terminal.focus" | |
}, | |
// Toggle to editor focus | |
{ | |
"key": "ctrl+`", |
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
#!/usr/bin/env bash | |
help() { | |
echo | |
echo " ****************************************************************" | |
echo " ** Teamify Classic Site " | |
echo " ** " | |
echo " ** Simple script to Groupify and Teamify a SharePoint Online Classic site" | |
echo " ** " | |
echo " ** Usage: ./teamify-classicsite.sh -s|--siteUrl [classic site url] -a|--alias [alias] -d|--description [description]" |
NewerOlder