#These<\/span> two lines will import will give you the access you need to work in Office 365 #connect<\/span> to Exchange to allow access to emails of client #Gives<\/span> you the list of users to you and idea of what you are working with #Create<\/span> a CSV file with just UserPrincipalName from MsolUser #Specify<\/span> DistirbutionGroup Import-CSV C:.CSV | ForEach {Add-DistributionGroupMember -Identity “DistGroup” -Member $_.UserPrincipalName -ByPassSecurityGroupManagerCheck}<\/p>\n !!!THIS IS THE RROR I KEEP GETTING!!!<\/p>\n Cannot validate argument on parameter ‘Member’. The argument is null. Provide a valid value for the argument, and then #These<\/span> two lines will import will give you the access you need to work in Office 365 #connect<\/span> to Exchange to allow access to emails of client #Gives<\/span> you the list of users to you and idea of what you are working with #Create<\/span> a CSV file with just UserPrincipalName from MsolUser #Specify<\/span> DistirbutionGroup Import-CSV C:.CSV | ForEach {Add-DistributionGroupMember -Identity “DistGroup” -Member $_.UserPrincipalName -ByPassSecurityGroupManagerCheck}<\/p>\n !!!THIS IS THE RROR I KEEP GETTING!!!<\/p>\n Cannot validate argument on parameter ‘Member’. The argument is null. Provide a valid value for the argument, and then If you post code, please use the ‘Insert Code’ button. Please and thank you!<\/p>\n
\n#Need<\/span> to know the the email and password for the Portal you are trying to access
\nConnect-MsolService #Opens<\/span> up the login for Office 365
\nimport-Module MsOnline #Allows<\/span> you to run as Admin in Office 365<\/p>\n
\n$exchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri \" https://outlook.office365.com/powershell-liveid\"<\/a> ; -Credential $Usercredential -Authentication “Basic” -AllowRedirection
\nImport-PSSession $exchangeSession -DisableNameChecking<\/p>\n
\n#Get-MsolUser<\/span>
\n#Get-MsolGroup<\/span> gives you the groups so you can find what specific group your are looking for and its ObjectId
\n#Can<\/span> us Get-MsolGroupMember -GroupObjectId to see who is already in the group
\n#If<\/span> you know the group name you can single it out by using this line of code you’ll have to change “Office” for your specific GroupObjectId
\nGet-MsolGroup -MaxResult 100000|Where-Object{$_.DisplayName -eq “DistGroup”}<\/p>\n
\nGet-MsolUser|Format-Table -Property UserPrincipalName|Out-File -FilePath C:.CSV
\n#Need<\/span> to change file path when necessary
\n#Use<\/span> Get-Content to check if you have everthing you need<\/p>\n
\n#Change<\/span> File Path and Distribution to fit needs
\n#Add-DistributionGroupMember<\/span> -Identity “DistGroup” -Member “[email protected]<\/a>” -BypassSecurityGroupManagerCheck (this allows to put one person in at a time)<\/p>\n
\ntry running the command again.<\/p>\n\n
[Add-DistributionGroupMember], ParameterBindingValidationException<\/li>\n
\n#Need<\/span> to know the the email and password for the Portal you are trying to access
\nConnect-MsolService #Opens<\/span> up the login for Office 365
\nimport-Module MsOnline #Allows<\/span> you to run as Admin in Office 365<\/p>\n
\n$exchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri \" https://outlook.office365.com/powershell-liveid\"<\/a> ; -Credential $Usercredential -Authentication “Basic” -AllowRedirection
\nImport-PSSession $exchangeSession -DisableNameChecking<\/p>\n
\n#Get-MsolUser<\/span>
\n#Get-MsolGroup<\/span> gives you the groups so you can find what specific group your are looking for and its ObjectId
\n#Can<\/span> us Get-MsolGroupMember -GroupObjectId to see who is already in the group
\n#If<\/span> you know the group name you can single it out by using this line of code you’ll have to change “Office” for your specific GroupObjectId
\nGet-MsolGroup -MaxResult 100000|Where-Object{$_.DisplayName -eq “DistGroup”}<\/p>\n
\nGet-MsolUser|Format-Table -Property UserPrincipalName|Out-File -FilePath C:.CSV
\n#Need<\/span> to change file path when necessary
\n#Use<\/span> Get-Content to check if you have everthing you need<\/p>\n
\n#Change<\/span> File Path and Distribution to fit needs
\n#Add-DistributionGroupMember<\/span> -Identity “DistGroup” -Member “[email protected]<\/a>” -BypassSecurityGroupManagerCheck (this allows to put one person in at a time)<\/p>\n
\ntry running the command again.<\/p>\n\n
[Add-DistributionGroupMember], ParameterBindingValidationException<\/li>\n