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
<# | |
.Synopsis | |
Retrieves the control elements registered for a given delegate control ID. | |
.DESCRIPTION | |
Retrieves the control elements registered for a given delegate control ID. | |
.EXAMPLE | |
Get-SPControlElement -Web "http://demo" -ControlId "QuickLaunchDataSource" -TopOnly | |
.EXAMPLE | |
Get-SPControlElement -Web "http://demo" -ControlId "QuickLaunchDataSource" -Scope "Web" | |
#> |
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
function Get-SPUserEffectivePermissions() { | |
[CmdletBinding(DefaultParameterSetName="Farm")] | |
param ( | |
[Parameter(Mandatory=$true, Position=0)] | |
[ValidateNotNull()] | |
[object[]]$users, | |
[Parameter(Mandatory=$true, ValueFromPipeline=$true, Position=1)] | |
[ValidateNotNull()] | |
[Microsoft.SharePoint.SPSecurableObject]$InputObject |
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
function global:Connect-SPOSite { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory=$true, ValueFromPipeline=$true, Position=0)] | |
$Url | |
) | |
begin { | |
[System.Reflection.Assembly]::LoadFile("C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.dll") | Out-Null | |
[System.Reflection.Assembly]::LoadFile("C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.Runtime.dll") | Out-Null |
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
<# | |
.Synopsis | |
Facilitates the loading of specific properties of a Microsoft.SharePoint.Client.ClientObject object or Microsoft.SharePoint.Client.ClientObjectCollection object. | |
.DESCRIPTION | |
Replicates what you would do with a lambda expression in C#. | |
For example, "ctx.Load(list, l => list.Title, l => list.Id)" becomes | |
"Load-CSOMProperties -object $list -propertyNames @('Title', 'Id')". | |
.EXAMPLE | |
Load-CSOMProperties -parentObject $web -collectionObject $web.Fields -propertyNames @("InternalName", "Id") -parentPropertyName "Fields" -executeQuery | |
$web.Fields | select InternalName, Id |