I'm just wondering if I can ask for some assist?
We are using O365 Exchange and it's synced with our AD.
Basically we have purchased a new domain and I'm trying to add the new domain to about 40+ of our distribution list under the proxyaddresses as smtp:email.
We have the groups setup as follows.
Group Name: Test 1
Email: test1@test.com
I have tried with the below though it only puts the domain in not with the part before the @test.com
$Distros = import-csv C:\Output\test.csv
foreach ($d in $distros)
{
$DistroName = $d.name
$group = get-adgroup $distroname -properties proxyaddresses
set-adgroup $group -add @{proxyaddresses="smtp:" + "test.com"}