Sharepoint online powershell. Change property of webpart

In addition to my previous question:
http://social.msdn.microsoft.com/Forums/office/en-US/fadcd297-32af-41bb-8132-60e987eccb3a/sharepoint-online-powershell-and-csom-change-listview-and-put-it-on-a-page?forum=sharepointdevelopment
In SharePoint online I want to change the property of a webpart. In this case I have a list of which I have changed the view (using powershell) but on the page (default.aspx) the view is not changed. So I guess if I change the view property of the webpart,
my problem will be solved. I tried to use the "GetLimitedWebPartManager
" but I do not get that running on Office365 as it is not part of the Microsoft.sharepoint.client.clientcontext, which I use to connect to the Office365 teamsite.
Are there any suggestions?
Thanks, Mike

Hi,
According to your post, my understanding is that you want to webpart view proproty in SharePoint Online.
As your environment is SharePoint Online, I suggest you can achieve it using Client Object Model. In Client Object Model, there is such API called LimitedWebPartManager.
More information about LimitedWebPartManager Class:
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.webparts.limitedwebpartmanager(v=office.15).aspx
http://msdn.microsoft.com/en-us/library/office/ee539301(v=office.14).aspx
http://www.enjoysharepoint.com/Articles/Details/change-webpart-title-using-sharepoint-client-object-model-258.aspx
Best regards,
Zhengyu Guo
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber
Support, contact [email protected]
Zhengyu Guo
TechNet Community Support

