Monday, September 28, 2015

[EX2010] Add user photo in Exchange 2010 environment



http://blogs.technet.com/b/exchange/archive/2010/03/10/3409495.aspx

http://blogs.technet.com/b/exchange/archive/2010/06/01/3410006.aspx

http://blogs.technet.com/b/ilvancri/archive/2009/11/17/upload-picture-in-outlook-2010-using-the-exchange-management-shell-exchange-2010.aspx


Monday, September 21, 2015

[EX2010] Update GAL and OAB

Sabe quando é adicionado ou removido algum usuário da organização e algum usuário informa que o catálogo de endereço não reflete estas mudanças?

Pois então... compartilho aqui uma lista de passos para atualizarmos as informações na lista de endereços global (GAL), no Catálogo de Endereços Offline e então forçar os servidores a obterem o OAB com as últimas alterações.

Para atualizar os dados da GAL:


  • Get-GlobalAddressList | Update-GlobalAddressList


Uma vez que a GAL está atualizada, precisamos trazer estas últimas alterações para o Offline Address Book:



  • Get-OfflineAddressBook | Update-OfflineAddressBook



Após isto é necessário reiniciar o serviço Background Intelligent Transfer Service no servidor de Mailbox responsável por gerar a OAB


Finalmente, devemos forçar os servidores CAS a copiarem o Ofline Address Book mais atualizado.
Podemos fazer isso de duas formas:


  • Reiniciando o serviço Microsoft Exchange File Distribution (MSExchangeFDS)
Ou rodando o comando para atualização do
  • Update-FileDistributionService "CASServerName"


Lembrando que esse passo deve ser executado em todos os servidores CAS.


Após estes passos, quando o cliente efetuar o download do OAB ou verificar os contatos na GAL, os novos contatos já devem estar presentes.

Tuesday, September 15, 2015

[EX2013] Access the EAC in English




Add “?mkt=EN-us” in the ECP URL

https://mail.domain.com/ecp?mkt=EN-us

[WSRV] Check antivirus filters



fltmc instances

[WSRV] IPv6 registry entries



## Obtém as informações da chave de registro e suas entradas/modificações
Get-ItemProperty "hklm:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters"


## Obtém as pastas-filho da chave de Registro especificada

Get-ChildItem "hklm:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" 

Monday, September 7, 2015

[EX2013] Filtering mailbox audit log




Search-MailboxAuditLog margaery -ShowDetails | fl Operation,LogonType,DestFolderPathName,Folder
PathName,ClientIPAddress,MailboxOwnerUPN,LogonUserDisplayName,SourceItemSubjectsList,MailboxResolvedOwnerName,LastAccess
ed

[EX2013] Access XML in OWA




Set-OwaMailboxPolicy -Identity OwaMailboxPolicy-Default -AllowedFileTypes @{add='.xml'}

Sunday, September 6, 2015

[WSRV] Filter string in log files




Get-ChildItem B:\Documents\Scripts | get-Content | Select-String -SimpleMatch "environment"

[EX2010] Change attachments size in EWS





[EX2013] Information Services (IIS) status codes



Description of Microsoft Internet Information Services (IIS) 5.0 and 6.0 status codes

https://support.microsoft.com/en-us/kb/318380

[EX2010] Common cmdlets




    • Configure contact picture in Exchange 2010:

    Import-RecipientDataProperty -Identity MMM -Picture -FileData ([Byte[]]$(Get-Content -path "c:\.jpg" -Encoding Byte -ReadCount 0))

    • Check Exchange Rollup Version

    Get-Command Exsetup.exe | ForEach-Object {$_.FileVersionInfo}

    • List all Disconnected Exchange 2010 Mailboxes

    Get-MailboxDatabase | Get-MailboxStatistics | where {$_.DisconnectReason -ne $null} | ft displayname,database,disconnectreason -auto

    • Enable execution of Powershell scripts

    set-executionpolicy remotesigned

    • Get mailbox copy status information

    Get-MailboxDatabaseCopyStatus -Identity “Mailbox Database Name” | select DatabaseName,Status,ActiveDatabaseCopy,ContentIndexState

    • Import PST Files
    Get-Mailbox -Database “Mailbox Database Name”| Import-Mailbox -PSTFolderPath “Path import pst file location”

    • Show all Mailboxes which are bigger than 400 mb and sorted
    Get-MailboxStatistics -server “Mailbox Server Name”| Where-object {$_.TotalItemSize -gt 400mb} | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label=”TotalItemSize (MB)”;expression={$_.TotalItemSize.Value.ToMB()}},ItemCount > "C:\Outputfile.txt"

    • Verify if the database is mounted on the server with preference 1 (with colors)}”
    Get-MailboxDatabase | Sort Name | ForEach {$db=$_.Name; $xNow=$_.Server.Name ;$dbown=$_.ActivationPreference| Where {$_.Value -eq 1};  Write-Host $db “on” $xNow “Should be on” $dbOwn.Key -NoNewLine; If ( $xNow -ne $dbOwn.Key){Write-host ” WRONG” -ForegroundColor Red; } Else {Write-Host ” OK” -ForegroundColor Green}}

