Created
April 19, 2015 08:11
-
-
Save sjkp/035d4c1bd05d0ba9c079 to your computer and use it in GitHub Desktop.
Enable Side Loading of Apps
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
[System.Reflection.Assembly]::LoadFile("C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll") | |
$ctx = new-object Microsoft.SharePoint.Client.ClientContext("https://<site>") | |
$pass = "<password>" | |
$s = ConvertTo-SecureString -String $pass -AsPlainText -Force | |
$ctx.Credentials = new-object Microsoft.SharePoint.Client.SharePointOnlineCredentials("[email protected]",$s) | |
$ctx.Load($ctx.Site); | |
$ctx.ExecuteQuery(); | |
$guid = [System.Guid]"e374875e-06b6-11e0-b0fa-57f5dfd72085" | |
$ctx.Site.Features.Add($guid,$true,[Microsoft.SharePoint.Client.FeatureDefinitionScope]::None) | |
$ctx.ExecuteQuery(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment