31 August 2014

Database Seeding cmdlets

Get Database Copy StatusGet-MailboxDatabaseCopyStatus -Identity ‘EX10mbx01′ | ft name,Status,ContentIndexState,ReplayQueueLength,CopyQueueLength -autosize

Status for all database copies on the Mailbox server EX10CHM10 by status
Get-MailboxDatabaseCopyStatus -Server EX10CHM01 | Sort-Object -Property Status| ft mailboxserver,DatabaseName, status,Copyqueuelength,Replayqueuelength, ContentIndexState, ActiveCopy,ErrorMessage -AutoSize

UPDATE Seed a copy of a database named EX10mbx08 on EX10CHM01 using EX10CHM04 as the source Mailbox server for the seed
Update-MailboxDatabaseCopy -Identity EX10mbx01\EX10CHM02 -SourceServer EX10CHM01

UPDATE Seed a copy of a database named EX10mbx08 on EX10CHM01 using EX10CHM04 as the source Mailbox server for the seed (remove existing files)
Update-MailboxDatabaseCopy -Identity EX10mbx48\EX10CHM07 -sourceserver EX10CHM09 -DeleteExistingFiles

Update the Database using a source server and delete existing files
Update-MailboxDatabaseCopy -Identity EX10mbx02\EX10CHM10 -DeleteExistingFiles

Update ONLY the Database using a source server and delete existing files
Update-MailboxDatabaseCopy -Identity EX10mbx06\EX10CHM12 -SourceServer EX10CHM11 -DatabaseOnly -DeleteExistingFiles

Update Catalog Only
Update-MailboxDatabaseCopy -identity EX10mbx01\EX10CHM11 –CatalogOnly

Update Database Only without seeding the content index catalog
Update-MailboxDatabaseCopy -identity EX10mbx07\EX10CHM12 –Databaseonly

UPDATE the Catalog on EX10mbx08 on EX10CHM01 using EX10CHM04 as the source Mailbox server for the seed
Update-MailboxDatabaseCopy -Identity EX10mbx46\EX10CHM04 -SourceServer EX10CHM05 -catalogonly
Update-MailboxDatabaseCopy -Identity EX10mbx22\EX10CHM05 -DeleteExistingFiles

Resume all Copies in FailedandSuspended
Get-MailboxDatabase | Get-MailboxDatabaseCopyStatus | where {$_.Status -eq “FailedandSuspended”}| Resume-MailboxDatabaseCopy

Resume all Copies in Failed state on Server
Get-MailboxDatabase -server EX10CHM03| Get-MailboxDatabaseCopyStatus | where {$_.Status -eq “Failed”}| Resume-MailboxDatabaseCopy

Resume Database Copy for all Databases located on Server
Get-MailboxDatabaseCopyStatus -Server EX10CHM07 | Resume-Mailboxdatabasecopy
Resume-MailboxDatabaseCopy -Identity EX10mbx01\EX10CHM09

Suspend Mailbox Database Copy
Suspend-MailboxDatabaseCopy -Identity EX10mbx01\EX10CHM11 -SuspendComment “Maintenance ” -Confirm:$False

Suspend all Copies in Failed state on Server
Get-MailboxDatabase -server EX10CHM10| Get-MailboxDatabaseCopyStatus | where {$_.Status -eq “Failed”}| Suspend-MailboxDatabaseCopy
Get-MailboxDatabaseCopyStatus -Server EX10CHM01 | Suspend-MailboxDatabaseCopy

Add Mailbox Database Copy
Add-MailboxDatabaseCopy -Identity ‘EX10mbx01′ -MailboxServer ‘EX10CHM09′

Add Mailbox Database Copy (SEEDING POSTPONED)
Add-MailboxDatabaseCopy -Identity EX10mbx01 -MailboxServer EX10CHM11 -SeedingPostponed
MOVE ACTIVE DATABASE


Set Active Mailbox Database Copy
Move-ActiveMailboxDatabase -Identity ‘EX10mbx12′ -ActivateOnServer ‘EX10CHM04′ -MountDialOverride ‘None’

