- List all groups and their addresses:
Get-UnifiedGroup | fl alias,*primary*,*emailadd*
Get-UnifiedGroup group1 | Set-UnifiedGroup -PrimarySmtpAddress group1@newdomain.tech
- Remove SMTP address from old domain:
Get-UnifiedGroup group1 | Set-UnifiedGroup -EmailAddresses @{remove="group1@olddomain.com"}
Get-UnifiedGroup group1 | fl alias,*primary*,*emailadd*
$registryPath = "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify"
$Name1 = "IconStreams"
$Name2 = "PastIconsStream"
$value = $null
New-ItemProperty -Path $registryPath -Name $Name1 -Value $value -PropertyType BINARY -Force | Out-Null
New-ItemProperty -Path $registryPath -Name $Name2 -Value $value -PropertyType BINARY -Force | Out-Null
Get-Process explorer | Stop-Process -Force
.
abserver -dumpfile "C:\LyncShare\n-WebServices-n\ABFiles\00000000-0000-0000-0000-000000000000\00000000-0
000-0000-0000-000000000000\F-0ef3.lsabs" c:\ABS-dump26Jun.txt
$registryPath = "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\WU"
New-Item -Path $registryPath -Force | Out-Null
$Name = "BlockNetFramework47"
$value = "1"
New-ItemProperty -Path $registryPath -Name $name -Value $value -PropertyType DWORD -Force | Out-Null
reg.exe query HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Lync\user001@domain.com.br\Autodiscovery
reg.exe query HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Lync\user001@domain.com.br\LyncAutodiscovery
# deploy MaxConcurrentApi key in multiple Exchange servers
Get-Exchangeserver | foreach{Invoke-Command -ComputerName $_.fqdn -ScriptBlock {
$registryPath = "HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters"
$Name = "MaxConcurrentApi"
$value = "10"
IF(!(Test-Path $registryPath)){
New-Item -Path $registryPath -Force | Out-Null
New-ItemProperty -Path $registryPath -Name $name -Value $value -PropertyType DWORD -Force | Out-Null}
ELSE {
New-ItemProperty -Path $registryPath -Name $name -Value $value -PropertyType DWORD -Force | Out-Null}
restart-service netlogon -Force
}}
# deploy MaxConcurrentApi key in multiple DC servers. This is captured from the “currentDomainControllers” result.
(Get-Exchangeserver servername -Status).CurrentDomainControllers | foreach{Invoke-Command -ComputerName $_ -ScriptBlock {
$registryPath = "HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters"
$Name = "MaxConcurrentApi"
$value = "10"
IF(!(Test-Path $registryPath)){
New-Item -Path $registryPath -Force | Out-Null
New-ItemProperty -Path $registryPath -Name $name -Value $value -PropertyType DWORD -Force | Out-Null}
ELSE {
New-ItemProperty -Path $registryPath -Name $name -Value $value -PropertyType DWORD -Force | Out-Null}
restart-service netlogon -Force
}}