This file contains hidden or 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
public static void AddAppContextToViewBag(Controller controller, HttpContextBase httpContext, | |
SharePointContext spContext) | |
{ | |
if (httpContext == null) throw new ArgumentNullException("httpContext"); | |
if (spContext == null) throw new ArgumentNullException("spContext"); | |
var vb = controller.ViewBag; | |
vb.SPHostUrl = spContext.SPHostUrl.ToString().TrimEnd(new[] {'/'}); | |
vb.SPAppWebUrl = spContext.SPAppWebUrl.ToString().TrimEnd(new[] {'/'}); | |
vb.SPClientTag = spContext.SPClientTag; |
This file contains hidden or 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
function loadScript(url) { | |
log(">> load: url(" + url.toLowerCase() + ")"); | |
var d = new $.Deferred(); | |
$.getScript(url, function () { | |
log("<< loaded: url(" + url.toLowerCase() + ")"); | |
d.resolve(url); | |
}); | |
return d.promise(); | |
} |
This file contains hidden or 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
cls | |
$programFiles = [environment]::getfolderpath("programfiles") | |
add-type -Path "$programFiles\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.dll" | |
Write-Host "To disable sideLoading, enter Site Url, username and password" | |
$siteurl = Read-Host 'Site Url' | |
$username = Read-Host "User Name" | |
$password = Read-Host -AsSecureString 'Password' |
This file contains hidden or 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
cls | |
$programFiles = [environment]::getfolderpath("programfiles") | |
add-type -Path "$programFiles\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.dll" | |
Write-Host "To enable sideLoading, enter Site Url, username and password" | |
$siteurl = Read-Host "Site Url" | |
$username = Read-Host "User Name" | |
$password = Read-Host -AsSecureString "Password" |
This file contains hidden or 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
cls | |
$cn = SPOConnect-WithLabel -SPOUrl "" -CredentialLabel "" | |
$web = $cn.Web | |
$ctx = $cn.Context | |
$whatif = $false | |
$list = Get-List -ListName "List Name" -web $web -ClientContext $ctx | |
$query = [Microsoft.SharePoint.Client.CamlQuery]::CreateAllItemsQuery() | |
$items = $list.GetItems($query) |
This file contains hidden or 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
(function (window, undefined) { | |
"use strict"; | |
var $ = window.jQuery; | |
var document = window.document; | |
// SPHostUrl parameter name | |
var SPHostUrlKey = "SPHostUrl"; |
This file contains hidden or 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
cls | |
# Connect to EXO | |
$creds = Get-WindowsCredentialManagerCredentials -TargetName "credential label" | |
Write-Host "Credentials for: $($creds.UserName)`n" | |
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $creds -Authentication Basic -AllowRedirection | |
Import-PSSession $Session | Out-Null | |