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
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory=$true, HelpMessage="This is the URL to the SharePoint Online site with your term.")] | |
[string]$Url, | |
[Parameter(Mandatory=$true, HelpMessage="This is the path to the DLLs for CSOM.")] | |
[string]$CSOMPath | |
) | |
Set-Strictmode -Version 1 |
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
# replace these details (also consider using Get-Credential to enter password securely as script runs).. | |
$username = "REDACTED" | |
$password = "REDACTED" | |
$adminUrl = "https://REDACTED-admin.sharepoint.com" | |
# email address we would like all requests on all sites to go to | |
$email = "REDACTED" | |
$securePassword = ConvertTo-SecureString $Password -AsPlainText -Force | |
$spoCredentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $securePassword) |
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
# replace these details (also consider using Get-Credential to enter password securely as script runs).. | |
$username = "REDACTED" | |
$password = "REDACTED" | |
$url = "REDACTED" | |
$securePassword = ConvertTo-SecureString $Password -AsPlainText -Force | |
# the path here may need to change if you used e.g. C:\Lib.. | |
Add-Type -Path "C:\Users\pchoquette\Source\Repos\PnP-Sites-Core\Assemblies\16.1\Microsoft.SharePoint.Client.dll" | |
Add-Type -Path "C:\Users\pchoquette\Source\Repos\PnP-Sites-Core\Assemblies\16.1\Microsoft.SharePoint.Client.Runtime.dll" |
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
.ms-newdoc-callout-main > hr, | |
#js-newdocWOPI-divFolder-WPQ2 { | |
display: none; | |
} | |
.js-callout-title { | |
text-indent: -9999px; | |
line-height: 0; | |
} |
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
Import-Module Microsoft.Online.SharePoint.Powershell | |
$password = Read-Host -Prompt "Enter password" -AsSecureString | |
[Microsoft.SharePoint.Client.ClientContext]$context = New-Object Microsoft.SharePoint.Client.ClientContext("https://jjkllc.sharepoint.com/sites/kma/extranet") | |
$context.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials("pchoquette@jjkllc.com", $password) | |
$web = $context.Web | |
$context.Load($web) | |
$context.Load($web.RoleAssignments) | |
$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
Import-Module Microsoft.Online.SharePoint.Powershell | |
Function Invoke-LoadMethod() { | |
param( | |
[Microsoft.SharePoint.Client.ClientObject]$Object = $(throw "Please provide a Client Object"), | |
[string]$PropertyName | |
) | |
$ctx = $Object.Context | |
$load = [Microsoft.SharePoint.Client.ClientContext].GetMethod("Load") | |
$type = $Object.GetType() |
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
var Starcrossed = Starcrossed || {}; | |
Starcrossed.PostRenderCallback = function(ctx) { | |
if (!Starcrossed.fixed) { | |
$("#WebPart" + ctx.wpq).find("tbody[id^='titl']").each(function(idx, elem) { | |
// Remove item count | |
$(elem).find("td").children().last().remove(); | |
// Remove column title |
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
SP.SOD.executeOrDelayUntilScriptLoaded(function() { | |
var oldDisplayCreateSharedFolderDialog = DisplayCreateSharedFolderDialog; | |
DisplayCreateSharedFolderDialog = function (rootFolder, webPartID, userSource) { | |
oldDisplayCreateSharedFolderDialog(rootFolder, webPartID, userSource); | |
$("#csfd_invitePeopleBtn").hide(); | |
}; | |
}, "createsharedfolderdialog.js"); |
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
$("a[title='Actions']").next("ul").find("a").each(function (index, element) { | |
$(element).attr("onclick", "javascript: NewOrEditV4Core(event, '" + $(element).attr("href") + "')"); | |
$(element).attr("href", "#"); | |
}); |