• Hyper-V Did Not Find Virtual Machines to Import - Error 32784

    When importing a VM into Windows Server 2012 that was exported from Windows 2012 R2 you will be unable to import the VM.  If you import the VM using PowerShell’s Import-VM cmdlet the error message is not very descriptive – “The operation cannot be performed because the object is not in a valid state”.  You will also find EventID 15040 in the VMMS event log. 

    The operation cannot be performed because the object is not in a valid state

    The full error message for reference:

    Import-VM '.\Virtual Machines\F5164EF0-5F87-40F1-9872-C669406A18A5.XML'

    Import-VM : Failed to import a virtual machine.

    The operation cannot be performed because the object is not in a valid state.

    At line:1 char:1

    + Import-VM '.\Virtual Machines\F5164EF0-5F87-40F1-9872-C669406A18A5.XML'

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo : InvalidOperation: (Microsoft.HyperV.PowerShell.VMTask:VMTask) [Import-VM], Virtualizatio

    nOperationFailedException

    + FullyQualifiedErrorId : InvalidObjectState,Microsoft.HyperV.PowerShell.Commands.ImportVMCommand

     

    If you look in the Microsoft-Windows-Hyper-V-VMMS/Admin event log, EventID 15040 should be present, stating that “Failed to import a virtual machine”. 

    EventID 15040 Failed to import a virtual machine

    Not much to go on and troubleshoot there…

    Let’s retry this using the GUI…..

    If you used the Hyper-V Manager to import the same VM it provides a clue:

    Importing 2012 R2 Into 2012 Using Hyper-V Manager

    Importing 2012 R2 Into 2012 Using Hyper-V Manager

     

    Hyper-V Did Not Find Virtual Machines To Import From Location Error 32784

    Now that we have an error code, we can plug that into our favourite search engine.  Which should lead you to the following KB article:

    KB 2868279 Moving a virtual machine (VM) from a Windows Server 2012 R2 Hyper-V host to a Windows Server 2012 Hyper-V host is not a supported scenario under any circumstances.


    I wanted to publish this quick post so folks who gravitate to importing via PowerShell can search and easily find the cause of the issue since it is the GUI that provides the clue.

    Cheers,

    Rhoderick

  • Exchange 2013 CU6 Released

    Exchange 2013 CU6 has been released to the Microsoft download centre!  Exchange 2013 has a different servicing strategy than Exchange 2007/2010 and utilises Cumulative Updates (CUs) rather than the Rollup Updates (RU/UR) which were used previously.    CUs are a complete installation of Exchange 2013 and can be used to install a fresh server or to update a previously installed one.  Exchange 2013 SP1 was in effect CU4, and CU6 is the second post SP1 release.  CU6 contains AD DS schema changes so please test and plan accordingly!

    Update 1-9-2014:  If you are deploying into a mixed environment with Exchange 2007, you need to review KB2997209 Exchange Server 2013 databases unexpectedly fail over in a co-existence environment with Exchange Server 2007

    Update 1-9-2014: Please also review the comments here for an issue that affects Hybrid mailboxes. 

    Update 9-9-2014: If you are deploying into a mixed environment with Exchange 2007, you also need to review KB 2997847 You cannot route ActiveSync traffic to Exchange 2007 mailboxes after you upgrade to Exchange 2013 CU6

    Exchange 2013 CU6 Download

    This is build 15.00.0995.029  of Exchange 2013 and the update is helpfully named Exchange2013-x64-cu6.exe.  Which is a great improvement over the initial CUs that all had the same file name!  Details for the release are contained in KB2961810.

     

    Updates Of Particular Note

    • CU6 includes significant improvements in Public Folder scalability
    • 2988229 Hybrid Configuration wizard error "Subtask CheckPrereqs execution failed" for Exchange Server 2013 (if you installed the IU, it does not have to be removed prior).
    • 2986779 EMS takes a long time to execute the first command in an Exchange Server 2013 Cumulative Update 5 environment
    • 2983512 RPC Client Access service crashes on an on-premises Mailbox server in an Exchange Server 2013 hybrid environment
    • 2975599 Exchange Server 2010 public folder replication fails in an Exchange Server 2013 environment
    • 2975003 Calendar item body disappears in Outlook online mode in an Exchange Server 2013 environment

     

    Issues Resolved

    • 2991934 Duplicate mailbox folders after migration to Exchange Server 2013
    • 2988229 Hybrid Configuration wizard error "Subtask CheckPrereqs execution failed" for Exchange Server 2013
    • 2986779 EMS takes a long time to execute the first command in an Exchange Server 2013 Cumulative Update 5 environment
    • 2983512 RPC Client Access service crashes on an on-premises Mailbox server in an Exchange Server 2013 hybrid environment
    • 2983426 AutodiscoverSelfTestProbe fails when external URL is not set for EWS virtual directory in Exchange Server 2013
    • 2983423 AutodiscoverSelfTestProbe fails when external URL is not set for ECP virtual directory in Exchange Server 2013
    • 2983422 The ServerWideOffline component is set to Inactive after Exchange Server 2013 prerequisite check fails
    • 2983207 "532 5.3.2" NDR when you send an email message to a hidden mailbox in an Exchange Server 2013 environment
    • 2983066 Removed Default or Anonymous permission for Outlook folders cannot be restored in an Exchange Server 2013 environment
    • 2982769 "Topology service cannot find the OWA service" when you perform an eDiscovery search in Exchange Server 2013
    • 2982763 Mail-enabled public folder accepts email messages from unauthorized users in an Exchange Server 2013 environment
    • 2982762 OAB generation arbitration mailbox can be removed or disabled in an Exchange Server 2013 environment
    • 2982760 The Enter key submits duplicate sign-in forms to Outlook Web App in an Exchange Server 2013 environment
    • 2982759 You cannot access the archive mailbox of a delegated user after enabling MAPI over HTTP
    • 2982017 Incorrect voice mail message duration in an Exchange Server 2013 environment
    • 2981835 You cannot add attachments, delete or move many email messages in bulk in Outlook Web App
    • 2981466 MAPI/CDO client cannot connect to Exchange Server 2013
    • 2977279 You cannot disable journaling for protected voice mail in an Exchange Server 2013 environment
    • 2975599 Exchange Server 2010 public folder replication fails in an Exchange Server 2013 environment
    • 2975003 Calendar item body disappears in Outlook online mode in an Exchange Server 2013 environment
    • 2974339 OAB generation fails if FIPS is used in an Exchange Server 2013 environment
    • 2971270 Blank page after you sign in to Exchange Server 2013 EAC (formerly ECP)
    • 2970040 Folder Assistant rule does not work correctly in an Exchange Server 2013 environment
    • 2965689 EAS device cannot sync free/busy status if an item is created by EWS in an Exchange Server 2013 environment
    • 2963590 Message routing latency if IPv6 is enabled in Exchange Server 2013
    • 2961715 "Something went wrong" error in Outlook Web App may show an incorrect date
    • 2958434 Users cannot access mailboxes in OWA or EAS when mailbox database is removed
    • This update also includes new daylight saving time (DST) updates for Exchange Server 2013.

     

    Some Items For Consideration

    As with previous CUs, CU6 follows the new servicing paradigmthat was previously discussed on the blog.  The CU6 package can be used to perform a new installation, or to upgrade an existing Exchange Server 2013 installation to CU6.  You do not need to install Cumulative Update 1 or 2 for Exchange Server 2013 when you are installing CU6.  Cumulative Updates are well, cumulative.  What else can I say…

    After you install this cumulative update package, you cannot uninstall the cumulative update package to revert to an earlier version of Exchange 2013. If you uninstall this cumulative update package, Exchange 2013 is removed from the server.

    Note that customised configuration files are overwritten on installation.  Make sure you have any changes fully documented!

    CU6 contains AD Schema updates – please test and plan accordingly!

    Please enjoy the update responsibly!

    What do I mean by that?  Well, you need to ensure that you are fully informed about the caveats with the CU  and are aware of all of the changes that it will make within your environment.  Additionally you will need to test the CU your lab which is representative of your production environment.

    Cheers,

    Rhoderick

  • Exchange 2010 SP3 RU7 Released

    The Exchange team today announced the availability of Update Rollup 7 for Exchange Server 2010 Service Pack 3. RU7 is the latest rollup of customer fixes available for Exchange Server 2010. The release contains fixes for customer reported issues and previously released security bulletins.  For example, the security issue that was addressed in Exchange 2010 SP3 RU4 is contained in RU7.

    Exchange 2010 SP3 RU7 Download

    This is build 14.03.0210.002 of Exchange 2010, and KB2961522 has the full details for the release

    Note that this is for the Service Pack 3 branch of Exchange code.  Why?  Exchange 2010 SP2 exited out of support on the 8th of April 2014 and will no longer receive updates. 

     

    Updates Of Particular Note

    • 2976887 eDiscovery search fails if an on-premises Exchange Server 2010 mailbox has an Exchange Online archive mailbox
    • 2966923 Domain controller is overloaded after you change Active Directory configurations in Exchange Server 2010
    • 2980300 Event 4999 is logged when the World Wide Web publishing service crashes after you install Exchange Server 2010 SP3

     

    Issues Resolved

    • 2983261 "HTTP 400 - Bad Request" error when you open a shared mailbox in Outlook Web App in an Exchange Server 2010 environment
    • 2982873 Outlook Web App logon times out in an Exchange Server 2010 environment
    • 2980300 Event 4999 is logged when the World Wide Web publishing service crashes after you install Exchange Server 2010 SP3
    • 2979253 Email messages that contain invalid control characters cannot be retrieved by an EWS-based application
    • 2978645 S/MIME option disappears when you use Outlook Web App in Internet Explorer 11 in an Exchange Server 2010 environment
    • 2977410 Email attachments are not visible in Outlook or other MAPI clients in an Exchange Server 2010 environment
    • 2976887 eDiscovery search fails if an on-premises Exchange Server 2010 mailbox has an Exchange Online archive mailbox
    • 2976322 Assistant stops processing new requests when Events in Queue value exceeds 500 in Exchange Server 2010
    • 2975988 S/MIME certificates with EKU Any Purpose (2.5.29.37.0) are not included in OAB in Exchange Server 2010
    • 2966923 Domain controller is overloaded after you change Active Directory configurations in Exchange Server 2010
    • This update also includes new daylight saving time (DST) updates for Exchange Server 2010 SP3

     

    Important Notes

    Now, before we rush off to download and install this there are a couple of items to mention!

    • Test the update in your lab before installing in production.  If in doubt test…

    • If the Exchange server does not have Internet connectivity then this introduces significant delay in building the Native images for the .Net assemblies as the server is unable to get to http://crl.microsoft.com.  To resolve this issue, follow these steps:

      1. On the Tools menu in Windows Internet Explorer, click Internet Options, and then click the Advanced tab.

      2. In the Security section, click to clear the Check for publisher's certificate revocation check box, and then click OK.

      We recommend that you clear this security option in Internet Explorer only if the computer is in a tightly controlled environment. When setup is complete, click to select the Check for publisher’s certificate revocation check box again.

    • Update Internet facing CAS servers first

    • Backup any OWA customisations as they will be removed

    • Test (yes technically this is in here for a second time but it is important!)

     

    Cheers,

    Rhoderick

  • Back To The Real World

    You may have noticed that I’ve been a bit quiet on the blog, TechNet forums and also replying to comments.  I took some time off to go back to Europe for a few weeks travelling around Malta and Scotland.  Will get back to normal soon, just have to slash through my inbox and get that under control!

    After enjoying this:

    Glorious Maltese Summer Day

     

    It was time for the below views at Glencoe:

    Glorious Scottish Summer Day

    While this is all nice and green (even without the filter applied to it), just think about the amount of rain that this takes to keep it so green.  And in Scotland rain = midgies. *

     

    Cheers,

    Rhoderick

    * – For those who are lucky enough not to have experienced midgies they are just as annoying as mosquitoes and sometimes even more so!

  • PowerShell Input Output Escapades

    After using various types, architectures and generations of computers over the years there is always the habit of “you go to what you know!”  In other words once you figure out a solution to an issue, you then use that repeatedly in the future as you know the process/steps involved.  This adroitly describes me when it comes to doing certain command line tasks.  If I were being a bit more unkind to myself, then I could also use the saying “If all you have is a hammer, all you see are nails”. 

    Sometimes I like to mix it up and combine PowerShell commands with output from the cmd prompt since I have known ways of doing certain tasks.  This is all good, until you start parsing output from PowerShell in the cmd prompt and get no matches/returns/hits on the data even though you know that there are matches within the data. 

    For example you might do the following:

    • Use PowerShell to parse IIS or Exchange logs
    • Use PowerShell to remove duplicates from a list
    • Use the venerable FOR command in a cmd prompt to pull certain tokens out of the returned data

    However there are no results returned from the cmd prompt. 

    This is a case of data types and their evolution over time.  Let’s take a look at an example and how to address it.

     

    Current Day - 1.21 GIGAWATTS of PowerShell Awesomeness

    In this example, we shall use PowerShell to parse the IIS logs to get a list of all the Outlook 2010 users who hit the /Autodiscover virtual directory, from a particular domain in the forest.  We will look for hits to the Autodiscover.xml file from Outlook version 14.0 and ensure that the user is from one specific domain in our AD forest, this is the “Contoso” domain.  The results will be outputted to the test file called Autodiscover.txt.  This is in the $PWD – the present working directory:

    Get-ChildItem  -Recurse -Filter *.log | Get-Content | Where-Object  {$_ -Match "Microsoft\+Outlook\+14.0" -And $_ -Match "Contoso" -And $_ -Match "POST /Autodiscover/autodiscover.xml"} | Out-File $PWD\Autodiscover.txt

    Using PowerShell To Search IIS Log For Phrase And Match Domain  And URL Called

    As you can see, the command completes and exists in the current folder - All good!    You may be wondering about the –Recurse option.  If we were parsing IIS logs from lots of servers, then typically they would be copied to one central location in the format of   TopFolder\Server\IIS logs.  Or expressed another way:

    TopFolder

    Server1

    Log1.log

    Log2.log

    Server2

    Log1.log

    Log2.log 

     

    Using Get-Content, we can then look at the content of the Autodiscover.txt file.  The content of the file is what we’d expect, lines containing the phrases we specified in the PowerShell search:

    Inspecting Saved Content From PowerShell - Visible Using Get-Content

    An example line would be:

    2010-11-12 09:07:02 192.168.2.15 POST /Autodiscover/Autodiscover.xml – - 443 CONTOSO\DFunker 192.168.5.10 Microsoft+Office/14.0+(Windows+NT+6.1;+Microsoft+Outlook+14.0.4760;+Pro) 200 0 0 3411

     

    Set Time Circuits To November 5, 1955 1995

    Now since I have a penchant for the Findstr.exe command.  The below example parses the file splitting using the specified delimiters and then retrieving tokens %a and %b.    Using this, let’s then try to search the output from the above command using the cmd prompt:

    FOR /F  "Tokens=10,13 Delims=,; " %a IN (Autodiscover.txt)  DO @ECHO %a %b

    Inspecting Saved Content From PowerShell - NOT Visible Using CMD

    Hmm.  No results, but we already saw that there is content in the file.  What gives? 

     

    Great Scott!

    The issue is that we are looking at utilities that were created in different computing eras.  A lot has changed in computing, and localisation of content is one.  Previously ASCII could be used quite happily, but nowadays UNICODE is typically the default option as it supports double byte characters. 

    To detect the current format of the file we can use PowerShell to inspect it with a script.  Alternatively, open up the file in notepad and do a “Save As”.  Notepad will default to the current encoding type and file location.  We can see that the output file from PowerShell was encoded in UNICODE. 

    Poor Option To View Encoding Type - Notepad Save As

    UNICODE is the default encoding from the Out-File cmdlet, but we can change this quite easily by adding the Encoding parameter.  Valid values are "Unicode", "UTF7", "UTF8", "UTF32", "ASCII", "BigEndianUnicode", "Default", and "OEM".

    "Default" uses the encoding of the system's current ANSI code page.

     

    Back To The Future

    So this time around, let’s tell Out-File to encode as ASCII and save as Autodiscover-v2.txt

    PowerShell Output - Default Endoding Changed To ASCII

    Get-ChildItem  -Recurse -Filter *.log | Get-Content | Where-Object  {$_ -Match "Microsoft\+Outlook\+14.0" -And $_ -Match "Contoso" -And $_ -Match "POST /Autodiscover/autodiscover.xml"} | Out-File $PWD\Autodiscover-v2.txt  -Encoding ASCII

     

    Now, if we look at the contents of Autodiscover-v2.txt  the FOR command gets results:

    Inspecting Saved Content From PowerShell - Visible Using CMD

     

    The net result is that I get to keep on running batch file commands from the 90s!

     

    Cheers,

    Rhoderick