Blog - Title

July, 2009

  • New Directory Services KB Articles/Blogs 7/12-7/26

    KB Articles


    The private key description field always displays "CryptoAPI Private Key," and you cannot change the text on computers that are running Windows Server 2003 or Windows XP x64 Professional


    Certificates are unusable when you import a PEX file to a computer that is running Windows Vista or Windows Server 2008


    Applications that reply on the RPC service are blocked in Windows Vista SP1 or Windows Server 2008 when you block Windows Firewall incoming connections and enable remote management


    The Group Policy Management MMC snap-in stops responding on a computer that is running Windows Vista or Windows Server 2008 when you select a Group Policy object in a domain that has lots of organizational units


    The Terminal Server Licensing MMC snap-in or the TS Licensing Manager MMC snap-in uses NT LAN Manager instead of the Kerberos protocol to pass authentication, respectively, in Windows Server 2003 or in Windows Vista and Windows Server 2008


    Windows Explorer stops responding for approximately 30 seconds when you try to access the DFS resources in a Windows Server 2008 domain


    Network bindings are incorrect after you change a network adapter's configuration on a computer that is running Windows Vista or Windows Server 2008


    The upgrade from Windows Server 2008 to Windows Server 2008 R2 fails if you have applied some TCP-A and NetDMA settings before the upgrade


    A warning message is returned from the W32Time service when you run the dcdiag command on Windows Server 2008 against a Windows Server 2008 R2 domain controller


  • Active Directory Recycle Bin in Windows Server 2008 R2

    Ned here again. Now that the moratorium has ended, I can start talking about new features in Windows 7 and Windows Server 2008 R2. To get things rolling today, I wanted to give you a very brief introduction to the AD Recycle Bin. It's brief because we expect a lot of folks will be using this and we already have a lot of good step-by-step documents released - so I am just going to point you to there and set you loose. Feel free to use the Release Candidate version of Win2008 R2 of this until we start throwing RTM ISO's out there; RC's pretty much feature complete, and Recycle Bin works.

    For those that haven't been keeping up, AD Recycle Bin allows admins to restore deleted objects like users, groups, computers, OU's, etc without the need for an authoritative restore or backup tapes. If you ever been on the wrong end of some mullet head accidentally zapping 10,000 user accounts with his 'provisioning script', this is the feature for you. It has these requirements:

    • Windows Server 2008 R2 DC(s)
    • Windows Server 2008 R2 Forest Functional Level

    For further introduction, check out:

    What's New in AD DS: Active Directory Recycle Bin (TechNet)

    For a complete step-by-step guide, check out:

    Active Directory Recycle Bin Step-by-Step Guide (TechNet)

    For two very useful sample scripts (did I mention that Recycle Bin administration is implemented in AD Powershell?):

    Appendix B: Restore Multiple, Deleted Active Directory Objects (Sample Script) (TechNet)
    Inspecting Deleted Objects before Restore (AD PowerShell Blog)

    I'll be happy to answer any questions you have on this here. Have a nice weekend testing :-).

     - Ned 'Go Green' Pyle

  • Done

    Ned here. Windows 7 client, Windows Server 2008 R2, and Windows Server 2008 R2 Hyper-V Standalone are RTM.

    Read more here on when you can get what, and other high-fiving amongst ourselves:

    Ned 'Working on Windows 8' Pyle

  • How to Migrate the AzMan Store

    David Everett here again. I’ve had a couple customers contact me wanting to migrate an Authorization Manager (Azman) store and I thought others wishing to do the same might find this useful. This need typically arises when someone has been testing AzMan in a test domain and they want to preserve all of the time and effort by moving the AzMan store to their production domain, or they may find they want to run AzMan using an XML file instead of Active Directory. For those who are not aware of what Authorization Manger is, it is a role-based access control (RBAC) framework which applications can use to perform Role Based authentication. Role-based authentication grants permissions to users who have been assigned to certain roles to perform job functions allowing them to perform related tasks within the application. Azman.msc is the MMC snap-in used to manage these roles which can be stored in an XML file or in Active Directory. Follow this link to learn more about AzMan.

    While there is no production tool meant to provide this, the developers for AzMan have created an un-supported sample application called azmigrate.exe which is in the Windows SDK. This tool can export the AzMan store allowing migrations from AD to XML or from XML to AD. The exported content retains all SIDs currently assigned to a role and can be imported to a new Active Directory domain or loaded right from the XML file that was generated from the export.

    To get azmigrate.exe you must download the Windows SDK and once it is installed you need to:

    1) Compile the AzMigrate project using Visual Studio:

    a. Select File > Open > Project/Solution.

    b. Change the Solutions Configurations drop-down in the toolbar from Debug to Release.


    c. Select AzMigrate.vcproj located under %programfiles%\Microsoft SDKs\Windows\v6.1\Samples\Security\Authorization\AzMan\AzMigrate.

    NOTE: If you are prompted to run the Conversion Wizard, do so

    2) In Visual Studio select Build > Build Solution, then click Build > Build AzMigrate and get the compiled binary from %Program Files%\Microsoft SDKs\Windows\v6.1\Samples\Security\Authorization\AzMan\AzMigrate\Win32\Release.

    NOTE: If you encounter issues while compiling please refer to Visual Studio Help documentation.

    Once you’ve compiled azmigrate.exe, here’s the syntax needed to export the AzMan store from Active Directory to an XML file in the C:\Temp folder:

    AzMigrate.exe "msxml://C:/ Temp/AzmanStore.xml" "msldap://,CN=Program Data,DC=contoso,DC=com" /o /l=C:\temp\export.log /v

    NOTE: you need to get the correct DN for your AzMan store and modify the string above. To do this open azman.msc and view the Properties of the AzMan store then copy the DN from the Name field.


    The exported XML file can now be loaded in azman.msc directly from the XML file or you can import the file to another Active Directory domain where the Domain Function Level has been raised to Windows Server 2003 by running using this command:

    AzMigrate.exe "msldap://,CN=Program Data,DC=child,DC=contoso,DC=com" "msxml://C:/ Temp/AzmanStore.xml" /o /l=C:\temp\import.log /v

    Note that the export and import LDAP paths cited above target a specific DC. If when importing you encounter an error containing “More data is available” in the error string you may be importing the file from a member computer that is not joined to the same domain as the DN listed in the msldap:// string specified on your import command. When this occurs the import is unsuccessfully attempted against a DC belonging to the domain of the computer you are logged onto instead of a DC in the domain specified in the DN. When this occurs the import command looked like this:

    AzMigrate.exe "msldap://CN=AzmanStore,CN=Program Data,DC=child,DC=contoso,DC=com" "msxml://C:/ Temp/AzmanStore.xml" /o /l=C:\temp\import.log /v

    This can be avoided by specifically targeting a DC in the domain you want to import to using the desired LDAP port as shown in the second example above.

    Finally, one other error you might encounter when importing is “FAILED.ERROR MSG:The specified server cannot perform the requested operation.” If you encounter this error make sure the Domain Function Level has been raised to Windows Server 2003.

    - David “You’re the Azman!” Everett

  • Microsoft Assessment and Planning Toolkit is RTM

    Ned here. You probably already knew this, but better late than never. The Microsoft Assessment and Planning Toolkit 4.0 has been released. What is it good for and how does it work?

    • Assessment & Readiness - Windows 7 readiness, Windows Vista Hardware Assessment, 2007 Office Assessment, Windows Server 2008 R2 Readiness, Windows Server 2008 Readiness, Power Savings Assessment, Security Assessment, Application Virtualization Assessment
    • Discovery & Inventory - SQL Server, Windows Server Roles, Virtual Machine Inventory
    • Server Consolidation -  Inventory, Performance, Virtual Machine Analysis, ROI Calculator
    • Agentless - no software to install on your surveyed computers (Woohoo - nothing to install on targets!)
    • Computer discovery methods - Active Directory, NetBIOS browsing, computer names from a file, scan an IP address range, or manually enter computer names

    If you just want to check a few Win7 computers for readiness though, avoid the overkill above and just grab Windows 7 Upgrade Advisor.

    The price on both? Free, baby, free. Lots more info here. Go now, before we change our minds and charge you the millions it's worth.

    - Ned 'Giveaway' Pyle

  • Configuring DFSR to a Static Port - The rest of the story

    Ned-san here again. Customers frequently call us about configuring their servers to listen over specific network ports. This is usually to satisfy firewall rules – more on this later. A port in TCP/IP is simply an endpoint to communication between computers. Some are reserved, some are well-known, and the rest are simply available to any application to use. Today I will explain the network communication done through all facets of DFSR operation and administration. Even if you don’t care about firewalls and ports, this should shed some light on DFSR networking in general, and may save you skull sweat someday.

    DFSR and RPC

    Plenty of Windows components support hard-coding to exclusive ports, and at a glance, DFSR is no exception. By running the DFSRDIAG STATICRPC command against the DFSR servers you force them to listen on whatever port you like for file replication:


    Many Windows RPC applications use the Endpoint Mapper (EPM) component for these types of client-server operations. It’s not a requirement though; an RPC application is free to declare its own port and only listen on that one, with a client that is hard-coded to contact that port only. This range of ports is 1025-5000 in Windows Server 2003 and older, and 49152-65535 in Vista and later. DFSR uses EPM.

    Update 3/3/2011 (nice catch Walter)

    As you have probably found, we later noticed a bug in DFSR on Win2008 and Win2008 R2 DCs (only - not member servers) where the service would always send-receive on port 5722. This article was done before that and doesn't reflect it. Read more on this here:;EN-US;832017

    All of the below is accurate for non-DCs

    By setting the port, you are telling EPM to always respond with the same port instead of one within the dynamic range. So when DFSR contacted the other server, it would only need to use two ports:


    So with a Netmon 3.3 capture, it will look something like this when the DFSR service starts up:

    1. The local computer opens a dynamic client port and connects to EPM on the remote computer, asking for connectivity to DFSR.


    2. That remote computer responds with a port that the local computer can connect to for DFSR communication. Because I have statically assigned port 55555, the remote computer will always respond with this port.


    3. The local computer then opens a new client port and binds to that RPC port on the remote server, where the DFSR service is actually listening. At this point two DFSR servers can replicate files between each other.


    The Rest of the Story

    If it’s that easy, why the blog post? Because there’s much more DFSR than just the RPC replication port. To start, your DFSR servers need to be able to contact DC’s. To do that, they need name resolution. And they will need to use Kerberos. And the management tools will need DRS API connectivity to the DC’s. There will also need to be SMB connectivity to create replicated folders and communicate with the Service Control Manager to manipulate DFSR. And all of the above also need the dynamic client ports available outbound through the firewall to allow that communication. So now that’s:

    • EPM port 135 (inbound on remote DFSR servers and DC’s)
    • DFSR port X (inbound on remote DFSR servers)
    • SMB port 445 (inbound on remote DFSR servers)
    • DNS port 53 (inbound on remote DNS servers)
    • LDAP port 389 (inbound on remote DC’s)
    • Kerberos port 88 (inbound on remote DC’s)
    • Ports 1025-5000 or 49152-65535 (outbound, Win2003 and Win2008 respectively – and inbound on remote DC’s).

    Let’s see this in action. Here I gathered a Netmon 3.3 capture of configuring a new replication group:

    • Server-01 – IP – DC/DNS
    • Server-02 – IP – DFSR
    • Server-03 – IP – DFSR
    • Server-04 – IP – Computer running the DFSMGMT.MSC snap-in

    1. First the snap-in gets name resolution for the DC from my management computer (local port 51562 to remote port 53):


    2. Then it contacts the DC – the EPM is bound (local port 49199 to remote port 135) and a dynamic port is negotiated so that the client knows which port on which to talk to the DC (port 49156).


    3. Having connected to the DC through RPC to DRS (a management API), it then returns information about the domain and other things needed by the snap-in.


    4. The snap-in then performs an LDAP query to the DC to locate the DFSR-GlobalSettings container in that domain o that it can read in any new Replication Groups (local port 49201 to remote port 389).


    5. The snap-performs LDAP and DNS queries to get the names of the computers being selected for replication:


    6. The DFSR service must be verified (is it installed? Is it running?) This requires a Kerberos CIFS (SMB) request to the DC as well as an SMB connection to the DFSR servers – this is actually a ‘named pipe’ operation over remote port 445, where RPC uses SMB as a transport:




    7. The Replicated Folders are created (or verified to exist) on the DFSR servers – I called mine ‘testrf’. This uses SMB again from the snap-in computer to the DFSR server, over remote port 445:


    8. The snap-in will write all the configuration data through LDAP over remote port 389 against the DC. This creates all the AD objects and attributes, creates the topology, writes to each DFSR computer object, etc. There are quite a few frames here so I will just highlight a bit of it:


    9. If you wait for AD replication to complete and the DFSR servers to poll for changes, you will see the DFSR servers request configuration info through LDAP, and then start working normally on their static RPC port 55555 – just like I showed at the beginning of this post above.

    DCOM and WMI

    All of the things I’ve discussed are guaranteed needs in order to use DFSR. For the most part you don’t have to have too many remote ports open on the DFSR server itself. However, if you want to use tools like DFSRDIAG.EXE and WMIC.EXE remotely against a DFSR server, or have a remote DFSR server generate ‘Diagnostic Health Reports’, there is more to do.

    DFSR utilizes Windows Management Instrumentation as its ‘quasi-API’. When tools like DFS Management are run to generate health reports, or DFSRDIAG POLLAD is targeted against a remote server, you are actually using DCOM and WMI to tell the targeted server to perform actions on your behalf.

    There is no mechanism to control which RPC DCOM/WMI will listen on as there is for DFSR and other services. At service startup DCOM/WMI will pick the next available dynamic RPC port. This means in theory that you would have to have open the entire range of dynamic ports for the target OS, 1025-5000 (Win2003) or 49152-65535 (Win2008)

    For example, here I am running DFSRDIAG POLLAD /MEM:2008-02 to force that server to poll its DC for configuration changes. Note the listening port that I am talking to on the DFSR server (hint – it’s not 55555):




    And in my final example, here I am running the DFS Management snap-in and requesting a diagnostic health report. Note again how we use DCOM/WMI/RPC and do not connect directly to the DFSR service; again this requires that we have all those inbound dynamic ports open on the DFSR server:


    Wrap Up

    So is it worth it to try and use a static replication port? Maybe. If you don’t plan on directly administering a DFSR server and just need it talking to its DC, its DNS server, and its replication partners, can definitely keep the number of ports used quite low. But if you ever want to communicate directly with it as an administrator, you will need quite a few holes punched through your firewall.

    That is, unless you are using IPSEC tunnels through your Firewalls like we recommend. :-)

    - Ned ‘Honto’ Pyle

  • Hello Jose

    Ned here again. I've added a new blog to our Useful MS Blogs section:

    Jose Barreto's Blog

    We've posted some of Jose's stuff before but now we're making it official. :-) Jose is the PM of DFS Namespaces and writes quite a bit of interesting and useful stuff. For example, some recent ones that really kick booty:

    Five ways to check your DFS-Namespaces (DFS-N) configuration with the DFSDIAG.EXE tool

    File Server Capacity Tool (FSCT) Release Candidate available for download

    Using the Windows Server 2008 DFSUTIL.EXE command line to manage DFS-Namespaces

     It's not all DFS either, so definitely give it a shot.

    - Ned 'Shoutout' Pyle

  • New Directory Services KB Articles/Blogs 7/5-7/11

    KB Articles


    You encounter poor performance when you use the SMB 2.0 protocol to perform network-related operations, such as ADMT migration, on computers that are running Windows Server 2008 or Windows Vista


    SYSVOL migration to DFSR unnecessarily replicates or conflicts files in Windows Server 2008


    A computer that is running Windows Server 2003 stops responding (hangs) during startup if many IPv6 addresses are assigned


    The File Server Resource Manager (FSRM) service may cause high CPU usage in a Windows Server 2003


    Description of Group Policy Preference Migration Tool (GPPMIG)


    Single CALs support is available for Terminal Server license servers that are running Windows Server 2008


    Microsoft Windows Vista and Microsoft Windows Server 2008 may report incorrect ping statistics for a response similar to "Destination Host Unreachable"


    Advanced Group Policy Management (AGPM) takes more than 60 seconds to load Group Policy object (GPO)


    · Testing a Credential Provider

    · New Step-by-step guides available for Remote Desktop Services

    · Microsoft IT (AD) Health Scanner

    · New July update of Microsoft codename tracker ready for download

    · GP Preferences: Add a new printer, set as default

    · File Server Capacity Tool (FSCT) Release Candidate available for download