[EX2013] Exchange Support Lifecycle





Ciclo de vida do suporte Microsoft



[WSRV] Change Timezone




TZUTIL /g

TZUTIL /s "E. South America Standard Time"

[WSRV] Filter ADUsers




Get-ADUser -Filter * | ?{($_.Name -like "*ick a*") -or  ($_.Name -like "Administrator*") } | ft name
Get-ADUser -Filter * | ?{($_.Name -notlike "*ick a*") -and ($_.Name -notlike "Administrator*") } | ft name

[WSRV] Certificate in wrong place + Script



Get-Childitem cert:\LocalMachine\root -Recurse | Where-Object{$_.Issuer -ne $_.Subject} | Format-List *


https://gallery.technet.microsoft.com/LyncSkype4B-Certificate-81944851

[WSRV] Transferring FSMO roles




[WSRV] LDP





  • Open ldp.exe from run prompt
  • Click on Connection -> Connect
  • Enter Domain Controller FQDN and click OK
  • Click on Connection -> Bind -> Click ok to login using Default Credentials if you logged in using Domain/Enterprise Admin account
  • Click on View -> Tree to connect to Domain or Configuration Partition
  • CTRL + N -> Clear the right reading pane


[WSRV] Revocation Check Failed





netsh winhttp show proxy

netsh winhttp set proxy proxy-server="http=myproxy" bypass-list="*.host_name.com"



Include revocation url in the bypass list of proxy:

netsh winhttp set proxy proxy-server="tmg-corp.cemig.ad.corp:8080" bypass-list="*gb.symcb.com"


Check certificates:

netsh http show sslcert

[WSRV] NSLookup cmdlets





  • nslookup -querytype=mx domain.com
  • nslookup -querytype=ptr domain.com
  • nslookup -querytype=txt domain.com
  • C:\Users\admin>nslookup
    • Servidor Padrπo: bd040099.virtua.com.br
    • Address:  189.4.0.153
  • > server 8.8.8.8

[WSRV] LDAP Queries




(&(objectClass=person)(objectClass=user)(SamAccountName=rickb))

[WSRV] Clean up server metadata





To clean up server metadata
  1. Open a command prompt.
  2. Type the following command, and then press ENTER:
    ntdsutil
  3. At the ntdsutil: prompt, type:
    metadata cleanup
  4. Perform metadata cleanup as follows:
    • If you are performing metadata cleanup by using the version of Ntdsutil.exe that is included with Windows Server 2003 SP1, at the metadata cleanup: prompt, type:
      remove selected server ServerName
      Or
      remove selected server ServerName1 on ServerName2

[WSRV] Forest Trust




However, the administrators group of each domain is a domain local group, so you could add the enterprise admins group from the other forest to the administrators group of each domain. This is likely the tedious operation you were trying to avoid, but it is the easiest way to grant this permission.
For reference, check out these technet articles:


[WSRV] W32tm



W32tm


How to synchronize the time with the Windows Time service in Windows XP



Restart Windows Time service:

1. net stop w32time
2. net start w32time


Synchronize the time on a member computer in an Active Directory domain

w32tm /resync

w32tm /resync /rediscover

[WSRV] Disabling IPv6




Arguments against disabling IPv6


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\

New -> DWORD (32 bits) -> DisabledComponents

Type 0 to re-enable all IPv6 components (Windows default setting);

