<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Technology Chronicles</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/shijimolak/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/shijimolak/feed.xml</link>
    <description />
    <lastBuildDate>Tue, 16 Apr 2019 05:27:45 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Azure AD user management scripts</title>
      <link>https://docs.microsoft.com/archive/blogs/shijimolak/azure-ad-user-management-scripts</link>
      <pubDate>Sun, 11 Jun 2017 19:13:11 GMT</pubDate>
      <dc:creator><![CDATA[Shijimol AK]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/shijimolak/?p=395</guid>
      <description><![CDATA[Recently I had an opportunity to create couple of scripts for a customer for Azure AD management...]]></description>
      <content:encoded><![CDATA[Recently I had an opportunity to create couple of scripts for a customer for Azure AD management linked with o365 . We have all these resources available in our documentation, albeit scattered at different places . Few scripts were also tweaked to meet certain specific requirements. I am sharing the same here for the benefit of the larger community

<strong>Import modules:</strong>

The first step is to import all modules required for O365 management. We have detailed steps available  in this TechNet article :https://technet.microsoft.com/en-us/library/dn568015.aspx

I have put all the commands together in this script <a href="https://msdnshared.blob.core.windows.net/media/2017/06/importmodules_o365.zip">importmodules_o365</a>

Edit the script as appropriate before execution to provide your environment specific parameters like domain name. I have provided comments regarding that wherever required.

Once you have imported all the required PowerShell modules, some common AD management tasks can be done using the scripts available in this zip file : <a href="https://msdnshared.blob.core.windows.net/media/2017/06/Management_Scripts.zip">Management_Scripts</a>

<strong>View and export list of users with different user roles </strong>

Use the  script <strong>exportrole.ps1</strong> to get details of user roles. By default the script will pull out list of users with the role 'Company Administrator' to a file named username.csv . You can modify the rolename to get the corresponding users with that role assigned. List of roles are also given at the end of the script.

P<strong>assword  expiry date of users</strong>

The script <strong>passwordexpirydates.ps1</strong> will extract this info to a csv titled passwordexpirydates.csv

<b>L</b><strong>ast password change date of users</strong>

Execute the script <strong>Passwordchangedate.ps1</strong> will extract this info to a csv titled userpasswordchangedate.csv

<strong>List of blocked users</strong>

You can use the  script <strong>Blockedusers.ps1</strong> to get information on blocked users if any

&nbsp;

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>OS and Data disk encryption of Azure IaaS Windows VMs</title>
      <link>https://docs.microsoft.com/archive/blogs/shijimolak/os-and-data-disk-encryption-of-iaas-windows-vms</link>
      <pubDate>Sun, 29 Jan 2017 21:36:11 GMT</pubDate>
      <dc:creator><![CDATA[Shijimol AK]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/shijimolak/?p=245</guid>
      <description><![CDATA[VM disk encryption is achieved using Bitlocker encryption of Windows VMs and DMcrypt in Linux VMs....]]></description>
      <content:encoded><![CDATA[<span style="font-family: Arial">VM disk encryption is achieved using Bitlocker encryption of Windows VMs and DMcrypt in Linux VMs. It leverages Azure KeyVault services to store your encryption keys which is again an additional level of security. The process is quite straight forward and encryption can be done for new as well as existing VMs. In case of Windows IaaS VMs, we can encrypt both the OS and Data disk, while in case of Linux IaaS VMs the data disk can be encrypted.You will have to use the ARM deployment model to leverage this feature, since it does not work with the classic model. There are ARM templates readily available in GitHub that can readily help you with the encryption of existing and New VMs.</span>

In this blog, I am going to focus on the end to end procedure for Windows VM OS and Data disk encryption using KeyVault by leveraging these templates

<strong>Prerequisites:</strong>

<strong>1) Create an Azure KeyVault</strong>

This can be now done from the ARM portal itself. KeyVault is available in the Azure Portal in preview mode. You can create a new keyVault  by providing basic information like KeyVault Name , Resource group Name,Location etc. In addition to that , by default your user account will have access in the "Access Policies". You can edit the "Advanced Access Policy" and enable all the three options given there

<img width="523" height="466" class="alignnone wp-image-255 " alt="security2" src="https://msdnshared.blob.core.windows.net/media/2017/01/security2.png" />

Alternately, you can also use the ARM template available at this location to create a KeyVault:

<a href="https://github.com/Azure/azure-quickstart-templates/tree/master/101-key-vault-create">https://github.com/Azure/azure-quickstart-templates/tree/master/101-key-vault-create</a>

This template will create a KeyVault for you with all the three advanced access policies including the Volume encryption policy that we need for Disk encryption

<strong>2) Create an application in Azure AD with permission to access KeyVault:</strong>

This is a very important step since you will be using this application id and key during VM encryption
<ol>
 	<li>Select the organization's active directory from the classic portal and select the application tab</li>
</ol>
<img width="732" height="149" class="alignnone wp-image-265 " alt="security3" src="https://msdnshared.blob.core.windows.net/media/2017/01/security3-1024x208.png" />

<span style="font-family: 'arial' , 'helvetica' , sans-serif"> 2.Click on add from the bottom menu to add a new application. Select the first option, ie add an application my organization is developing</span>

<img width="496" height="266" class="alignnone wp-image-275 " alt="security4" src="https://msdnshared.blob.core.windows.net/media/2017/01/security4.png" />

<span style="font-family: 'arial' , 'helvetica' , sans-serif">3. Provide name of the application in the next step</span>

<img width="467" height="335" class="alignnone wp-image-285 " alt="security5" src="https://msdnshared.blob.core.windows.net/media/2017/01/security5.png" />

<span style="font-family: 'arial' , 'helvetica' , sans-serif">3. Add the Sign-on URL and App URI. You can enter any value here in URI format, it need not have to be an existing application. Only requirement is that it should be unique for an organization</span>

<img width="499" height="343" class="alignnone wp-image-295 " alt="security6" src="https://msdnshared.blob.core.windows.net/media/2017/01/security6.png" />

<span style="font-family: 'arial' , 'helvetica' , sans-serif">4.Now click on configure, and copy the client Id of the application</span>

<img width="579" height="80" class="alignnone wp-image-305 " alt="security7" src="https://msdnshared.blob.core.windows.net/media/2017/01/security7.png" />

<span style="font-family: 'arial' , 'helvetica' , sans-serif">5.Next we need the application key. This can be generated from the portal from under the keys session. Select duration as 1 year from the drop down. Once you save the configuration, a key will be displayed which can be copied over</span>

<img width="580" height="103" class="alignnone wp-image-315 " alt="security8" src="https://msdnshared.blob.core.windows.net/media/2017/01/security8.png" />

<span style="font-family: 'arial' , 'helvetica' , sans-serif">6. Next step is to provide this application access to keyvault. It can be done from an Azure PowerShell window using the following command</span>
<em><span style="color: blue;font-family: 'arial' , 'helvetica' , sans-serif">Set-AzureRmKeyVaultAccessPolicy -VaultName $keyVaultName -ServicePrincipalName $aadClientID -PermissionsToKeys 'WrapKey' -PermissionsToSecrets 'Set' -ResourceGroupName $rgname</span></em>

<span style="font-family: 'arial' , 'helvetica' , sans-serif"></span>
<span style="font-family: 'arial' , 'helvetica' , sans-serif">You have to set the variables <em><span>$</span><span>keyVaultName,$aadClientID,$rgname</span></em>  to have values of your keyvault name, client id of the application that we got at Step 4 above and Resource group name</span>
<span style="font-family: 'arial' , 'helvetica' , sans-serif"></span>
<span style="font-family: 'arial' , 'helvetica' , sans-serif">Now you have the client id and the key that you will need during the ARM template execution. Now lets proceed with the VM disk encryption</span>

<strong><span style="font-family: 'arial' , 'helvetica' , sans-serif">Create a new encrypted VM using ARM template and KeyVault</span>
<span style="font-family: 'arial' , 'helvetica' , sans-serif"></span>
</strong><span style="font-family: 'arial' , 'helvetica' , sans-serif">Deploy the following template available in GitHub to encrypt a new VM : </span><a href="https://github.com/Azure/azure-quickstart-templates/tree/master/201-encrypt-create-new-vm-gallery-image"><span style="font-family: 'arial' , 'helvetica' , sans-serif"><span style="color: #2288bb">https://github.com/Azure/azure-quickstart-templates/tree/master/201-encrypt-create-new-vm-gallery-image</span></span></a>

<span style="font-family: 'arial' , 'helvetica' , sans-serif">Click on the "deploy to Azure" option in the page to deploy the ARM template directly in Azure</span>

<img width="469" height="332" class="alignnone wp-image-325 " alt="security9" src="https://msdnshared.blob.core.windows.net/media/2017/01/security9.png" />

<span style="font-family: 'arial' , 'helvetica' , sans-serif">Provide the mandatory parameter values like VM name, admin username, password, Storage account name, Virtual network, subnet,keyvault name and keyvault resource group along with the client ID and Client Secret  of the Azure AD application that we created earlier. Additionally there will be two options for Key Encryption key and URL.It is not mandatory and we are not using that in this example. You can then agree to the terms and conditions , click on purchase and the deployment of encrypted VM will start</span>

<span style="font-family: 'arial' , 'helvetica' , sans-serif"></span>
<strong><span style="font-family: 'arial' , 'helvetica' , sans-serif">Encrypt an existing VM using ARM template and keyvault</span></strong>
<span style="font-family: 'arial' , 'helvetica' , sans-serif"></span>
<span style="font-family: 'arial' , 'helvetica' , sans-serif">Deploy the following template available in GitHub to encrypt an existing VM : <span>: <a href="https://github.com/Azure/azure-quickstart-templates/tree/master/201-encrypt-running-windows-vm">https://github.com/Azure/azure-quickstart-templates/tree/master/201-encrypt-running-windows-vm</a></span></span>
<span style="line-height: 107%;font-family: 'arial' , 'helvetica' , sans-serif;font-size: 11pt"></span>
<span></span><span style="font-family: 'arial' , 'helvetica' , sans-serif"> </span><span style="line-height: 107%;font-family: 'arial' , 'helvetica' , sans-serif;font-size: 11pt">Deploy the template to Azure and provide details of the VM that you want to encrypt.'Volume type' can be OS,Data or All(default value) depending on which disk you want to encrypt</span>

<img width="546" height="465" class="alignnone wp-image-335 " alt="security11" src="https://msdnshared.blob.core.windows.net/media/2017/01/security11.png" />

<span style="line-height: 107%;font-family: 'arial' , 'helvetica' , sans-serif;font-size: 11pt"><strong>Check encryption status</strong></span>
<span style="font-family: 'arial' , 'helvetica' , sans-serif"></span>
<span style="font-family: 'arial' , 'helvetica' , sans-serif">Now that you have enabled the encryption you might want to verify the status. There are few ways to check this.</span>
<span style="font-family: 'arial' , 'helvetica' , sans-serif"></span>
<span style="font-family: 'arial' , 'helvetica' , sans-serif">Easiest way is to check from the Azure portal. Navigate to the Disks information of the VM from the portal. It will show the OS disk status as Encrypted. </span>

<img width="533" height="190" class="alignnone wp-image-345 " alt="security12" src="https://msdnshared.blob.core.windows.net/media/2017/01/security12.jpg" />

You can check the data disk encryption status by using Azure PowerShell command Get-AzureRmVmDiskEncryptionStatus and providing resource group name and Vmname as parameters
Get-AzureRmVmDiskEncryptionStatus -ResourceGroupName $rgname -VMName $Vmname

<img width="540" height="128" class="alignnone wp-image-355 " alt="security13" src="https://msdnshared.blob.core.windows.net/media/2017/01/security13.jpg" />

<span style="font-family: 'arial' , 'helvetica' , sans-serif">You will see OSVolumeEncrypted and DataVolumesEncrypted status as True if encryption is enabled</span>
<span style="font-family: 'arial' , 'helvetica' , sans-serif"></span>
<span style="font-family: 'arial' , 'helvetica' , sans-serif">You can also check the status of disk encryption from within the VM <span>using ‘manage-bde’ command and providing the drive letter as parameter. Sample output given below</span></span>

<img width="547" height="207" class="alignnone wp-image-365 " alt="security14" src="https://msdnshared.blob.core.windows.net/media/2017/01/security14.png" />

<span><span style="line-height: 107%;font-family: 'arial' , 'helvetica' , sans-serif;font-size: 11pt">Also, it can been seen from the GUI of the server , the drives will have a lock signal associated</span></span>
<span style="font-family: 'arial' , 'helvetica' , sans-serif"></span>

<img width="626" height="121" class="alignnone wp-image-366 " alt="security15" src="https://msdnshared.blob.core.windows.net/media/2017/01/security15.jpg" />

<span style="font-family: 'arial' , 'helvetica' , sans-serif"> </span><span style="font-family: 'arial' , 'helvetica' , sans-serif">Now you know how to enable disk encryption for protection of data at rest in Azure!!!!</span>

&nbsp;

&nbsp;

Ref: <a href="https://azure.microsoft.com/en-us/documentation/articles/best-practices-network-security/"><span style="color: #2288bb">https://azure.microsoft.com/en-us/documentation/articles/best-practices-network-security/</span></a><a href="https://azure.microsoft.com/en-in/documentation/articles/azure-security-disk-encryption/"><span style="color: #2288bb">https://azure.microsoft.com/en-in/documentation/articles/azure-security-disk-encryption/</span></a>

&nbsp;

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>How to protect your on-prem physical machines using ASR</title>
      <link>https://docs.microsoft.com/archive/blogs/shijimolak/how-to-protect-your-on-prem-physical-machines</link>
      <pubDate>Tue, 24 Jan 2017 22:25:54 GMT</pubDate>
      <dc:creator><![CDATA[Shijimol AK]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/shijimolak/?p=25</guid>
      <description><![CDATA[BC/DR is a key consideration for all organizations big or small. Thanks to Azure, we now have an...]]></description>
      <content:encoded><![CDATA[BC/DR is a key consideration for all organizations big or small. Thanks to Azure, we now have an affordable and easy to implement BC/DR solution . Azure site recovery service(ASR) can be used for a multitude of disaster recovery scenarios, with an economic pay-as-you-go costing model. The DR scenarios catered to by ASR currently are:

<strong>DR site in Az</strong><strong>ure
</strong> - Physical machines to Azure
-VMware environment to Azure
- Hyper-v(with or without VMM) to Azure

<strong>DR site in a secondary DC, and orchestration by ASR</strong>
-VMM site to site
-VMware/Physical to VMware
-VMM to VMM(SAN replication)

This week in my Azure labs, I tried out the first scenario, ie DR from On-Prem Physical machines to Azure. This blog is all about my little experiment and some tips and tricks that I learned during the same.

The following link , which explains the procedure for protecting Physical/VMware environment is a good starting point: <a href="https://azure.microsoft.com/en-in/documentation/articles/site-recovery-vmware-to-azure/"><span style="color: #2288bb">https://azure.microsoft.com/en-in/documentation/articles/site-recovery-vmware-to-azure/</span></a>

I will use this article as reference point, which is very detailed and well written. I will be going into further more details on few of the areas mentioned in the link .Based on my experience,  I think it will be helpful for someone trying to set up a Physical server to Azure replication for the first time.

You should ensure that the prerequisites for physical server protection mentioned in the link are taken care of. You need to run the Site Recovery Unified SetUp for installing the configuration and process server. Refer to "Step 2: Set up the source environment" in the link above for details on initial set up of the vault, setting up configuration server, registering it in Azure etc. These steps are  pretty straight forward. Detailed explanation of the configuration server setup on-prem  is also mentioned in  Step 2 of the article

Lets assume that you done the initial vault creation , configuration server setup , created target environment in Azure(Resource group, storage, network etc) and have also created the replication policies to be used. All these come under "Step 1: Prepare your infrastructure" in your site recovery vault. These steps are again clearly explained in the official documentation :  <a href="https://azure.microsoft.com/en-in/documentation/articles/site-recovery-vmware-to-azure/"><span style="color: #2288bb">https://azure.microsoft.com/en-in/documentation/articles/site-recovery-vmware-to-azure/</span></a>

Now lets see what needs to be done at the physical server end to enable the protection:

<strong>Steps to be done on Physical server:
</strong>
1)Set up the registry key entry

<img width="838" height="168" class="alignnone wp-image-35 size-full" alt="pic1" src="https://msdnshared.blob.core.windows.net/media/2017/01/PIC11.png" />

2)Enable the following in <strong>Allow an app or feature through Firewall</strong>.
&gt; File and print sharing
&gt;Windows Management Instrumentation

<img width="789" height="135" class="alignnone wp-image-45 " alt="pic2" src="https://msdnshared.blob.core.windows.net/media/2017/01/pic2.png" />

<img width="739" height="79" class="alignnone wp-image-65 " alt="pic3" src="https://msdnshared.blob.core.windows.net/media/2017/01/Pic32.png" />

3)Add an account that has admin privilege in the target physical machine in the <strong>cspsconfigtool.</strong>  It can be found in the following location in the configuration server

<img width="848" height="439" class="alignnone wp-image-75 " alt="pic4" src="https://msdnshared.blob.core.windows.net/media/2017/01/Pic42.png" />

<img width="862" height="321" class="alignnone wp-image-85 " alt="pic6" src="https://msdnshared.blob.core.windows.net/media/2017/01/pic6.png" />

Click on Add account

4)In my case, the physical machine was not added to domain. Hence I added a local admin user. The friendly name can be anything, it is just for identifying that account in Azure portal.

<img width="483" height="440" class="alignnone wp-image-95 size-full" alt="pic5" src="https://msdnshared.blob.core.windows.net/media/2017/01/Pic52.png" />

5)Now you can install the mobility agent on the physical server. The installer can again be found in the configuration server at the following location. You need to select the installer based on the operating system type. In my case I selected the Windows installer

<img width="832" height="251" class="alignnone wp-image-105 " alt="pic7" src="https://msdnshared.blob.core.windows.net/media/2017/01/Pic71.png" />

Select option to install Mobility service

<img width="841" height="517" class="alignnone wp-image-106 " alt="pic8" src="https://msdnshared.blob.core.windows.net/media/2017/01/Pic81.png" />

Enter Configuration server IP and Passphrase

<img width="828" height="356" class="alignnone wp-image-115 " alt="pic9" src="https://msdnshared.blob.core.windows.net/media/2017/01/pic9.png" />
Specify install location. That is all that is required. You can go to the next step and wait for the installation to be complete

<img width="300" height="90" class="alignnone size-medium wp-image-125" alt="pic10" src="https://msdnshared.blob.core.windows.net/media/2017/01/pic10-300x90.png" />

<strong>Steps to be done in Azure portal:</strong>

Now that the mobility agent is installed, you can refresh the configuration server in the Azure management portal

Go to &lt;recovery services vault&gt; -&gt; Settings-&gt;Site recovery infrastructure-&gt;Servers
select the configuration server and click refresh server

<img width="551" height="240" class="alignnone wp-image-165 " alt="pic12" src="https://msdnshared.blob.core.windows.net/media/2017/01/Pic121.png" />

Click ok on the message and wait for the refresh to be completed.

Once the refresh is completed, ideally the new physical server will be reflected in the connected agents list

<img width="539" height="271" class="alignnone wp-image-166 " alt="pic13" src="https://msdnshared.blob.core.windows.net/media/2017/01/Pic13.png" />

Now you can go ahead and enable replication for your physical server. In the Management portal, go to &lt;Recovery services vault&gt;-&gt;Settings-&gt;Site Recovery-&gt;Enable replication

<img width="654" height="573" class="alignnone wp-image-175 " alt="pic14" src="https://msdnshared.blob.core.windows.net/media/2017/01/pic14.png" />

Enter the source. This will be your configuration server .Machine type will be Physical machines and Process server in this installation is same as configuration server

<img width="675" height="443" class="alignnone wp-image-185 " alt="pic16" src="https://msdnshared.blob.core.windows.net/media/2017/01/pic16.png" />

Configure the target environment in Azure.
<div class="separator">You need to select the target physical server at the next step. Click on the + sign</div>
<div class="separator"><img width="594" height="390" class="alignnone wp-image-195 " alt="pic18" src="https://msdnshared.blob.core.windows.net/media/2017/01/pic18-1024x673.png" /></div>
<div class="separator">Enter details of your on prem physical server, ie server name , IP and the OS type</div>
<div class="separator"><img width="395" height="133" class="alignnone wp-image-205" alt="pic19" src="https://msdnshared.blob.core.windows.net/media/2017/01/Pic19-300x101.png" /></div>
<div class="separator">In the configure replication settings page, select the replication policy that you had created earlier</div>
<div class="separator"></div>
<div class="separator"><img width="653" height="467" class="alignnone wp-image-155 " alt="pic22" src="https://msdnshared.blob.core.windows.net/media/2017/01/pic22.png" /></div>
<div class="separator">Now all the steps are done, and you can click "Enable replication" to protect your on-prem physical server</div>
<div class="separator"><img width="230" height="552" class="alignnone wp-image-156 " alt="pic23" src="https://msdnshared.blob.core.windows.net/media/2017/01/Pic23.png" /></div>
<div class="separator">You  can click on notifications to see progress of the task. You can also go to &lt;site recovery vault&gt;-&gt;Jobs-&gt;"Site Recovery Jobs"-&gt; and select the "Enable protection" job to see the status</div>
<div class="separator"><img width="500" height="391" class="alignnone wp-image-225 " alt="24" src="https://msdnshared.blob.core.windows.net/media/2017/01/241.png" /></div>
<div class="separator">If you see all green ticks, your machine protection is enabled . You can see the status of replication from  site recovery vault&gt;-&gt;Replicated Items. Once the replication is completed, the status will be shown as protected</div>
<div class="separator"><img width="567" height="238" class="alignnone wp-image-235 " alt="25" src="https://msdnshared.blob.core.windows.net/media/2017/01/251-1024x429.png" /></div>
<div class="separator"></div>
<div class="separator"></div>]]></content:encoded>
    </item>
  </channel>
</rss>