Similar Messages

  • Which is better approach to manage sharepoint online - PowerShell Script with CSOM or Console Application with CSOM?

    Which is better approach to manage sharepoint online - PowerShell Script with CSOM or Console Application with CSOM?
    change in sharepoint scripts not require compilation but anything else?

    Yes, PowerShell is great, since you can quick change your code without compilation.
    SP admin can write ps scripts without specific tools like Visual Studio.
    With powershell you can use cmdlets,
    which could remove a lot of code, for example restarting a service.
    [custom.development]

  • Powershell Error for SharePoint Online -"The remote server returned an error: (407) Proxy Authentication Required."

    I am trying to call sharepoint online from powershell. Below is the code. I get 
    Exception calling "ExecuteQuery" with "0" argument(s): "The remote server returned an error: (407) Proxy Authentication Required."
    $loadInfo1 = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client")
    $loadInfo2 = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime")
    $webUrl = "ZZZZ"
    $username = "XXX"
    $password = "YYYY"
    $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($webUrl) 
    $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)
    $web = $ctx.Web
    $lists = $web.Lists 
    $ctx.Load($lists)
    $ctx.ExecuteQuery()
    $lists| select -Property Title
    Raj-Shpt

    Hi,
    About how to access SharePoint online site using PowerShell, the blog below would be helpful:
    http://social.technet.microsoft.com/wiki/contents/articles/29518.csom-sharepoint-powershell-reference-and-example-codes.aspx
    Another two demos for your reference:
    http://www.hartsteve.com/2013/06/sharepoint-online-powershell/
    http://www.sharepointnutsandbolts.com/2013/12/Using-CSOM-in-PowerShell-scripts-with-Office365.html
    Thanks
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Customization approach as per best practice for SharePoint Online

    Hi All,
    I am working for a customer for customization on SharePoint Online. I need to create following customization.
    For each department one site collection is required to be created. There will be 15 site collections.
    Each site collection will have couple of team sites.
    Each team will have couple of document libraries and customer list.
    Custom lists and document libraries will have custom views.
    MaterPage and Layout will be customized to apply the UI Branding.
    Customer wants that configuration management should be as per the Microsoft best practice. I am wondering what the approach I should use is.
    Should I create visual studio solution, but since there are 15 different site collections are required to be created I believe sandboxed solution will not be feasible sine sandboxed solution are scoped with site collection.
    I also believe if I do create visual studio solution that development efforts will be extensive.
    I am not sure whether it is feasible, use the SharePoint Designer to apply this customization but I am confused in this case. If it is possible then how I will promote the customization to production.
    I am also confused in case SharePoint online how I will keep production and development environment separate? What is the best practice around it?
    Regards 
    Unrest Spirit
    Regards Restless Spirit

    Hi,
    You can create Custom Master page using SharePoint Designer. And for first four points from creating Sitecollection to creating views you can create a hierarchy of objects in site using csv file and then create Powershell script to create sitecollection,
    team site, list/libraries and view by reading csv files.
    http://blogs.technet.com/b/fromthefield/archive/2013/08/22/create-a-site-structure-using-powershell.aspx
    http://blog.falchionconsulting.com/index.php/2009/12/creating-a-sharepoint-2010-site-structure-using-powershell/
    Details about SharePoint Online Powershell management shellcan be found on below links:
    http://technet.microsoft.com/en-us/library/fp161362%28v=office.15%29.aspx
    https://support.office.com/en-GB/article/Introduction-to-the-SharePoint-Online-Management-Shell-c16941c3-19b4-4710-8056-34c034493429
    Best Regards,
    Brij K

  • Deleting old survey responses from Sharepoint Online (Office 365)

    We have an Office 365 implementation and are utilizing the hosted SharePoint to collect survey responses using the default survey app.  We continually collect survey responses, but only want to have up to date information.  Is it possible to automatically
    delete survey responses older than a specified number of days?
    Not sure if this is the right place, but Microsoft Support recommended posting here from the Office 365 Forums:
    http://community.office365.com/en-us/f/154/p/298352/909303.aspx#909303
    Thanks,
    Emplo

    Hi
    schedule a task on a local server a powershell scom script which will do the task
    An example hot to use it to connect to sharepoint online
    http://www.hartsteve.com/2013/06/sharepoint-online-powershell/
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • Managed property in a site collection (powershell - SharePoint online)

    Link to my site collection -> https://web.domain.com/sites/SC/_layouts/15/listmanagedproperties.aspx?level=sitecol
    when opening an url similar to this one and filter on a property name refinablestring00
    What I need is to is to add a mapping to do is to add a mapping
    Mappings to crawled properties
    With powershell.
    Assume that a full crawl has finished. That all crawled properties exist.
    I want to add "ows_GoPro_x0020_Code" and I also want to change the Alias to "ProjectNumber"
    What is the best way to do this via powershell for SharePoint 2013 online?
    Do I need to build a sandboxed solution for this?

    HI,i would recommend  run the PowerShell cmdlet to check if this website exists. Here are the detailed steps:
    1. Set up the SharePoint Online Management Shell Windows PowerShell environment
    http://technet.microsoft.com/en-us/library/fp161372.aspx
    2. Run the command Get-SPOSite, it will return all site collections.
    3. Check if the problematic public site collection is shown in the result. If it shows up, run another command to remove it. For example:
    Remove-SPOSite -Identity https://expertsharepoint/sites/site1 -NoWait
    This will remove the site collection named https://expertsharepoint/sites/site1 from the site collections list and moves it to the Recycle Bin.
    4. Delete the site from the Recycle Bin:
    Remove-SPODeletedSite -Identity https://expertsharepoint/sites/site1
    Anil Avula[MCP,MCSE,MCSA,MCTS,MCITP,MCSM] See Me At: http://expertsharepoint.blogspot.de/

  • Is it possible to change the title of a webpart using client object model/c#/sharepoint online

    Hi folks!
    I have been busted my butt trying to Write a program changing the title of an existing webpart on on of our subsites on SharePoint online. But I keep getting an error in the very last context.executequery. Tried a bunch of different approaches, but I can't
    make it work. Before I start posting code; I Wonder if anyone have ever done this?
    Its a plain Windows form application, using Visual studio Express and the Client Object model. (Listsing the titles of the webparts Works but changing titles seem impossible. Thought it might be a checkin/out problem but it doesn't make a difference).
    Any help would be highle appreciated.
    Lars

    It depends: are you using the default style for Text Captions? In that case you can change the default style in the Object Style Manager and have it applied to all Captions.
    Or you can change one text caption, and in its Properties panel choose the option 'Save Changes to existing style' from the menu top right (see screenshot). Both methods will work if you didn't override the default Caption Style for those captions. Beware: Quizzing objects can use another style.

  • Powershell CSOM Sharepoint online list permission

    I've been writing a script to connect to SharePoint online, create a document library and add some AD accounts to the permission. I've written all the code using snippets I have found through many searches but am having an issue with the permissions part.
    All of the code is taken from this page:
    http://jeffreypaarhuis.com/2012/06/07/scripting-sharepoint-online-with-powershell-using-client-object-model/
    The only change is i'm using the get principal fun instead of the get group, but not sure if that's what has done it. I'm very new to powershell.
    I keep getting an error when adding the user and permission type to roledefinitionbinding. The error is:
    Collection has not been initialized at line 0 char 0.
    The issue is when it runs $collRoleAssign.Add($principal, $collRdb) part and stop with the error above.
    I would really appreciate a hand with this before my PC get launched out of the window.
    Thanks Mark

    Hi,
    The following code snippet for your reference:
    var login = "[email protected]";
    var password = "xxxxxx";
    var siteURL=”https://SharePointOnlineSiteUrl”;
    ClientContext ctx = new ClientContext(siteURL);
    var securePassword = new SecureString();
    foreach (char c in password)
    securePassword.AppendChar(c);
    SharePointOnlineCredentials credentials = new SharePointOnlineCredentials(login, securePassword);
    ctx.Credentials = credentials;
    Web wsite = ctx.Web;
    ctx.Load(wsite, w => w.HasUniqueRoleAssignments, w => w.RoleAssignments.Include(roleAssigned => roleAssigned.Member.Title,
    roleAssigned => roleAssigned.RoleDefinitionBindings.Include(roleDef => roleDef.Name)));
    ctx.ExecuteQuery();
    RoleAssignmentCollection rac = wsite.RoleAssignments;
    if (rac != null && rac.Count !=0)
    Console.WriteLine("Unique Permissions: " + wsite.HasUniqueRoleAssignments);
    foreach (RoleAssignment ra in rac)
    Console.WriteLine("Group Name: " + ra.Member.Title);
    foreach (RoleDefinition rd in ra.RoleDefinitionBindings)
    Console.WriteLine("Permission: " + rd.Name);
    Console.ReadKey();
    More information:
    http://social.technet.microsoft.com/wiki/contents/articles/24087.associate-permission-levels-with-sharepoint-user-groups-using-the-client-side-object-model-in-netc.aspx
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Configure site auditing in sharepoint online using powershell or Client object model

    Is the any way to configure site collection audit settings in sharepoint online programmatically or using powershell.

    Hi Bhism,
    The solution given in the article is for sharepoint 2010, i want to enable site auditing in Sharepoint 2013.
    When i tried using that for sharepoint 2013 making he neccessary changes required for sharepoint 2013 i got an error :
    Unable to find type [Microsoft.SharePoint.SPAuditMaskType]: make sure that the
    assembly containing this type is loaded.
    I think the assembly is for SP2010, is there anything like that for SP2013
    Thanks in Advance.

  • How to extend OOTB Content Search WebPart in SharePoint Online/0365 programmatically ?

    Hi All,
    We have some requirements wherein we need to extend some of the properties of Content Search WebPart in SharePoint Online/0365 using javascript (I am using 0365 NAPA tools). We are looking to create an App Part which functions same as content search webpart.
    To be specific I want to override "QueryText" property of CSWP (using javascript in NAPA tool).
    Any help would be greatly apprieciated.
    Thanks in advance,
    Dhananjay.

    If you're talking about affecting the CSWP within a host web from within an AppPart, then no it won't be possible as the AppPart runs within an iFrame.
    Perhaps a better approach might be to run your searches within the AppPart using the REST interface for search. Chris O'Brien has a pretty good example of this on his blog..
    http://www.sharepointnutsandbolts.com/2013/01/calling-sharepoint-search-using-rest-eg.html and I think Scott Hillier did a session at SPC which you should be able to find on Channel 9. (Just search for REST SEARCH API)
    Paul.
    Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times.

  • Cannot see managed properties values in search result webpart- Sharepoint online

    Hi,
    Cannot see custom managed properties at site collection level in ResultScriptWebPart for SharePoint online. where as it is visible when i create managed properties @SSA (Search Service Application) level.
    Below are the steps which I followed:
    1) I have added few custom managed properties at Search Site collection level in SharePoint online.
    2) Mapped those properties to user profile crawled properties
    3) We are using those custom managed properties in ResultScriptWebPart(People Search Core Results) by using ItemTemplate
    I cannot see those managed properties in search result.When I debug it in browser it comes as null.
    But when I add these managed properties @SSA (Search Service Application) level I can see the value in search result webpart.
      What is the reason value doesn't get populated  at Site Collection level?
    Thanks,
    Prashant A

    Hi Prashant,
    Based on your description, the site collection managed property cannot work in SharePoint Online.
    For troubleshooting this issue, I recommend to verify the things below:
    Please make sure that the full crawl has been run after creating the managed property.
    Please check if the managed property is set to be searchable.
    Please search with this managed property to see if the results can be returned.
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • Change document file name via workflow - SharePoint Online

    Is it possible to change the filename of document uploaded in sharepoint online/onpremises using workflow?
    We would like to have documents uploaded to sharepoint but unfortunately some have the same name and this from a folder structure :(
    When i used a workflow and use set i keep getting error.
    Thanks in Advance

    Hi,
    We can create a calculated column and use SharePoint designer workflow to achieve your requirement.
    More information is here:
    http://www.oracular.com/site/index.php/easyblog/workflows-that-rename-files-part-1
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Not able to set security group without mail enabled as site collection admin using powershell in sharepoint online site - office 365

    not able to set security group without mail enabled as site collection admin using powershell in sharepoint online site - office 365?
    Any idea?

    after few days test in my lab, I can see that only email enabled group can be added as site collection admin using POWERSHELL.
    hope this helps who stuck like me!! :-)

  • The underlying connection was closed: An unexpected error occurred on a receive..Exception.Message - while executing powershell command for sharepoint online site

    " +The underlying connection was closed: An unexpected error occurred on a receive..Exception.Message " OR sometimes
    "The remote server returned an error: (503) Server Unavailable..Exception.Message"
    Getting exception above when performing various operation (site coll creating, group creation, adding users to group) for sharepoint online (Office 365) site using powershell script.
    I want to create 3500 site collections using PS script. In-between getting above exception so it will skip one site collection creating and working again. for eg. after creating 11 site coll, script will through above exception and so 12th site coll will
    not be create but working fine from 13 and so on...

    Remote server seems working to me...any additional check?
    if problem with remote server then may be loop to create site provisioning should not start again..Right?
    any idea?

  • How to set security group as primary site collection admin and secondary site collection admin using powershell in sharepoint online site - office 365?

    How to set security group as primary site collection admin and secondary site collection admin using powershell in sharepoint online site - office 365?

    Hi,
    According to your description, my understanding is that you want to set security group as admin of primary and secondary site collection using PowerShell command in office 365.
    I suggest you can use the command below to set the group to site owner, then it will have the site collection admin permission.
    Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -Owner [email protected] -NoWait
    Here are some detailed articles for your reference:
    https://technet.microsoft.com/en-us/library/fp161394(v=office.15)
    http://blogs.realdolmen.com/experts/2013/08/16/managing-sharepoint-online-with-powershell/
    Thanks
    Best Regards
    Jerry Guo
    TechNet Community Support

Maybe you are looking for

  • HT204053 2 Itunes Accounts - How do i merge them?

    I somehow have 2 itunes accounts. An icloud account on my phone, And on my laptop a normal itunes account. I have made purchases on both. Can i somehow merge these? Or delete one and keep the other without losing everything?

  • How to transfer photos and video from MacBook to ipad

    How do I transfer photos and video from laptop/MacBook Pro to my iPad. Also how do I download videos from internet to my iPad.

  • APEX vs PHP

    Hello everyone, I'm about to start an online catalog for schools where teachers upload grades and parents can login-in and see them.It's not very complicated, just a form and a few reports(looking for a nice user-friendly interface). My friend (and c

  • Printing HTML PAGE

    Java has some Class to handle HTML Pages. I want to build a Button that is able to print the actual page of the Browser. I know about ClipBoard Class, SomeOne has some Idea how to do this? The idea is to create an applet that creates a button to prin

  • Apple Script won't create new folder

    Hi all, First of all, let me explain that in no particular way I am any good with applescript. I find it confusing at the best of times. I've got a bit of code that will check to see if a new folder is created in a specific location. If a new folder