Dismiss Notice

Register now to be one of the first members of this SharePoint Community! Click here it just takes seconds!

Dismiss Notice
Welcome Guest from Country Flag

SPO : PowerShell to get Custom Actions in a Site Collection

Discussion in 'Official Microsoft News' started by ChandrasekarN, Aug 28, 2016.

Thread Status:
Not open for further replies.
  1. ChandrasekarN

    ChandrasekarN Guest

    Blog Posts:

    $siteUrl = Read-Host -Prompt “Enter sitecollection url”
    $username = Read-Host -Prompt “Enter user login name”
    $password = Read-Host -Prompt “Enter user login password” -AsSecureString
    $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl)

    # SharePoint Online
    $credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)
    $ctx.Credentials = $credentials

    $rootWeb = $ctx.Site
    $caColl = $rootWeb.get_userCustomActions()

    Write-Host ‘Total number of custom actions: ‘$caColl.Count
    $count = 1
    $caColl | ForEach-Object {
    Write-Host $count’)’ $_.Name

    Continue reading...
Thread Status:
Not open for further replies.

Share This Page

LiveZilla Live Chat Software