Set Active Mailbox Database Copy with failed Catalog
Move-ActiveMailboxDatabase -Identity ‘EX10mbx01′ -ActivateOnServer ‘EX10CHM01′ -MountDialOverride ‘None’ -SkipClientExperienceChecks

Remove Mailbox Database Copy
Remove-MailboxDatabaseCopy -Identity EX10MBX03\EX10CHM11 -Confirm:$False
Context Index


Disable Indexing on Mailbox Database
Set-MailboxDatabase “EX10MBX07″ -IndexEnabled $false

Enable Indexing on Mailbox Database
Set-MailboxDatabase “Mailbox Database EX10MBX03″ -IndexEnabled $true

Finding the passive Databases with Failed Index (can’t update the index on the active DB)
Get-MailboxServer | Get-MailboxDatabaseCopyStatus | ? {$_.Status -ne “Mounted” –and $_.ContentIndexState -eq “Failed”} | ft -autosize

Fix the Passive databases with Failed Index
Get-MailboxServer | Get-MailboxDatabaseCopyStatus | ? {$_.Status -ne “Mounted” –and $_.ContentIndexState -eq “Failed”} | Update-MailboxDatabaseCopy –CatalogOnly

Fix all Passive databases with Failed Index per Database
Get-MailboxDatabaseCopyStatus -identity EX10mbx01\* | ? {$_.Status -ne “Mounted” -and $_.ContentIndexState -eq “Failed”} | Update-MailboxDatabaseCopy -CatalogOnly

30 August 2014

Windows server 2012 task manager missing disk and network performance counters

I keep reading on some fora that this setting should not be used in a production envoironment, so try at your own risk or test first. 

Enabling Task manager Disk Performance Counters
 

  1. Ensure Task Manager is closed.
     
  2. Launch the Command Prompt using the "Run as Administrator" option.
     
  3. Enter the following at the Command Prompt:
     
    diskperf -Y
     
  4.  Hit Enter.
     
  5. Close the Command Prompt.
     
  6. Re-open the Task Manager

25 August 2014

Resolving DirectAccess Connectivity Issues

The NRPT

Direct Access utilizes a feature called the Name Resolution Policy Table (NRPT). This basically controls the way DirectAccess handles name resolution for specific Domains. Entries in the NRPT control where client machines look for name resolution on specific domains and allow finer control of what happens when client machines are utilizing DirectAccess for connectivity. For instance, you can utilize the NRPT to force client machines to look to external DNS servers for resolution on some hostnames or domain zones, while looking to internal DNS for everything else and vice versa. There are really only two ways to modify the NRPT, through the Registry (I don’t recommend modifying the NRPT through the registry), and through group Policy using the Name Resolution Policy node. Technet has some information on how to handle NRPT here: NRPT

The Problem with DirectAccess Failures

Usually when DirectAccess stops communicating, it stops working because the NRPT isn’t configured properly. If this happens, you may run into a situation where some systems are unable to ping domain controllers or other systems by using NetBIOS names or through FQDNs. This can be a huge problem, because if DirectAccess fails, systems will typically no longer be able to communicate with the Domain to retrieve corrected NRPT information, since this information is deployed via GPO.

Fixing the Communication Issue

If something causes your DirectAccess configuration on a client machine to corrupt or if Direct Access isn’t properly configured, it may be necessary to reset the NRPT on the client machine to fix the problem. The only way to modify the NRPT on a client machine is through the registry. If you’re experienced enough with DirectAccess, you may be able to resolve the issue directly in the registry. However, it is usually easier to just remove the existing NRPT entries on the client machine entirely. This has to be done in the registry at the following location: HKLM\Software\Policies\Microsoft\Windows NT\DNSClient\DNSPolicyConfig (Pictured below)

NRPTreg

Note the two entries there. Both are composed of DA-{GUID}. DA stands for DirectAccess. Remove any entries that have that DA- prefix and reboot. Once this is done, the system will begin communicating without DirectAccess and will have the ability to connect to the domain to retrieve new NRPT information if it is available.

After deleting the entries, you can either reboot or restart the DNS client service and do a gpupdate /force.

Source