setexchange server
Set-ExchangeServer -identity targettestexchange.targettest.local -StaticExcludedDomainControllers:targettestdc01.targettest.local,targettestdc02.targettest.local,targettestdc03.targettest.local
Get-ExchangeServer -identity targettestexchange.targettest.local -status | fl Name, StaticExcludedDomainControllers
Set-ExchangeServer -identity targettestexchange.targettest.local -StaticExcludedDomainControllers:$null
Full access
Get-mailbox –OrganizationalUnit “test users”| Add-MailboxPermission –user “testtest005” –accessright Fullaccess
[PS] C:\Windows\system32>get-mailboxserver | where {$_.name -like "targettestexchange*"} |Get-mailboxStatistics | where {$_.DisconnectDate -notlike "" -and $_.Displayname -notlike "*test*"} | sort LastLogonTime | ft DisplayName, LastLogonTime, Database -wrap
[PS] C:\Windows\system32>Get-Mailbox -OrganizationalUnit "test users" | Set-Mailbox -HiddenFromAddressListsEnabled $true
Get-Group | Where {$_.GroupType -eq "Global"} | Set-Group -Universal
Import-csv -path c:\temp\groups.csv | foreach { Enable-distributiongroup -identity $_.Identity}
Get-DistributionGroup -| Set-DistributionGroup -EmailAddressPolicyEnabled $False
[PS] C:\Windows\system32>Get-DistributionGroup -OrganizationalUnit "test groups" | Set-DistributionGroup -EmailAddressPolicyEnabled $False
Get-mailuser -OrganizationalUnit "test users" | Set-mailuser -EmailAddressPolicyEnabled $True
Get-mailbox -OrganizationalUnit "test users" | Set-mailbox -EmailAddressPolicyEnabled $True