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

Similar Messages

  • 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!! :-)

  • How to install app using powershell in sharepoint online - office 365?

    How to install app using powershell in sharepoint online - office 365?

    Hi
    check this similar post
    https://social.msdn.microsoft.com/Forums/sharepoint/en-US/1f0cd45a-00e1-4452-bafe-83c6ee3a59db/can-i-deploy-a-sharepointapp-to-office-365-using-powershell?forum=appsforsharepoint
    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.

  • Add a list and column to about 200 sites using powershell in SharePoint online

    
    I have a sitecollection with about 200 identical sites. However I need to add a new list to each site and a lookup column (referring to this list) to two other lists. I'm not a developer so I struggle a bit. I found this as a starting point:
    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client") | Out-Null
    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime") | Out-Null
    $WebUrl = 'https://yourtenant.sharepoint.com/sites/somesite'
    $EmailAddress = "[email protected]"
    $Context = New-Object Microsoft.SharePoint.Client.ClientContext($WebUrl)
    $Credentials = Get-Credential -UserName $EmailAddress -Message "Please enter your Office 365 Password"
    $Context.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($EmailAddress,$Credentials.Password)
    $List = $Context.Web.Lists.GetByTitle("YourList")
    $FieldXml = "<Field Type='Text' DisplayName='New_Field_Display_Name' />"
    $Option=[Microsoft.SharePoint.Client.AddFieldOptions]::AddFieldToDefaultView
    $List.Fields.AddFieldAsXml($fieldxml,$true,$option)
    $Context.Load($list)
    $Context.ExecuteQuery()
    $Context.Dispose()
    Can someone help me out or is there a better solution?
    Thanks.
    

    Hi,
    According to your post, my understanding is that you wanted to add a list and a lookup column in about 200 identical sites.
    Per my knowledge, there is no out of the box way to achieve it in SharePoint Server, however, I’m not sure whether it is in SharePoint online.
    As this is the forum for SharePoint Server, you can post your question in the forum for SharePoint online.
    http://community.office365.com/en-us/forums/154.aspx.
    However, as you had known, we can achieve it programmatically.
    Besides the PowerShell command, we can also use the Client Object Model to achieve your scenario.
    If all the 200 sites in one site collection, we can first retrieve all the sites in the site collection, then add the list in every site.
    To retrieve all the sites in a site collection, you can refer to the following code snippets.
    static string mainpath = "SiteURL";
    static void Main(string[] args)
    getSubWebs(mainpath);
    Console.Read();
    public static void getSubWebs(string path)
    try
    ClientContext clientContext = new ClientContext( path );
    Web oWebsite = clientContext.Web;
    clientContext.Load(oWebsite, website => website.Webs, website => website.Title);
    clientContext.ExecuteQuery();
    foreach (Web orWebsite in oWebsite.Webs)
    string newpath = mainpath + orWebsite.ServerRelativeUrl;
    getSubWebs(newpath);
    Console.WriteLine(newpath + "\n" + orWebsite.Title );
    catch (Exception ex)
    http://chennaisharepointtraining.blogspot.in/2011/11/get-all-subwebs-using-client-object.html
    To create a list, you can have a look at the following article.
    http://msdn.microsoft.com/en-us/library/office/fp179912(v=office.15).aspx
    Thanks,
    Jason
    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].
    Jason Guo
    TechNet Community Support

  • How to get First Occurnece of SubString from any string using SharePoint Designer Workflow in SharePoint Online 2013(Office 365)

    Hello All,
    I am facing Problem in SharePoint Designer Workflow. The Problem is that while replacing some subtstring with Space from a string which contains item like {Test, Test, Test, Test}, It replaces all items.
    Below two line we are using in Workflow.
    Can any body suggest some soultion for Finding first ouucrence of ", " so that we can replace only first value from string not all. When String values are different then getting proper values but if String values are same with comma
    seperated then it replace all values.
    Please some body help and your help will be heighly appriciable.
    Thanks in Advance.
    Thanks,
    Vivek Kumar Pandey   

    Have you tried to use Regular Expressions instead of Replace?
    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

  • How to use powershell in sharepoint 2007

    How to use powershell in sharepoint 2007

    SPWeb site = SPContext.Current.Web;
    SPGroup managerGroup = site.Groups["Group Name"];
    bool isManager = site.IsCurrentUserMemberOfGroup(managerGroup);******Please mark as ANSWERED if this helps************
    Thanks Rahul Prabhune

  • I am having email problems with the new Lion.  stmp, imap, etc. I have looked up google info and It is confusing when it comes to TS, SSL also, please explain how to set it up so my email goes out and comes in securely.  Help

    I am having email problems with the new Mountain Lion.  stmp, imap, etc. I have looked up google info and It is confusing when it comes to TS, SSL also, please explain how to set it up so my email goes out and comes in securely.  Help
    Incoming Mail (IMAP) Server - requires SSL:
    imap.gmail.com
    Use SSL: Yes
    Port: 993
    Outgoing Mail (SMTP) Server - requires TLS:
    smtp.gmail.com (use authentication)
    Use Authentication: Yes
    Use STARTTLS: Yes (some clients call this SSL)
    Port: 465 or 587
    Account Name:
    your full email address (including @gmail.com) Google Apps users, please enter username@your_domain.com
    Email Address:
    your full Gmail email address ([email protected]) Google Apps users, please enter username@your_domain.com
    Password:
    your Gmail password
    The Quick Answer
    Follow the instructions below to set up IMAP1 access in most email clients.
    Google Apps users, please follow the default instructions unless otherwise noted, replacing 'your_domain.com' with your actual domain2 name.
    this is all greek to me. WHAT IS STARTTLS? On the first page of Apple set up there is a TLS certificate and it is marked NONE- should I change it to the long APPLE CERT option?  The next page under ADVANCED: THERE IS A BOX SSL MARKED.  Then IMAP Path Prefix - I put stmp.gmail.com.. is that right?  Port 993 can  use this one? as 456 doesn't work and 587 said it wasn't safe.  Under AUTHENTICATION I used PASSWORD.  Should I have used external client cert TLS?
    Please help me set this up securely. Thanks

    Apple - Support - Mail Setup Assistant

  • How to set up Group Policy without any server installed

    How to set up Group Policy on Win8 without any server installed?
    I have set up 50 users on LAN and want to push softwares via one common point. From google I found to deploy Software using Group Policy. But then Group Policy occurs in Servers and I don't have any server set up.

    Hello,
    a Domain requires at least one Windows server OS machine which has Active Directory installed.
    As previous already mentioned from SenneVL this also requires that computers are added to the domain and that you create user accounts in Active Directory users and computers which stores the account information in the Active directory database.
    In your case with single computers each machine has its own database(SAM) which stores passwords etc. this is different in a domain.
    Each computer has a local policy which will be overwritten from centrally managed policies from the domain.
    "The common point would be my PC (Admin PC) ."
    This machine can not be used for your needs with software installation for 50 computers.
    "How To Use the Group Policy Editor to Manage Local Computer Policy."
    This is about the local machine and you cannot manage them for other computers from your Admin PC.
    "DOMAIN part: By default Microsoft takes everyone on Workgroup. Is that not a default DOMAIN? or should I make one lets say "ABC" on every PC ?"
    NO, this is NOT a domain.
    http://windows.microsoft.com/en-us/windows7/what-is-the-difference-between-a-domain-a-workgroup-and-a-homegroup
    Best regards
    Meinolf Weber
    MVP, MCP, MCTS
    Microsoft MVP - Directory Services
    My Blog: http://blogs.msmvps.com/MWeber
    Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
    Twitter:  

  • How to set a group by clause in ODI interface?

    How to set a group by clause in ODI interface?

    In ODI, group by method will be triggered automatically when any one of your mapping contains aggregate functions.
    Thanks,
    Saravanan Rajavel

  • How to set security for output merged PDF?

    If you wan to to set password or other security for your output merged PDF, how to do? there is the tutorial:http://www.kvisoft.com/tutorials/how-to-set-security-merged-pdf.html

    If you have a credit card, add it to your account, then you'll just be asked to verify your CVV code instead. You can remove it after.

  • How to set up Yosemite 10.10.1 to print and scan using CANON PIXMA MP780 (on MacBook Pro). Thanks. Bozdogan

    How to set up Yosemite 10.10.1 to print and scan using CANON PIXMA MP780 on MacBook Pro (Pre-Yosemite operating system OS X10.6.8)?
    Yosemite 10.10.1 doesn't seem to support MP780. Also, CANON doesn't have a driver for Yosemite 10.10.1 for its MP 780 series.
    Thanks. Bozdogan  (at [email protected])

    I believe you should be able to print wirelessly using your MBP and printer. However, you will want to visit the Canon home site and download the current drivers and firmware for your printer. Once you've done this, I hope you'll post back with your results.
    http://usa.canon.com/cusa/support/consumer/printers_multifunction/pixma_mp_serie s/pixma_mp780#DriversAndSoftware
    http://usa.canon.com/cusa/support/consumer/printers_multifunction/pixma_mp_serie s/pixma_mp780?pageKeyCode=prdAdvDetail&docId=0901e0248039b1dc
    You're going to need both drivers and firmware.

  • How to set MM02 should not allow to change account and costing view

    Hi all guru's
    How to set MM02 should not allow to change account and costing view details for orher users expect me,plz help me
    thanks
    ramesh

    Hi Ramesh,
                       Use the Authorization Object:  M_MATE_STA     Material Master: Maintenance Statuses
    Below are the Views for the MM02, Field STATM
    Whichever not wanted to be changed, please dont provide them.
    A     Work scheduling
    B     Accounting
    C     Classification
    D     MRP
    E     Purchasing
    F     Production resources/tools
    G     Costing
    K     Basic data
    L     Storage
    P     Forecasting
    Q     Quality management
    S     Warehouse management
    V     Sales
    X     Plant stocks
    Z     Storage location stocks
    Regards,
    Yawar Khan
    Edited by: 1234_abcd on Jan 10, 2012 8:14 AM

  • New security group then added into either built in administrator or domain admin group

    I am having windows 2012 R2 DC so i need to create administrator group please let me know if we create new security group then added into either built in administrator or domain admin group it will work? i have tried but not working any other alternative
    methods to get admin access

    Controlling local group membership could be done by GPOs:
    Using Group Policy Restricted Groups: http://social.technet.microsoft.com/wiki/contents/articles/20402.active-directory-group-policy-restricted-groups.aspx
    Using a startup script that adds a domain group as member of a local group: http://technet.microsoft.com/en-us/library/bb490706.aspx
    If you have manually added a domain security group to local Administrators group of a computer and you still see that the members are not admins then you can do the following:
    Logoff and logon again and see if that helps
    If you are using a universal group then you be having a problem with the membership. More details here: http://www.windowsdevcenter.com/pub/a/windows/2004/06/15/fsmo.html. You can try converting the group to a global one for testing.
    Adding a user to Domain Admins group will make you, by default, a local administrator on domain-joined Windows Systems. This is because, domain admins are, by default, members of local Administrators group. However, you should make the membership of Domain
    Admins group very limited and only for users who do global domain administration.
    This posting is provided AS IS with no warranties or guarantees , and confers no rights.
    Ahmed MALEK
    My Website Link
    My Linkedin Profile
    My MVP Profile

  • How to upload local files to Offices365 SharePoint Online Site by C# Code?

    Hi all,
    I've some requirement needs to upload files from local to Office365 Sharepoint Online Site Document Library using C# code?
                   public static void upload()
    Uri uri = new Uri("siteurl");
                    ClientContext context = new ClientContext(uri);
                    var passWord = new SecureString();
                    foreach (var c in "password") passWord.AppendChar(c);
                    context.Credentials = new SharePointOnlineCredentials("email", passWord);
    Web web = context.Web;
                   FileCreationInformation newFile = new FileCreationInformation();
                    newFile.Content = System.IO.File.ReadAllBytes(@"C:\myfile.txt");
                    newFile.Url = "file uploaded via client OM.txt";
                    List docs = web.Lists.GetByTitle("Documents");
                    Microsoft.SharePoint.Client.File uploadFile = docs.RootFolder.Files.Add(newFile);
                    context.ExecuteQuery();
    I don't know whether this method works and I'm always get issue for getting the ClientContext.
    Thanks for your reply.

    Please try below.
    public void SaveFileToSharePoint(string fileName)
    using (var context = new ClientContext("https://mydomain.com/"))
    var passWord = new SecureString();
    foreach (var c in "MyPassword") passWord.AppendChar(c);
    context.Credentials = new SharePointOnlineCredentials("[email protected]", passWord);
    var web = context.Web;
    var newFile = new FileCreationInformation {Content = File.ReadAllBytes(fileName), Url = Path.GetFileName(fileName)};
    var docs = web.Lists.GetByTitle("Documents");
    docs.RootFolder.Folders.GetByUrl("Test").Files.Add(newFile);
    context.ExecuteQuery();
    Bala

  • Can't open Sharepoint Online site in Sharepoint Designer 2013

    Hello!
    I am trying to open a Sharepoint Online secure site in Sharepoint Designer 2013 (v15). When I try to open the site in Sharepoint Designer i get an error stating: 
    "Server error: The version of Microsoft SharePoint Foundation running on the server is more recent than the version of SharePoint Designer that you are using. You need a more recent version of SharePoint
    Designer."
    I used to have the preview version installed, but I uninstalled it and got the latest version I could find (version 15?). I checked the SharePoint version on the server (/_vti_pvt/service.cnf) and it says: 
    vti_encoding:SR|utf8-nl
    vti_extenderversion:SR|16.0.0.1706The public site I have has the same version and it opens just fine in SharePoint Designer 2013. Are there any new versions of SharePoint Designer 2013 available that I have missed? My SharePoint Designer is up to date via Windows Update.I am running the designer on Windows 7 Ultimate x86.

    I had the same issue today. Here what I have found.
    I was using different credentials for my different SharePoint site in SPD 2013. When I try to access my new SharePoint online site (Which has different Account) the SharePoint Designer directly show me  
    "Server error: The version of Microsoft SharePoint Foundation running on the server is more recent than the version of SharePoint Designer that you are using. You need a more recent version of SharePoint Designer."
    then I changed my Account Credentials by
    Open SPD 2013
    1)click File
    2) Click Account
    3) Log out from current user name
    4) sign in by using the same credential  as your new SharePoint Site.
    DONE!
    I think this error is not useful as it (this error) is not about which version of SharePoint you are using but more about Account credentials.(At least for me) Hope that helps.

Maybe you are looking for

  • Is it possible to create a PDF "print" button from InDesign behaviors?

    In Acrobat, there is a way to create a button with a behavior for "print" that will queue the document up for printing. I don't see a way to do this on the InDesign end, though, via behaviors. Something that will export from InDesign and carry over t

  • TCode to post a Controlling Document in Object Currency only

    Is there a TCode that can be used to post to a secondary cost element but only updating the Object Currency Value? I had an issue with our recent periodic Assessment. Some of the posted assessment documents have line items that have  different Object

  • FROM EXCEL FILE TO INTERNAL TABLE

    HI GURU'S, i'm using the following code to conver the excel file into internal table. CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'     EXPORTING      I_FIELD_SEPERATOR          = 'X'     I_LINE_HEADER              =       I_TAB_RAW_DATA             = IT_T

  • CRM Outlook client based synchronization

    Hello , I am using CRM outlook client based synchronization, I am concern about moving to winter clock. Which steps and in which order should be performed on CRM and Exchange side? Rika

  • Change in SAPScript form not reflect in old orders

    Hi Expert,    I have modified the layout of a sales order SAPScript form. For newly created one, I can get the new sales order printed with new layout. But for those who already exists, even though I go to the sales order, Extra -> Output -> Header t