Wednesday, September 16, 2015

Enterprise Vault: useful query to find the date range of emails stored in the index

(... run against the Vault Store database...)

SELECT MIN (recordcreationdate) AS 'Oldest Item Date'
, MAX (recordcreationdate) AS 'Youngest Item Date'
FROM JournalArchive

WHERE IndexSeqNo BETWEEN 121649147 AND 126649435 '(numbers found in the Enterprise Vault Admin Console for Index Volume)'

Friday, September 11, 2015

Lync: Get-CsManagementStoreReplicationStatus does not display information after CSManagementStore moved from Lync 2010 to Lync 2013

After successful move of CSManagementStore from Lync 2010 to Lync 2013, Get-CsManagementStoreReplicationStatus runs without any errors, but without results either.

Turns out that replication is broken after moving CSManagementStore due to the fact that "Lync Server Master Replicator Agent" service is not started on Lync 2013 Front End Server.

Starting "Lync Server Master Replicator Agent" takes care of the issue.


Monday, August 31, 2015

Resolve-DNSName: useful addition to Powershell commands

Resolve-DNSName (available in Windows 2012 R2 version of Powershell) is very useful command to obtain various statistics about DNS zone.

For example, if zones.txt file consists of the zones to check following command will help to find SOA record for every zone in the file:

Get-Content zones.txt | Resolve-DnsName -Type SOA | Select-Object Name, PrimaryServer | Export-Csv zones.csv -notype

Good article about usage of the command: http://exchangeserverpro.com/use-powershell-to-quickly-check-multiple-mx-records/

GPO settings are not listed (as they should per Microsoft article)

You may notice that the settings to be configured by GPO are not listed in your configuration.
The reason of that: specific settings are issued with KB update that got installed on the domain controllers, but not into the SYSVOL location of domain controllers.
To fix the issue you have to manually move the new policy definitions files to the proper location:

  1. Copy @.adml file from c:\windows\policydefinitions\en-us to your local sysvol location under sysvol\policydefinitions\en-us.
  2. Copy @.admx file from c:\windows\policydefinitions to your local sysvol location under sysvol\policydefinitions.


Thursday, May 28, 2015

Granular permissions to move Computer Objects out of Computers Container in Active Directory

To configure granular permissions to move computer objects out of Computers container in Active Directory follow the steps:
  1. Use ADSIEdit/open "Default naming context".
  2. Navigate to Computers container/Security/Advanced.
  3. Desired group along with obvious permissions ("Delete Computer Objects" for "This object only", "List contents", "List object" and "Read all properties" for "This object only") needs to have "Allow" permission for "Write all properties" for "Descendant Computer objects".

Friday, February 6, 2015

List of Users with expired password - Quest Powershell

Get-QADUser -SearchRoot "OU=YourOU,DC=YourDomain,DC=com" -SearchScope Subtree -Enabled -Size 0 | Where-Object {($_.PasswordIsExpired) -eq $True} | fl displayname, *password*

Tuesday, February 3, 2015