The following PowerShell cmdlets removes a user or a security group from a site collection or a group. Enter your values for Site, LoginName, and Group.
Remove user: Remove-SPOUser [-Site] <yoursitename> [-LoginName] <yourloginname>
Remove group: Remove-SPOUser [-Site] <yoursitename> [-Group] <yourgroupname>
Looking for an awesome, no-nonsense technical conference for IT Pros, Developers, and DevOps? IT/Dev Connections kicks off in San Francisco in 2017!