Tuesday, July 9, 2013

Office 365 Powershell command(s) for DIRSYNC

I had an interesting session with the Office365 technical Support team and learned a few new commands today.

The first this to remember is that there are 3 possible system scenarios for running Powershell command:
  • A  system with DIRSYNCinstalled
  • An On-Premise Exchange management System
  • Any other computer with Neither of the able installed.
The goal here is to run PowerShell with the necessary privileges and Snapins to be able to perform the tasks.

At one point, the Support Technician wanted me to run "Get-Mailbox" and also "Start-OnlineCoexistenceSync".

GET-MAILBOX
The Get-Mailbox commandlet sounds easy, but remember that this is for Office365, not the on-premise Exchange.
To run this commandlet, we were able to perform the task on any PC.  (It does not need to be in the domain of the Dirsync server.)
Type to following commands:
PS C:\Windows\system32> Set-ExecutionPolicy unrestricted
PS C:\Windows\system32> $cred = Get-Credential
PS C:\Windows\system32> $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionURI https://ps.outlook.com/powershell/ -Credential $cred -Authentication Basic -AllowRedirection
PS C:\Windows\system32> Import-PSSession $session
PS C:\Windows\system32> Get-Mailbox


Start-OnlineCoexistenceSync
 The Start-OnlineCoexistanceSync commandlet needs to be run on the server that has DIRSYNC installed.  It also must be run in Powershell with Elevated Previledges.

PS C:\Windows\system32>Add-PSsnapin Coexistence-Configuration

(Note: for this step, there is a PSC1 file in C:\Program Files\Microsoft Online Directory Sync, but the above command works.)
PS C:\Windows\system32> Start-OnlineCoexistenceSync

Note that you will not get any feedback from this command, but if you launch
"C:\Program Files\Microsoft Online Directory Sync\SYNCBUS\Synchronization Service\Bin\MIICLIENT.EXE", you will see 3 events that occur when a synchronization occurs.



Friday, July 5, 2013

Be Careful upgrading Hyper-V Integration Services. Can Break Exchange 2007

Scenario:
We are running a hosting environment of Windows 2012 Hyper-V, with Virtual Servers running Windows 2008 R2.  In this environment, we also are running Exchange 2007.

If you examine the status of a VM in the Hyper-V manager, you may notice that the Integration Services is running in a "degraded" state and is not fully functional.  Example: it does not show the IP address of the VM.
Hyper-V Manager on a Windows 2012 showing the Networking status of a VM which has the original version of Integration Services in a Windows 2008 R2 Server, out of the box.

Note that the version of Integration Services that comes in Windows 2008 R1 is reported as version 6.1.  Hyper-V 2012 would have you install version 6.2.

Well, I elected to install the newer version by simply clicking the menu to select to install the new version from the mounted disk.


The Problem:
A reboot was required to complete the Integration Services upgrade.
After the reboot, Exchange would not mount one of the databases.

The error was, in part, in the event log said "Error -546, unable to read the header of log file E01.log".
Also, when a repair is attempted, "JET_errorLogSectorSizeMismatch, -546".


An examination of the database that would not mount showed that it was in a Dirty-Shutdown status.

All attempts to run eseutil to repair or cleanup the problem resulted in the above errors.  Error -546.

The Solution:
We theorized that the Integration Services upgrade had caused the problem, but how to confirm this? 
Easy:  we shut down the VM, mounted the disks temporarily on a VM of the same OS but with the original Integration Services, and low and behold!  We were able to easily run the eseutil commands to clean up the database and return it to a "Clean Shutdown" state.

Root Cause:
See this article regarding disk geometry, and you will quickly see that there is an opertunity to create a disk on new OS's, that is not compatible with some older applications, such as dare I say, Exchange 2007.
Now this is not a problem unless you have a database that is in a "Dirty-Shutdown" state and it needs files that were saved using the "old" disk geometry, but reside on the new Geometry. 

See http://support.microsoft.com/kb/2510009

It appears that Exchange (at least version 2007 ) is one of the "incompatible applications" mentioned in the above link.

