Tags » PowerShell

Windows 10 Feature - PowerShell is Pretty

I just found a cool Windows 10 feature – The PowerShell command prompt now has┬ácolours to differentiate between functions and variables just like the Integrated Scripting Editor (ISE) as you type. 33 more words

General

Page Layout PowerShell CSOM

Once you have uploaded your page layout we need to assign the content types to the File object and publish the file. This example is made for a .aspx page that has been uploaded prior. 175 more words
SharePoint 2013

Today With PowerShell – Tuesday 28th July, 2015

Today I used PowerShell to create AD groups and manage permissions on Exchange Public Folders and also to interact with the REST API of our Service Desk software.

PowerShell

Upload File PowerShell CSOM

To Upload a file to a SharePoint Site we can use the following re-usable method
function UploadFile($clientContext,$fileName,$fileContent,$listName){

 $listFileCollection = $clientContext.Web.Lists.GetByTitle($listName).RootFolder.Files

 $FileCreationInformation = New-Object Microsoft.SharePoint.Client.FileCreationInformation
 $FileCreationInformation.Content = $fileContent
 $FileCreationInformation.Url = $fileName
 $FileCreationInformation.Overwrite = $true
 
 $fileAdded = $listFileCollection.Add($FileCreationInformation)
 $clientContext.Load($fileAdded)
 $clientContext.ExecuteQuery() 

}
… 26 more words
SharePoint 2013

Activate Feature PowerShell CSOM

To Activate a Feature in Site Collection or web level we can use this re-usable method
function ActivateFeature($featureGuid,$clientContext,$isSiteScope){
 
 if($isSiteScope){
 $clientContext.Site.Features.Add($featureGuid,$true,::None) 

 }else{
 $clientContext.Web.Features.Add($featureGuid,$true,::None)
 }

 try{
 $clientContext.ExecuteQuery()
 }catch{
 
 Write-Host "An error occured while activating publishing features. 77 more words
SharePoint 2013

Beginners PowerShell SharePoint

PowerShell is one of the key tools of SharePoint Development, once you pick it up you will think to yourself, why didn't I learn this earlier. 486 more words
SharePoint 2013

V4 is here!

Hi everybody, i’d like to announce the release of Snippet Manager & Injector v4! This time it’s all about speed and comfort. There are some very nice new features, but my focus was: improvement. 393 more words

PowerShell