PowerShell
- 1 ответ
- 0 вопросов
1
Вклад в тег
Get-User -RecipientTypeDetails UserMailbox | where {$_.UseraccountControl -notlike “*accountdisabled*”} | Select Name,WindowsEmailAddress,SAMAccountName,FirstName,LastName | Export-Csv c:\1\contacts.txt -Encoding unicode
Import-Csv "C:\1\contacts.txt" | ForEach-object { New-MailContact -Name $_.Name -externalEmailAddress $_.WindowsEmailAddress -Alias $_.SAMAccountName -FirstName $_.FirstName -LastName $_.LastName -OrganizationalUnit "Contacts" }