Skip to content

Instantly share code, notes, and snippets.

View pkbullock's full-sized avatar
🎯
Focusing

Paul Bullock pkbullock

🎯
Focusing
View GitHub Profile
@pkbullock
pkbullock / demo-empty-assets.json
Created January 7, 2020 10:34
Demo empty Assets.json file for Learning Pathways
[
{
"Id": "94b00f50-5896-479c-b0c5-ff74603b35a3",
"Title": "",
"Description": "",
"Url": "",
"TechnologyId": "",
"SubjectId": "",
"Source": "",
"StatusTagId": "",
@pkbullock
pkbullock / demo-assets.json
Created January 7, 2020 10:31
Demo Assets.json file for Learning Pathways
[
{
"Id": "28dad67b-adb8-4df5-822b-677d81968eda",
"Title": "Add Text and Tables to your modern page",
"Description": "",
"Url": "https://support.office.com/en-gb/client/add-text-and-tables-to-your-page-with-the-text-web-part-729c0aa1-bc0d-41e3-9cde-c60533f2c801?embed=true&ns=trainingservices&version=1",
"TechnologyId": "a97cb2db-55fb-43ec-8ded-67909ce1c61f",
"SubjectId": "",
"Source": "Microsoft",
"StatusTagId": "ecee7e26-7ac3-41b2-8d06-90843e3ec7a7",
@pkbullock
pkbullock / PageMappingPagePropertiesFragment.xml
Last active September 24, 2019 11:42
Example Page Mapping - Page Properties - Xml Fragment
<MetaData ShowPageProperties="true" PagePropertiesRow="1" PagePropertiesColumn="2" PagePropertiesOrder="7">
<Field Name="Title" TargetFieldName="Title" Functions="" ShowInPageProperties="true"/>
<Field Name="SeoKeywords" TargetFieldName="" Functions=""/>
</MetaData>
@pkbullock
pkbullock / Enable-NoScript.ps1
Created January 14, 2019 06:56
Enable NoScript on Site
# Connect to SharePoint Online Admin
Connect-SPOService https://<tenant>-admin.sharepoint.com
# Disable NoScript feature
Set-SPOSite https://<tenant>.sharepoint.com/sites/<site> -DenyAddAndCustomizePages $true
@pkbullock
pkbullock / Set-PageNotFoundProperty.ps1
Last active July 31, 2020 10:27
Set 404 Property on SharePoint site
$tenant = "<tenant>"
$site = "<site>"
$siteUrl = "https://$($tenant).sharepoint.com/sites/$($site)"
Write-Host "Setting 404 page at $($siteUrl)..."
# Connect to SharePoint Online with PnP PowerShell library
Connect-PnPOnline $siteUrl -UseWebLogin
@pkbullock
pkbullock / Disable-NoScript.ps1
Last active January 14, 2019 06:53
Disable NoScript feature
# Connect to SharePoint Online Admin
Connect-SPOService https://<tenant>-admin.sharepoint.com
# Disable NoScript feature
Set-SPOSite https://<tenant>.sharepoint.com/sites/<site> -DenyAddAndCustomizePages $false
@pkbullock
pkbullock / Colorize-PowerShell.json
Last active November 21, 2018 07:01
Snippet for Colorize to include PowerShell scripts
// Specified files extension that should be colorized
"colorize.languages": [
"powershell"
]
@pkbullock
pkbullock / New-WelshSite.ps1
Last active October 17, 2018 16:10
Script to Create Welsh Site using PnP PowerShell
$adminUrl = "https://<tenant>-admin.sharepoint.com"
$newSiteUrl = "https://<tenant>.sharepoint.com/sites/Pensaerniaeth"
$ownerEmail = "<your.name@your.email.com>"
$siteTitle = "Pensaerniaeth" # Translates to "Architecture" - Bing Translator
$siteTemplate = "SITEPAGEPUBLISHING#0" # Communication Site Template
$lcid = 1106 # Welsh (https://capa.ltd/mui-lcids)
$timeZone = 2 # London (https://capa.ltd/sp-timezones)
Connect-PnPOnline -Url $adminUrl -NoTelemetry
@pkbullock
pkbullock / Get-SupportedLanguages.ps1
Last active October 17, 2018 15:57
Get Supported Language Codes
# Simple script to get the installed languages in SharePoint Online
Connect-PnPOnline -Url "https://<mytenant>.sharepoint.com"
(Get-PnPWeb -Includes RegionalSettings.InstalledLanguages).RegionalSettings.InstalledLanguages
@pkbullock
pkbullock / Highlighted-Column.json
Created September 27, 2018 15:11
Highlight News Items in a Site Pages Modern Library - Column
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"children": [
{
"elmType": "span",
"style": {
"display": "inline-block",
"padding": "0 4px"
},