Type 0xffffffff to disable all IPv6 components except the IPv6 loopback interface. This value also configures Windows to prefer using IPv4 over IPv6 by changing entries in the prefix policy table.

[WSRV] FSMO Roles




    NetDOM /query FSMO



    There are five FSMO roles:
    • PDC emulator (one per domain): This role allows Windows Server 2003 to act as a Windows NT primary domain controller (PDC), and it provides replication support for Windows NT-based backup domain controllers (BDCs). In addition, this role assists with time and group policy synchronization.
    • Infrastructure master (one per domain): This role is responsible for updating the group-to-user references whenever the members of groups change or receive new names.
    • Relative ID (RID) master (one per domain): This role ensures that every object created has a unique identification number.
    • Schema master (one per forest): This role is responsible for maintaining and modifying the Active Directory schema.
    • Domain naming master (one per forest): This role is responsible for the addition and deletion of domains in a forest.

[WSRV] Telnet cmdlets





* Type NSLOOKUP
> set q=mx
> theirdomain.com

telnet mail.theirdomain.com 25

ehlo mydomain.com
EHLO - introduce yourself to the mail server HELO can also be used but EHLO tells the server to use the extended command set (not that we're using that).

mail from:<martin9700@mydomain.com>
MAIL FROM - who's sending the email. Make sure to place this is the greater than/less than brackets as many email servers will require this (Postini).

rcpt to:<recipient@theirdomain.com>
RCPT TO - who you're sending it to. Again you need to use the brackets. See Step #4 on how to test relaying mail!

DATA - tells the SMTP server that what follows is the body of your email. Make sure to hit "Enter" at the end. If you want a subject for your email type Subject:-type subject here- then press enter twice (these are needed to conform to RFC 882)

. - the period alone on the line tells the SMTP server you're all done with the data portion and it's clear to send the email.

QUIT - exits the TELNET session.


[WSRV] Reset VSS Writers






VSS Writer
Service Name
Service Display Name
ASR Writer
VSS
Volume Shadow Copy
BITS Writer
BITS
Background Intelligent Transfer Service
COM+ REGDB Writer
VSS
Volume Shadow Copy
DFS Replication service writer
DFSR
DFS Replication
DHCP Jet Writer
DHCPServer
DHCP Server
FRS Writer
NtFrs
File Replication
FSRM writer
srmsvc
File Server Resource Manager
IIS Config Writer
AppHostSvc
Application Host Helper Service
IIS Metabase Writer
IISADMIN
IIS Admin Service
Microsoft Exchange Writer
MSExchangeIS
Microsoft Exchange Information Store
Microsoft Hyper-V VSS Writer
vmms
Hyper-V Virtual Machine Management
NTDS
NTDS
Active Directory Domain Services
OSearch VSS Writer
OSearch
Office SharePoint Server Search
OSearch14 VSS Writer
OSearch14
SharePoint Server Search 14
Registry Writer
VSS
Volume Shadow Copy
Shadow Copy Optimization Writer
VSS
Volume Shadow Copy
SPSearch VSS Writer
SPSearch
Windows SharePoint Services Search
SPSearch4 VSS Writer
SPSearch4
SharePoint Foundation Search V4
SqlServerWriter
SQLWriter
SQL Server VSS Writer
System Writer
CryptSvc
Cryptographic Services
TermServLicensing
TermServLicensing
Remote Desktop Licensing
WINS Jet Writer
WINS
Windows Internet Name Service (WINS)
WMI Writer
Winmgmt
Windows Management Instrumentation

[WSRV] Netsh cmdlets



To switch the specified adapter from a static address to DHCP, type the following command:

netsh interface ip set address "Local Area Connection" dhcp

NOTE: Typing this command changes the interface named "Local Area Connection" to DHCP. 

To display all of the adapters in the computer with their current IP addresses to determine the correct adapter name, type the following command:

Netsh interface ip show config

To change to a static address, type the following command:

netsh interface ip set address "Local Area Connection" static ipaddr subnetmask gateway metric

NOTE: Replace ipaddr with the static IP address, subnetmask with the subnet mask, gateway with the default gateway and, if necessary, metric with the appropriate metric. The following example changes the interface "Local Area Connection" to a static address of 192.168.0.10 with a subnet mask of 255.255.255.0, and the interface has a default gateway of 192.168.0.1 with a metric of 1:

netsh interface ip set address "Local Area Connection" static 192.168.0.10 255.255.255.0 192.168.0.1 1

[WSRV] Disable Automatic Maintenance




Automatic Maintenance in Windows Server 2012 R2

psexec \\SERVERNAME -s schtasks /change /tn "\Microsoft\Windows\TaskScheduler\Maintenance Configurator" /DISABLE

In my scenario, I was testing this on my Hyper-V host, so I simply skipped the \\SERVERNAME switch.

psexec -s schtasks /change /tn "\Microsoft\Windows\TaskScheduler\Maintenance Configurator" /DISABLE

[EX2010] DisasterRecovery State





The problem is that exchange thing he is in a DisasterRecovery, but he isn't ??? To solve this issue:

- Start regedit
- Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ExchangeServer\v14.0\roleName
Here is the place that exchange says: DisasterRecovery. Just remove the key and try it again.

[EX2013] Exchange Build Versions




Exchange Server build numbers and release dates



 EXCHANGE 2013
Product name
Release date
Build number
June 17, 2015
15.00.1104.005
March 17, 2015
15.00.1076.9
December 9, 2014
15.00.1044.025
August 26, 2014
15.00.0995.029
May 27, 2014
15.00.0913.022
February 25, 2014
15.00.0847.032
November 25, 2013
15.00.0775.038
Exchange Server 2013 CU2
July 9, 2013
15.00.0712.024
Exchange Server 2013 CU1
April 2, 2013
15.00.0620.029
Exchange Server 2013 (RTM)
December 3, 2012
15.00.0516.032

 EXCHANGE 2010
Product name
Release date
Build number
June 17, 2015
 ​14.3.248.2
March 17, 2015
 ​14.3.235.1
December 12, 2014
14.03.0224.002
Update Rollup 8 v1 for Exchange Server 2010 SP3 (recalled)
December 9, 2014
14.03.0224.001
August 26, 2014
14.03.0210.002
May 27, 2014
14.03.0195.001
February 24, 2014
14.03.0181.006
December 9, 2013
14.03.0174.001
Update Rollup 3 for Exchange Server 2010 SP3
November 25, 2013
14.03.0169.001
Update Rollup 2 for Exchange Server 2010 SP3
August 8, 2013
14.03.0158.001
Update Rollup 1 for Exchange Server 2010 SP3
May 29, 2013
14.03.0146.000
February 12, 2013
14.03.0123.004


 EXCHANGE 2007

Product name
Release date
Build number
June 17, 2015
08.03.0417.0
March 17, 2015
08.03.0406.0
December 9, 2014
08.03.0289.002
August 26, 2014
08.03.0379.002
February 24, 2014
08.03.0348.002
December 9, 2013
08.03.0342.004
Update Rollup 11 for Exchange Server 2007 SP3
August 13, 2013
08.03.0327.001
Update Rollup 10 for Exchange Server 2007 SP3
February 11, 2013
08.03.0298.003
Update Rollup 9 for Exchange Server 2007 SP3
December 10, 2012
08.03.0297.002
Update Rollup 8-v3 for Exchange Server 2007 SP3
November 13, 2012
08.03.0279.006
Update Rollup 8–v2 for Exchange Server 2007 SP3
October 9, 2012
08.03.0279.005
Update Rollup 8 for Exchange Server 2007 SP3
August 13, 2012
08.03.0279.003
Update Rollup 7 for Exchange Server 2007 SP3
April 16, 2012
08.03.0264.000
Update Rollup 6 for Exchange Server 2007 SP3
January 26, 2012
8.03.0245.002
Update Rollup 5 for Exchange Server 2007 SP3
September 21, 2011
8.03.0213.001
Update Rollup 4 for Exchange Server 2007 SP3
May 28, 2011
8.03.0192.001
Update Rollup 3-v2 for Exchange Server 2007 SP3
March 30, 2011
8.03.0159.002
Update Rollup 2 for Exchange Server 2007 SP3
December 10, 2010
8.03.0137.003
Update Rollup 1 for Exchange Server 2007 SP3
September 9, 2010
8.03.0106.002
June 7, 2010
8.03.0083.006