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
<# | |
README | |
The scripts are not meant to be ran together. | |
These are a collection of scripts that can be pieced together. | |
Each section below comments can perform a specific action. | |
Update your info | |
CREATOR - Drew Madelung | |
LAST UPDATED - 3/15/2019 | |
#> |
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
$sitedesign = Get-SPOSiteDesign | where {$_.Title -eq "Advanced Design"} | |
$existingsitescripts = $sitedesign.SiteScriptIds | |
Set-SPOSiteDesign -Identity $sitedesign.Id -SiteScripts $existingsitescripts, $sitescript.Id |
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
$terms = @() | |
#set terms | |
$terms = "Term1","Term2" | |
#set mm field | |
$mmfield = 'MM' | |
#get term info | |
$tg = Get-PnPTermGroup -Identity "Site Collection - drewmadelung.sharepoint.com" |
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
$list = Get-PnPList "List" | |
$view = Get-PnPView -List $list -Identity "All Documents" | |
$vto = $view.TypedObject | |
$view.Context.Load($vto) | |
$view.Context.ExecuteQuery() | |
$vto.ViewQuery = "<OrderBy><FieldRef Name=`"Modified`" Ascending=`"False`" /></OrderBy><Where><Neq><FieldRef Name=`"DocumentState`" /><Value Type=`"Text`">Obsolete</Value></Neq></Where>" | |
$view.Update() | |
$view.Context.ExecuteQuery() |
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
add-type -Path "C:\Users\dmadelung\SPCSOM\Microsoft.SharePoint.Client.dll" | |
add-type -Path "C:\Users\dmadelung\SPCSOM\Microsoft.SharePoint.Client.Runtime.dll" | |
$ctx = New-Object Microsoft.SharePoint.Client.ClientContext("https://domain-my.sharepoint.com/personal/drew_drewmadelung_com") | |
$ss = Read-Host -Prompt "Enter password" -AsSecureString | |
$ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials("drew@drewmadelung.com", $ss) | |
$web = $ctx.Web | |
$ctx.Load($web) | |
$ctx.ExecuteQuery() | |