Giter VIP home page Giter VIP logo

Comments (2)

erwinvanhunen avatar erwinvanhunen commented on May 24, 2024

Hi! This is the default behaviour when creating site collections and/or subweb through CSOM (which is the underlying SDK that the cmdlets are using).

Use the Set-SPOGroup cmdlet in combination with optionally the New-SPOGroup cmdlet to create the associated groups:

$web = New-SPOWeb -Title "Administration" -Template "STS#0" -Locale 1033 -Url administration -BreakInheritance
Connect-SPOnline -Url $web.Url
$owner = (Get-SPOContext).Credentials.UserName
$visitorsGroup = New-SPOGroup -Title "Administration Visitors" -Owner $owner
Set-SPOGroup -Identity $visitorsGroup -SetAssociatedGroup Visitors
$membersGroup = New-SPOGroup -Title "Administration Members"  -Owner $owner
Set-SPOGroup -Identity $membersGroup -SetAssociatedGroup Members
$ownersGroup = New-SPOGroup -Title "Administration Owners" -Owner $owner
Set-SPOGroup -Identity $ownersGroup -SetAssociatedGroup Owners

from pnp-powershell.

briankinsella avatar briankinsella commented on May 24, 2024

Thank you Erwin. Figured this was the case - need to bone up on CSOM! Thank
you for the example script, very helpful.

Best,
Brian

(512) 662-1740
[email protected]
linkedin.com/in/briankinsella

On Mon, Nov 23, 2015 at 6:34 AM, Erwin van Hunen [email protected]
wrote:

Hi! This is the default behaviour when creating site collections and/or
subweb through CSOM (which is the underlying SDK that the cmdlets are
using).

Use the Set-SPOGroup cmdlet in combination with optionally the
New-SPOGroup cmdlet to create the associated groups:

$web = New-SPOWeb -Title "Administration" -Template "STS#0" -Locale 1033 -Url administration -BreakInheritanceConnect-SPOnline -Url $web.Url$owner = (Get-SPOContext).Credentials.UserName$visitorsGroup = New-SPOGroup -Title "Administration Visitors" -Owner $ownerSet-SPOGroup -Identity $visitorsGroup -SetAssociatedGroup Visitors$membersGroup = New-SPOGroup -Title "Administration Members" -Owner $ownerSet-SPOGroup -Identity $membersGroup -SetAssociatedGroup Members$ownersGroup = New-SPOGroup -Title "Administration Owners" -Owner $ownerSet-SPOGroup -Identity $ownersGroup -SetAssociatedGroup Owners


Reply to this email directly or view it on GitHub
#113 (comment)
.

from pnp-powershell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.