Navigation Menu

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 / 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 / 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 / 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 / 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 / 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 / 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 / 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 / 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-empty-playlists.json
Last active January 7, 2020 10:37
Demo empty playlists.json file for Learning Pathways
[
{
"Id": "08365272-6868-4482-9384-b720d0121533",
"Title": "",
"Image": "images/playlists/",
"LevelId": "",
"AudienceId": "",
"TechnologyId": "",
"SubjectId": "",
"Source": "SOC",
@pkbullock
pkbullock / demo-fragment-metadata.json
Created January 7, 2020 10:38
Demo fragment metadata.json file for Learning Pathways
"Categories": [
{
"Id": "618da7fa-0ed2-4653-9dfd-271c3bbe3a44",
"Name": "Products",
"Image": "",
"TechnologyId": "",
"SubjectId": "",
"Source": "Microsoft",
"SubCategories": [