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 "Microsoft.SharePoint.Client.dll" | |
Add-Type -Path "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
try { | |
$rendition = New-Object Microsoft.SharePoint.Client.Publishing.ImageRendition | |
$rendition.Name = $Title | |
$rendition.Width = $Width | |
$rendition.Height = $Height | |
$renditionCol.Add($rendition) | |
[Microsoft.SharePoint.Client.Publishing.SiteImageRenditions]::SetRenditions($ctx,$renditionCol) | |
$ctx.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
var showDocs = function() { | |
var qGroups = Srch.ScriptApplicationManager.get_current().queryGroups; | |
$.each(qGroups, function() { | |
if (this.displays != null && this.displays.length > 0) { | |
// Result source GUID | |
this.dataProvider.set_sourceID('70949b02-0f2c-4026-9c4f-c9d6e0023aa4'); | |
this.dataProvider.issueQuery(); | |
} | |
}); | |
}; |
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
#!/bin/bash | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |
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
=LEFT(RIGHT([URLCOLUMN],LEN([URLCOLUMN])-INT(FIND("DefaultView=",[URLCOLUMN])+11)),INT(FIND("&",RIGHT([URLCOLUMN],LEN([URLCOLUMN])-INT(FIND("DefaultView=",[URLCOLUMN])+11))))-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
export interface IQuoteState { | |
error?: string; | |
quoteItems?: IQuoteItem[]; | |
} |
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
export default class Quotes extends React.Component<IQuoteProps, IQuoteState> { | |
constructor(props) { | |
super(props); | |
this.state = { | |
error: null, | |
censusItems: [] | |
}; | |
} | |
} |
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
$scopes = @("Group.Read.All") | |
Connect-PnPMicrosoftGraph -Scopes $scopes | |
Get-PnPUnifiedGroup |
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
# Update the tenant url | |
PS C:\> .\Add-CommSitesSCA.ps1 -Url https://<tenant>-admin.sharepoint.com | |
## Or Provide optional credentials | |
PS C:\> $creds = Get-Credential | |
PS C:\> .\Add-CommSitesSCA.ps1-Url https://<tenant>-admin.sharepoint.com -Credentials $creds |
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
// This is how you can access the page context info | |
this.context.pageContext.legacyPageContext; | |
// Retreive current user display name | |
this.context.pageContext.legacyPageContext['userDisplayName']); | |
// Even site classification | |
this.context.pageContext.legacyPageContext['siteClassification']); |