• Hosting Virtual Machines in Azure IaaS - Part 2 Prepare the session

    ###########################################################################

    # Prepare the session #

    ###########################################################################

    # Reference http://msdn.microsoft.com/en-us/library/windowsazure/jj152841.aspx

    # Get Subscription GUID & Certificate hash from the Management portal.

    # Management Portal > Settings > Subscriptions > Subscription ID

    # Management Portal > Settings > Management certificates > Thumbprint ( This should match the publish file used in the earler command )

    $subid = "xxxxxxxxxxxxxxxxxxxxxx"

    $cert = Get-Item Cert:\CurrentUser\My\xxxxxxxxxxxxxxxxxx

    Set-AzureSubscription -SubscriptionName "contosotestlab" -SubscriptionId $subid -Certificate $cert

    Select-AzureSubscription -SubscriptionName contosotestlab

  • Spelunking with the Key Management Server (KMS) to activate office 2013.

    Some learnings of the week gone by…

    Methods of activating Office 2013

    1.      Multiple Activation Key (MAK)

    MAK activates systems on a one-time basis, using Microsoft's hosted activation services, either via the Internet or by telephone. This is the traditional way we know of activating office.

    Sub divided into MAK Independent activation & MAK proxy activation.

    2.      Key Management Service (KMS).

    A client-server model in which you must install and activate a KMS host activation key on a KMS host computer. This establishes a local activation service in your environment. Office 2013 client computers connect to the local Office 2013 KMS host for activation on an on-going basis.

    3.      Active Directory-based activation of Office 2013

    Active Directory-based activation can activate all Office 2013 volume license clients throughout a domain. Active Directory-based activation is available only for Office 2013 on Windows 8 and Windows Server 2012.

    Types of Serial keys involved

    1.      Office 2013 Multiple Activation Key (MAK)

    The MAK activation is used for one-time activation through Microsoft hosted activation services, either via the Internet or by telephone.

    Get this key from the Volume Licensing Service Center Portal

    2.      Office 2013 Generic Volume License Key (GVLK).

    The GVLK enables Office 2013 to automatically discover and activate against your KMS host or Active Directory infrastructure.

    Get this key from http://technet.microsoft.com/en-us/library/dn385360(v=office.15).aspx

    3.      KMS Host Key

    A KMS Host Key is used to activate the KMS host with a Microsoft activation server. Get this key from the Volume Licensing Service Center Portal.

    KMS in a Non-Domain environment.

    This works, but needs additional effort. After considerable trolling on the internet I have not found this documented anywhere so here it is:

    1. Clients might not be able to resolve the FQDN of the KMS server.

      Workaround: Ensure the DNS server & DNS suffix is configured on the workstation.

       

    2. KMS server does not have permissions to query the workstation for a report.

      Workaround: Ensure the workstation has an admin account with a known password which the KMS server can use for querying.

       

    3. Local firewall on the workstation blocks the KMS server query

      Workaround: Enable firewall exception for WMI. (Guidance available on TechNet)

       

    4. Grossly mismatched time between server & client might result in authentication failures between the KMS server & the workstation.

      Command to Sync the time on the Client with the time on the KMS server.

      net time \\<kmsserver> /set /y

       

    Additional Learnings which I have not found documented.

    1. KMS binaries can be downloaded from the Volume Licensing Service Center Portal as an .iso image or from the public Microsoft download center. I used the one from the Volume Licensing Service Center Portal.

      Yet to figure out the difference between the two.

    2. Volume Activation Management Tool (VAMT) is purely an optional tool & not needed for KMS functionality. However I would recommend this to be installed.

      In case it does not work properly make sure you upgrade to the latest version whatever the prerequisites.

    3. The Help section has a laundry list of commands. The only ones I used were on the client side.

      To Force activation:

      cscript "C:\Program Files\Microsoft Office\Office15\ospp.vbs" /act

       

      To Display the failure history for MAK/retail activation:

      cscript "C:\Program Files\Microsoft Office\Office15\ospp.vbs" /dhistorykms

       

      Note: ospp.vbs is installed as part of the default office 2013 setup.

       

    4. VAMT provides a point-in-time view of the computers and products that it manages. It cannot provide an ongoing view of your environment. You should refresh the status from time to time. You can easily get an update license status.   Documented & Reproduced from Here

    5. I have not found any way to query the KMS server to know which and how many clients it has activated. The current method of reporting is via the VAMT which connects to the client for a report. If the client is unavailable on the network it will not be reported on.

       

    6. Useful Links

      Download: Microsoft Office 2013 Volume License Pack

      http://www.microsoft.com/en-us/download/details.aspx?id=35584

       

      Volume Licensing Service Center Portal

      https://www.microsoft.com/Licensing/servicecenter/default.aspx

       

      Understanding KMS

      http://technet.microsoft.com/en-us/library/ff793434.aspx

       

      KMS activation of Office 2013

      http://technet.microsoft.com/en-us/library/ee624357(v=office.15).aspx

       

      Manage Product Keys Using Volume Activation Management Tool 2.0

      http://technet.microsoft.com/en-in/library/ff686877.aspx

  • Hosting Virtual Machines in Azure IaaS - Part 1 Prepare the Workstation for connecting to the azure subscription

    I have been using azure for hosting my virtual machines for several months. I will not list the advantages it gives me in this blob, but since i did not find any blog listing out the steps for an ITpro to simply follow, i am putting the steps i personally follow in a multi-part series.

    I am aware that there are enhancements & added features to the PowerShell commands since the time i put together these steps. I plan to cover them at a later stage possibly as a version 2.0

     

    ###########################################################################

    # Prepare the Workstation for connecting to the azure subscription #

    ###########################################################################

    # Download & install the Windows Azure PowerShell Cmdlets from http://go.microsoft.com/?linkid=9811175&clcid=0x409

    # Import the module with the below command:

    Import-Module 'C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Azure.psd1'

    # Download the Publish setting file from https://windows.azure.com/download/publishprofile.aspx?wa=wsignin1.0

    # This file contains your secure credentials and additional information about your subscriptions for use in your development environment.

    # Security Note: This file contains an encoded management certificate that will serve as your credentials to administer all aspects of your subscriptions and related services.

    # Store this file in a secure location, or delete it after you use it.

    # Import the Publish File using the below command:

    Import-AzurePublishSettingsFile 'C:\azure\xxx.publishsettings'

  • How to Migrate Distribution Groups Across a Forest

    Building on my previous couple of blogs on Cross-Forest Migration, in this blog I will describe how Groups can be successfully migrated across a forest. I will also list out some gotchas & how they can be addressed.

    Migrating groups is something I've seen customers assume are not important however when the groups are actually moved, customers experience the pain point some of which could have been mitigated.

     

    1. Detect & fix any corruption in the groups attributes ( if any ).

    Common corruption we see is invalid characters in critical attributes like alias & display name. (space, period, special characters, etc.)

    There are several ways to detect this corruption. The most simple & crude way would be to do a Get-Group to list all the mailboxes. Any group with invalid attributes would show up in yellow. Besides this you can also use the Office 365 readiness tool to report on invalid attributes ( highly recommended ).

    The only reliable fix to detected corruption would be to manually correct the attributes either from ADUC or from ADSI Edit or a similar tool.

    Note the difference between Detect & fix above.

    I’ve seen customer attempt to fix this corruption via a script to disastrous effect. ( what logic do you use ? )

    Tip: If any attributes were changed & you are using Exchange 2003, you should update the RUS & also replicate across the domain controllers.

    2. Execute ADMT to copy groups along with the SID.

    when executing ADMT, Fix the group membership in the new forest. This could be in one pass or multiple passes depending on your requirements.

    A point of significance here is that ADMT does NOT copy all Exchange attributes from the source to target forest.

    3. Convert Groups to Universal.

    Exchange 2010 requires a local Global Catalog server in the Active Directory site where Exchange resides to query for group expansion. A Global catalog can expand domain local, global, and universal groups. However, domain local groups (and sometimes global groups) can only be expanded within the domain. Hence the GC will be unable to expand a domain local group in a subdomain.


    Thus Exchange Server 2007 & 2010 force you to create all new distribution groups as universal distribution groups even if you have a single domain in the forest.

    To convert groups to universal using PowerShell run this command:

    Get-Group | where { ($_.RecipientTypeDetails -eq "NonUniversalGroup" -or  $_.RecipientType -eq "MailNonUniversalGroup") -and ($_.GroupType -notlike "*DomainLocal*")} |Set-Group –Universal

    Iterate by running this command till all groups are converted to universal.

    Tip: There are other methods to accomplish this, e.g. with the dsmod command, however the method listed above is what I chose & it works like a charm.

     

    4. Mail enable the groups with source Primary, Secondary (if any) SMTP & legacyExchangeDN.

    Given that prepare-moverequest.ps1 cannot be used to prepare groups we need to use another tool for copying the SMTP addresses ( note the plural ) from the source to target forest (both Primary & secondary addresses) along with the LegacyExchangeDN stamped as a x.500 address, reasons for which have been explained in earlier posts.

    The tool in question is one which was released for migrating an Exchange 2010 sp1 hosted tenant (/hosting mode ) to another forest which is running Exchange 2010 sp2 ( Non-Hosting mode )

    The entire archive of scripts & documentation can can be downloaded from http://blogs.technet.com/b/exchange/archive/2012/02/03/released-migrating-from-exchange-server-2010-in-hosting-mode-to-exchange-server-2010-sp2-whitepaper.aspx

    Once un-compressed, we need to run two scripts. One to Create an .xml file with the group details & the second to import the same .xml into the target Forest which will restore the group attributes.

     

    • CreateADMTGroupList.ps1 to Create an .xml file of the group details.

     

    • Copy this xml file to the target forest & import it using the next command.

     

    • RestoreGroupAttributes.ps1 to restore the group attributes to the groups which would have already been copied to the target forest using ADMT.

    5. Export list of groups having “exception to e-mail address policy” in source forest & Set the same “policy exception” for the groups copied into the target forest.

     Since hosting environments have the "Automatically update e-mail addresses based on e-mail address policy" unchecked, One un-needed thing the above script does it set an the "Automatically update e-mail addresses based on e-mail address policy" to be unchecked. ( thus the Recipient Policy will not be applied. )

    2

    Command to Export ( source forest )

     Get-mailbox | where {$_.policiesexcluded -eq "{26491CFC-9E50-4857-861B-0CB8DF22B5D7}"}

    Command to Import ( target forest )

    set-mailbox -emailaddresspolicyenabled $false

     

    6. Export List the groups hidden in the source forest & hide the same in the target forest.

    for whatever reason they may have been hidden in the source forest, the same would have to be set in the target forest.

    Command to Export ( source forest )

    Get-mailbox | where {$_.HiddenFromAddressListsEnabled -eq "true"}

    Command to Import ( target forest )

    Set-mailbox -HiddenFromAddressListsEnabled $true

      

    7. Identify which groups have another group as manager & fix managed-by issue

    In Exchange 2010, Unlike earlier versions, distribution groups & mailboxes cannot be managed by groups - only individual users. So it's possible that prior to migration, some groups were used to manage the distribution group.  Now, members of these groups cannot modify the group.

    To resolve this, a script Set-DistributionGroupOwners.ps1 can be used. This script replaces a distribution group or security group, which is specified in the “ManagedBy” attribute of a distribution group, with members of the group.

     The script ( Set-DistributionGroupOwners.ps1 ) can be downloaded from here : http://gallery.technet.microsoft.com/scriptcenter/756b02bd-fb8c-4071-b7b3-3e9022831678

    additional details can be found here : http://blogs.technet.com/b/exchange/archive/2011/05/04/how-to-manage-groups-with-groups-in-exchange-2010.aspx

     

    8. Enabling users to manage distribution groups but not create or remove them.

     

    The script ( Manage-GroupManagementRole.ps1 ) can be downloaded from here :

    additional details can be found here : http://blogs.technet.com/b/exchange/archive/2009/11/18/how-to-manage-groups-that-i-already-own-in-exchange-2010.aspx

     

    9. Upgrade distribution group version.

    Distribution groups ( AD objects ) have a version which determine which features are enabled. for example, if the version is E2003, features which are available in later version like E2010 remain greyed out. (e.g. DL moderation ).

    In order to get all the features of Exchange 2010, we need to upgrade the version with the below commands.

    Command to Upgrade the groups:

    Get-DistributionGroup | Set-DistributionGroup -ForceUpgrade


    Command to Report the version:

    Get-DistributionGroup | ft Name,Exchangeversion

     

    10. Upgrading the E-mail Address Policy

    If the email address policy is not upgraded, we will not be able to open the object in EMC

    The below command will report which of the e-mail address policies ( aka Recipient Policies ) are legacy.

    Get-EmailAddressPolicy | where { $_.RecipientFilterType -eq "Legacy" } | Format-List Name,RecipientFilter*,ExchangeVersion

    The below command will upgrade them.

    Get-EmailAddressPolicy | where {$_.RecipientFilterType –eq “Legacy”} | Set-EmailAddressPolicy –IncludedRecipients AllRecipients

    Note 1 : If you have complex email addressing policies please test before executing the above command.

    Note 2 : Mailbox Manager policies are no longer available in 2010 & thus have to be removed.

     

    11. QBDG

    Query Based Distribution Groups are best re-created from scratch as the actual query parameters could have changed significantly.

     

  • Flesch Reading Ease

     

    Thanks to an internal communiqué, I recently came across a Readability test of word documents. Surely made for some interesting reading.

    To Enable it, you need to enable readability statistics from the options.

     

    image

    Once done, on completing a spell check you will see the following:

     

    image

     

    The higher the score, the easier it is to understand the document. There are several sources on the internet which explain how to interpret the score.

    Further reading can be found here.

    http://office.microsoft.com/en-in/word-help/test-your-document-s-readability-HP010148506.aspx#BM2