My advice?  Do not upgrade the Integration Services unless you have tested EVERYTHING.  Don't assume that it will all be ok.

Additional References:
http://blogs.technet.com/b/exchange/archive/2013/04/24/exchange-2010-database-availability-groups-and-disk-sector-sizes.aspx

Wednesday, July 3, 2013

How to remove hidden devices (Network Card)

To display devices when you click Show hidden devices:
  1. Click Start, point to All Programs, point to Accessories, and then click Command Prompt.
  2. At a command prompt, type the following command , and then press ENTER:
    set devmgr_show_nonpresent_devices=1
  3. Type the following command a command prompt, and then press ENTER:
    start devmgmt.msc
  4. Troubleshoot the devices and drivers in Device Manager.

    NOTE: Click Show hidden devices on the View menu in Device Managers before you can see devices that are not connected to the computer.

Tuesday, June 25, 2013

IT Information Favorite Links

Reference
Cloud
Exchange

Office365

Some DNS queries are unsuccessful after deploying a Windows Server 2008 R2 DNS server

Some DNS name queries are unsuccessful after you deploy a Windows Server 2008 R2-based DNS server.  It seems inconsistent but it all depends on the DNS Name being called.  (BMO.COM always exhibits the problem)

http://support.microsoft.com/kb/832223

 
Scenario:
  1. Clear DNS cache on the server:
    dnscmd /clearcache
  2. Run NSLOOKUP
  3. Set type=all
  4. BMO.COM
    Notice that the first attempt times out.  Repeated attempts will eventually be successful.
  5. Workaround:
    Type:
    dnscmd /config /enableednsprobes 0
 

Monday, June 24, 2013

Cisco AnyConnect VPN and WIN8

How to fix “AnyConnect was not able to establish a connection” or “VPN client driver encountered an error” Cisco AnyConnect VPN error messages.

Found this on another blog post, so I won't take credit for it. Just put the following in a .REG file and import it.
 
Windows Registry Editor Version 5.00

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\vpnva]
"DisplayName"="Cisco AnyConnect VPN Virtual Miniport Adapter for Windows x64"

Also, see:
http://furycomputing.wordpress.com/2012/12/29/how-to-fix-anyconnect-was-not-able-to-establish-a-connection-or-vpn-client-driver-encountered-an-error-cisco-anyconnect-vpn-error-messages/


Symptom:
After installing (or Re-installing) the Cisco AnyConnect Client on Windows 8, unable to initialize the NIC.  Error is “AnyConnect was not able to establish a connection to the specified secure gateway.  Please try connecting again”

The Fix is to correct an error in the Description string for the VPN Connection in the registry.
  • Run Regedit
  • Navigate to the key Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\vpnva
  • Open the properties of the key DisplayName
  • The test will look something like this:
@oem20.inf,%vpnva_Desc%;Cisco AnyConnect VPN Virtual Miniport Adapter for Windows x64
  • Change the field to:

Cisco AnyConnect VPN Virtual Miniport Adapter for Windows x64

by removing all the text and characters that are on the left of the word Cisco.   
  • Exit Regedit and try again.

Sunday, May 19, 2013

Citrix Receiver spawning multiple SelfServicePlugin.exe processes

Re: Citrix Receiver 3.1 spawning multiple SelfService.exe processes

Update 7/12/2013: I am told that this issues has been fixed with the latest release of the receiver, Version 4.  It was released June 26, 2013

Current Info:
Download and install version 4.0 of the receiver. 
http://www.citrix.com/downloads/citrix-receiver.html

Previous Info:
Fix 1)
Download the Citrix Receiver and install it with the following command line:
CitrixReceiver.exe ADDLOCAL=ReceiverInside,ICA_Client,USB,DesktopViewer,Flash,Vd3d /silent

This will install everything BUT selfservice.exe

Fix 2)
Or if the installation file is called CitrixReceiverWeb.exe, enter the following command line:
CitrixReceiverWeb.exe ADDLOCAL=ReceiverInside,ICA_Client,USB,DesktopViewer,Flash