Now we can create start looking at the more serious stuffs, such as creating security groups and assigning users
In order to create a security group, we can simple do:
New-MsolGroup -DisplayName "SocialMedia" -Description "Social Media"
We can either do a Get-MsolGroup which will list all the groups, or a better and cleaner way doing is by filtering by a specific keyword
Get-MsolGroup | Where-Object {$_.DisplayName -eq "SocialMedia"}
If you want to display the users in a certain Security Group, we can simply do:
$LogiSam = Get-MsolGroup | Where-Object {$_.DisplayName -eq "LogiSam"} Get-MsolGroupMember -GroupObjectId $LogiSam.ObjectId
In order to add a new member to an existing Security Group, we can do: