File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -25,20 +25,20 @@ Get-MgGroupOwner -GroupId $GroupId | ForEach-Object { @{ UserId=$_.Id}} | get-Mg
2525Get-MgGroupMember - GroupId $GroupId
2626
2727# Get your mail
28- Get-MgUserMessage - UserId $UserId - Filter " contains(subject,'Marketing')" | select sentDateTime, subject
28+ Get-MgUserMessage - UserId $UserId - Filter " contains(subject,'Marketing')" | Select-Object sentDateTime, subject
2929
3030# New Group
31- $group = new -MgGroup - DisplayName " PowerFam" - MailEnabled:$false - mailNickName " powerfam" - SecurityEnabled
31+ $group = New -MgGroup - DisplayName " PowerFam" - MailEnabled:$false - mailNickName " powerfam" - SecurityEnabled
3232
3333# Add member to Group
34- new -MgGroupMember - GroupId $Group.Id - DirectoryObjectId $UserId
34+ New -MgGroupMember - GroupId $Group.Id - DirectoryObjectId $UserId
3535
3636# View new member to Group
37- Get-MgGroupMember - GroupId $group.Id | ForEach-Object { @ { UserId = $_.Id }} | get-user | Select-Object id, DisplayName, Mail
37+ Get-MgGroupMember - GroupId $group.Id | ForEach-Object { @ { UserId = $_.Id }} | Get-Mguser | Select-Object id, DisplayName, Mail
3838
3939# Remove Group
4040Remove-MgGroup - GroupId $Group.Id
4141
4242# Create a new User
43- new -MgUser - displayName " Bob Brown" - AccountEnabled - PasswordProfilePassword " {password}" `
43+ New -MgUser - displayName " Bob Brown" - AccountEnabled - PasswordProfile @ { " Password " = " {password}" } `
4444 - MailNickname " Bob.Brown" - UserPrincipalName " bob.brown@{tenantdomain}"
You can’t perform that action at this time.
0 commit comments