<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Shweta Nayak’s Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/shwetanayak/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/shwetanayak/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:36:00 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Creating a local Red hat repository for use within the specific environment.</title>
      <link>https://docs.microsoft.com/archive/blogs/shwetanayak/creating-a-local-red-hat-repository-for-use-within-the-specific-environment</link>
      <pubDate>Thu, 23 Nov 2017 15:08:43 GMT</pubDate>
      <dc:creator><![CDATA[shweta nayak]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/shwetanayak/?p=205</guid>
      <description><![CDATA[&nbsp;

We do have an update infrastructure in place by default for Red Hat VMs created from the...]]></description>
      <content:encoded><![CDATA[&nbsp;

We do have an update infrastructure in place by default for Red Hat VMs created from the Platform image on Azure :
<strong>Red Hat Update Infrastructure for on-demand Red Hat Enterprise Linux VMs in Azure</strong>
https://docs.microsoft.com/en-us/azure/virtual-machines/linux/update-infrastructure-redhat

&nbsp;

However, we have seen that some customers having large environments choose to manage the updates centrally and in a more granular manner within their organization.
For this, they need to configure a local repository on one of their servers, by downloading the packages from the RHUI.

&nbsp;

Here is how we can create this local repository on Azure.

Red Hat shares an article below for creating a local mirror :
How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7 without using Satellite server?
https://access.redhat.com/solutions/23016

&nbsp;

Run the command below on the server where the repo needs to be configured :
<strong>yum install yum-utils createrepo</strong>

Create the directory to be used for the repo :
<strong>mkdir /testrepo</strong>

Run the commands below to check the available repos from RHUI :
<strong>yum repolist</strong>

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2017/11/Untitled.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/11/Untitled.png" alt="" width="1040" height="630" class="alignnone size-full wp-image-206" /></a>

&nbsp;

Run the command below to sync them locally in the specified directory :
<strong>reposync --gpgcheck -l --repoid=rhui-rhel-7-server-rhui-rpms --download_path=/testrepo</strong>

Note there are multiple repo ids available. We need to pick the ones needed, and run the command multiple times if required.

We can download all the packages locally from RHUI using this method.

&nbsp;

<strong>Note :</strong>

The packages get updated in RHUI every day and every few hours, and these would need to be synced on the local repo too.
Hence, we may determine an interval as practical for the environment and sync them locally at a appropriate frequency.

&nbsp;

Once the local repository is ready, this may need to be accessible over a shared url.

We can use FTP or https share for this.

Steps for FTP below :

Install vsftpd package :
yum install -y vsftpd*

Edit the configuration file to have the content below :
vi /etc/vsftpd/vsftpd.conf

#Disable anonymous user Access to secure FTP server
anonymous_enable=NO
Allow local users to login in vsftpd.
local_enable=YES
Enable write access to local users.
write_enable=YES
Uncomment the line chroot_local_user
chroot_local_user=YES
Enable writable chroot.
allow_writeable_chroot=YES

systemctl restart vsftpd.service
systemctl enable vsftpd.service

Apply SELinux context to ftp directory :

semanage fcontext -a -t public_content_rw_t "/&lt;directory&gt;(/.*)?"
restorecon -R /&lt;directory&gt;
setsebool -P ftpd_anon_write 1 OR on

chown ftp /&lt;directory&gt;

The client would be able to access the share using url like below :
<strong>ftp://ftp.example.com/path/</strong>]]></content:encoded>
    </item>
    <item>
      <title>'Capture'd the virtual machine. Didn’t intend to generalize it. Now what?</title>
      <link>https://docs.microsoft.com/archive/blogs/shwetanayak/captured-the-virtual-machine-didnt-intend-to-generalize-it-now-what</link>
      <pubDate>Sun, 19 Mar 2017 18:49:28 GMT</pubDate>
      <dc:creator><![CDATA[shweta nayak]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/shwetanayak/?p=165</guid>
      <description><![CDATA[If you are using Azure Resource Manager virtual machines with Managed Disks, you would see a...]]></description>
      <content:encoded><![CDATA[If you are using Azure Resource Manager virtual machines with Managed Disks, you would see a 'Capture' option when you click on the Virtual Machine overview on the Portal

<a href="https://msdnshared.blob.core.windows.net/media/2017/03/19Mar1.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/19Mar1.png" alt="19mar1" width="1272" height="391" class="alignnone wp-image-175 size-full" /></a>

If you click on the button, it clearly mentions its use. You must proceed only if you have run a <b><i>sysprep</i></b> or generalized the OS inside the VM.

<a href="https://msdnshared.blob.core.windows.net/media/2017/03/19Mar2.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/19Mar2.png" alt="19mar2" width="984" height="163" class="alignnone wp-image-185 size-full" /></a>

This option helps us capture a VM Image that can be used to create multiple such VMs that use managed disks. It basically has the same outcome as the article below describes

Capture a managed image of a generalized VM in Azure

&lt;<a href="https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-capture-image-resource">https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-capture-image-resource</a>&gt;

&nbsp;

&nbsp;

If <em><strong>'Image'</strong></em> creation is not what you intend to do, this is not the right option to use.

If you intend to just take a copy or backup of the VM, you must use either Snapshot creation for managed disks

Create a copy of a VHD stored as an Azure Managed Disk by using Managed Snapshots

&lt;<a href="https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-snapshot-copy-managed-disk">https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-snapshot-copy-managed-disk</a>&gt;

Or Recovery Services

Back up Azure virtual machines to Recovery Services vaults

&lt;<a href="https://docs.microsoft.com/en-us/azure/backup/backup-azure-vms-first-look-arm">https://docs.microsoft.com/en-us/azure/backup/backup-azure-vms-first-look-arm</a>&gt;

&nbsp;

Having established that, we have had a couple of scenarios where customers have proceeded with the 'Capture' option without generalizing the OS.

<a href="https://msdnshared.blob.core.windows.net/media/2017/03/19Mar31.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/19Mar31.png" alt="19mar3" width="1054" height="663" class="alignnone wp-image-195 size-full" /></a>

&nbsp;

If you have faced a similar situation, here's how you could recover the machine.

Proceeding with the capture button marks the VM with a 'Generalized' flag since it basically assumes the administrator has run the steps at the OS level. The flag is also carried over to the existing disk, hence recreating the VM using the same disk does not fix the issue.

Instead, we could capture a snapshot of the disk using the steps below

Create a copy of a VHD stored as an Azure Managed Disk by using Managed Snapshots

&lt;<a href="https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-snapshot-copy-managed-disk">https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-snapshot-copy-managed-disk</a>&gt;

Once you have the snapshot, you may delete the VM from the Portal.

&nbsp;

Then recreate the machine using the existing NIC resources , but a new managed disk created from the snapshot, using commands like below

&nbsp;

Login-AzureRmAccount

&nbsp;

$rgName = ‘ResourceGroupName’

$vmName = ‘VMName’

$location = ‘South India’

$storageType = ‘PremiumLRS’

$snapshotName = 'snapshot1'

$snapshotResourceGroupName = 'SnapshotRGName'

$vmsize = 'Standard_DS2_v2'

$nicname = 'nic'

&nbsp;

$vm1 = New-AzureRmVMConfig -VMName $vmname -VMSize $vmsize

$snapshot = Get-AzureRmSnapshot -SnapshotName $snapshotName -ResourceGroupName $snapshotResourceGroupName

&nbsp;

$diskConfig = New-AzureRmDiskConfig -AccountType ‘PremiumLRS’ -Location $location -CreateOption copy -SourceResourceId $snapshot.Id

$OsDisk = New-AzureRmDisk -DiskName mdnew -Disk $diskConfig -ResourceGroupName $rgName

$vm1 = Set-AzureRmVMOSDisk -VM $vm1 -ManagedDiskId $osDisk.Id -CreateOption Attach -Windows

$nic = Get-AzureRMNetworkInterface -Name $nicname -ResourceGroupName $rgName

$vm1 = Add-AzureRmVMNetworkInterface -VM $vm1 -ID $nic.id

New-AzureRMVM -ResourceGroupName $rgName -Location $location -VM $vm1 -Verbose

&nbsp;

Once the VM comes up, it will be running as good as it was originally.]]></content:encoded>
    </item>
    <item>
      <title>Case Scenario : "no such partition" error while trying to start the VM after attempting to extend the OS drive</title>
      <link>https://docs.microsoft.com/archive/blogs/shwetanayak/case-scenario-no-such-partition-error-while-trying-to-start-the-vm-after-attempting-to-extend-the-os-drive</link>
      <pubDate>Sun, 12 Mar 2017 17:30:22 GMT</pubDate>
      <dc:creator><![CDATA[shweta nayak]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/shwetanayak/?p=106</guid>
      <description><![CDATA[This particular scenario is from my recent experience working with a customer facing the error...]]></description>
      <content:encoded><![CDATA[<div style="direction: ltr;border-width: 100%">
<div style="direction: ltr;margin-top: 0in;margin-left: 0in;width: 8.1631in">
<div style="direction: ltr;margin-top: 0in;margin-left: 0in;width: 8.1631in">
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt">This particular scenario is from my recent experience working with a customer facing the error "no such partition" when he tried to boot his Red Hat 7.2 machine on Azure. The issue began after customer attempted to extend his OS drive which was running out of space.</p>
&nbsp;

</div>
</div>
</div>
<div style="direction: ltr;border-width: 100%">
<div style="direction: ltr;margin-top: 0in;margin-left: 0in;width: 8.1631in">
<div style="direction: ltr;margin-top: 0in;margin-left: 0in;width: 8.1631in">
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt">The VM was showing up as Running from the Portal, however there was a boot issue with the Operating system.</p>
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt">This error could be seen under Virtual Machine &gt; Boot Diagnostics &gt; Screenshot in the portal</p>
&nbsp;

</div>
</div>
</div>
<div style="direction: ltr;border-width: 100%">
<div style="direction: ltr;margin-top: 0in;margin-left: 0in;width: 8.1631in">
<div style="direction: ltr;margin-top: 0in;margin-left: 0in;width: 8.1631in">
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt"><a href="https://msdnshared.blob.core.windows.net/media/2017/03/Untitled1.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/Untitled1.png" alt="untitled1" width="767" height="307" class="alignnone wp-image-115 size-full" /></a></p>
&nbsp;

</div>
</div>
</div>
<div style="direction: ltr;border-width: 100%">
<div style="direction: ltr;margin-top: 0in;margin-left: 0in;width: 8.1631in">
<div style="direction: ltr;margin-top: 0in;margin-left: 0in;width: 8.1631in">
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt">In such cases, we have to look into the OS vhd by attaching it to a working VM.</p>
&nbsp;

</div>
</div>
</div>
<div style="direction: ltr;border-width: 100%">
<div style="direction: ltr;margin-top: 0in;margin-left: 0in;width: 8.1631in">
<div style="direction: ltr;margin-top: 0in;margin-left: 0in;width: 8.1631in">
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt">We exported the VM properties using the command below, since it was Classic VM</p>
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt">Export-AzureVm -Name VMName -ServiceName CloudServiceName -Path "E:\Cs logs\redhat1.xml"</p>
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt">We attached the OS disk to working VM of the same linux flavor and version.</p>
&nbsp;

</div>
</div>
</div>
<div style="direction: ltr;border-width: 100%">
<div style="direction: ltr;margin-top: 0in;margin-left: 0in;width: 8.1631in">
<div style="direction: ltr;margin-top: 0in;margin-left: 0in;width: 8.1631in">
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt"><span style="font-weight: bold">Note :-</span> We strongly recommend taking a backup copy of the OS vhd prior to making any changes to it.</p>
&nbsp;

</div>
</div>
</div>
<div style="direction: ltr;border-width: 100%">
<div style="direction: ltr;margin-top: 0in;margin-left: 0in;width: 8.1631in">
<div style="direction: ltr;margin-top: 0in;margin-left: 0in;width: 8.1631in">
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt">When we ran fdisk on the attached data drive, we found that there was no boot partition present.</p>
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt">Ideally we should see a device /dev/sdc1 with the Boot flag '*' marked in the output below</p>
&nbsp;

</div>
</div>
</div>
<div style="direction: ltr;border-width: 100%">
<div style="direction: ltr;margin-top: 0in;margin-left: 0in;width: 8.1631in">
<div style="direction: ltr;margin-top: 0in;margin-left: 0in;width: 8.1631in">
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt"><a href="https://msdnshared.blob.core.windows.net/media/2017/03/Untitled2.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/Untitled2.png" alt="untitled2" width="1106" height="316" class="alignnone wp-image-125 size-full" /></a></p>
&nbsp;
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt">Now, it is important to understand the steps that the administrator performed on the boot partition, prior to running into this issue.</p>
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt">Since, in this scenario, customer was trying to extend the OS drive using the steps below, I suspected he had accidentally deleted the boot partition and missed recreating it.</p>
<p style="margin: 0in;font-family: Calibri;font-size: 11.0pt"><a href="https://blogs.msdn.microsoft.com/cloud_solution_architect/2016/05/24/step-by-step-how-to-resize-a-linux-vm-os-disk-in-azure-arm/">https://blogs.msdn.microsoft.com/cloud_solution_architect/2016/05/24/step-by-step-how-to-resize-a-linux-vm-os-disk-in-azure-arm/</a></p>

</div>
</div>
</div>
<div style="direction: ltr;border-width: 100%">
<div style="direction: ltr;margin-top: 0in;margin-left: 0in;width: 8.1631in">
<div style="direction: ltr;margin-top: 0in;margin-left: 0in;width: 8.1631in">
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt">We recreated the boot partition by running the command fdisk /dev/sdc</p>
&nbsp;
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt">Command 'n' for new partition.</p>
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt">Note that, since sdc2 begins from sector 1026048, sdc1 has to end at 1026047</p>
&nbsp;
<p style="margin: 0in"><a href="https://msdnshared.blob.core.windows.net/media/2017/03/Untitled3.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/Untitled3.png" alt="untitled3" width="956" height="288" class="alignnone wp-image-127 size-full" /></a></p>
&nbsp;
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt">Used command 'a' to toggle the boot flag.</p>
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt">Used command 'p' to list the partition table and verify that the settings are correct and 'w' to commit the writes.</p>
&nbsp;
<p style="margin: 0in"><a href="https://msdnshared.blob.core.windows.net/media/2017/03/Untitled4.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/Untitled4-300x46.png" alt="untitled4" width="496" height="76" class="alignnone wp-image-135" /></a></p>
&nbsp;
<p style="margin: 0in"><a href="https://msdnshared.blob.core.windows.net/media/2017/03/Untitled5.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/03/Untitled5-300x31.png" alt="untitled5" width="503" height="52" class="alignnone wp-image-145" /></a></p>
&nbsp;
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt"><span style="font-weight: bold">Note :-</span> In Linux, the partitions can be deleted and recreated, as long as the actual data at the File System level is not disturbed.</p>
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt">However, while doing so, make sure the sector numbers match exactly with the original partitions.</p>
&nbsp;
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt">Here, the admin had not made any changes at all to the file system, hence simply the recreation of boot partition was needed.</p>
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt">Since the boot partition had now been recreated, we were able to recreate the VM using the xml file saved earlier and it booted up fine, and we were successfully able to SSH to the machine.</p>
&nbsp;

</div>
</div>
</div>
<p style="margin: 0in;font-family: 'Segoe UI';font-size: 11.0pt">-Shweta Nayak</p>]]></content:encoded>
    </item>
    <item>
      <title>Learnings : Azure Availability Sets</title>
      <link>https://docs.microsoft.com/archive/blogs/shwetanayak/learnings-azure-availability-sets</link>
      <pubDate>Fri, 30 Dec 2016 16:15:56 GMT</pubDate>
      <dc:creator><![CDATA[shweta nayak]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/shwetanayak/?p=96</guid>
      <description><![CDATA[Availability Sets work great to ensure high availability of VMs.

&nbsp;

The article below...]]></description>
      <content:encoded><![CDATA[Availability Sets work great to ensure high availability of VMs.

&nbsp;

The article below describes the feature in detail, hope you find this useful.

<strong>Manage the availability of virtual machines</strong>

<a href="https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-manage-availability">https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-manage-availability</a>

&nbsp;

Here are some recommendations in order to make the best use of the Availability Sets :

Note that these are 'recommendations' and do not affect the supportability.
<ol>
 	<li>Place VMs belonging to same Application Tier in a single Availability set.</li>
 	<li>Maintain the same VM size or family for machines in the same Availability set.</li>
</ol>
&nbsp;

&nbsp;

Here are the reasons behind these recommendations

&nbsp;

<b>Load Balancing and VM failures</b>

The concept of Availability set focuses on the idea of having ‘replaceable’ VMs in each Application Tier.

<i>“</i><i>If your virtual machines are all nearly identical and serve the same purpose for your application, we recommend that you configure an availability set for each tier of your application. If you place two different tiers in the same availability set, all virtual machines in the same application tier can be rebooted at once. By configuring at least two virtual machines in an availability set for each tier, you guarantee that </i><i>at least one virtual machine in each tier will be available</i><i>.”</i>

As described above, the idea is to have at least one VM running in case of multiple points of failure. This could be any one of the VMs in the Availability set. During normal operations, the intent is to load balance the requests among the VMs in the Availability set. In both the scenarios, it is practical and most beneficial to maintain the VMs of the same size ( or family ) to ensure equal distribution of load and least impact, and hence the recommendation.

&nbsp;

&nbsp;

<b>Supportability of the VM size on the Physical Hardware cluster</b>

All running VMs in the availability set must be using the same physical hardware cluster. This is by design.

<i>“ </i><i>If all VMs are in the same VM Size family, then you can be assured they will all be supported on the physical hardware cluster which is used to host the VMs of the availability set. “</i>

Resize virtual machines

<a href="https://azure.microsoft.com/en-in/blog/resize-virtual-machines/">https://azure.microsoft.com/en-in/blog/resize-virtual-machines/</a>

&nbsp;

Due to this reason, we may run into Provisioning errors while Starting, Resizing or Provisioning one or more of the VMs when we try to use different size families in an Availability Set.

VM size family chart :

Refer to the table under section “Performance considerations” in the article below to get an idea of the VM size families.

<a href="https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-sizes">https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-sizes</a>

&nbsp;

&nbsp;

<b>Managing an Availability Set with multiple VM sizes</b>

Since the above are ideal recommendations, some administrators may still want to use multiple VM sizes in the same Availability Set. There are chances we may run into the error “Provisioning failed. Allocation failed. Please try reducing the VM size or number of VMs, retry later, or try deploying to a different Availability Set or different Azure location" while managing such setups.

&nbsp;

Here is how we would need to perform some of the operations in such scenarios

&nbsp;

Start Operations -

Stop all the VMs in the Availability Set. Start the one with the largest size first. This would ensure the hardware cluster allocated is compatible with the largest VM size and the ones started later ( smaller or same size ) can be hosted on the same hardware cluster.

&nbsp;

Resize Operations -

Stop all the VMs. Resize the VMs one by one - Once again first resize the ones with the largest target size.

Refer : Resize virtual machines

<a href="https://azure.microsoft.com/en-in/blog/resize-virtual-machines/">https://azure.microsoft.com/en-in/blog/resize-virtual-machines/</a>

&nbsp;

Adding a new VM of a different size family to the Availability Set -

Stop all the VMs in the Availability set. Introduce the new VM belong to the different size family ( assuming larger one ). Then start the other VMs. We would not need these steps if the new VMs being added belongs to a smaller VM size family.

&nbsp;

Of course, the above guidance assumes we are trying to use sizes that are supported in those regions and supported for resizing.]]></content:encoded>
    </item>
    <item>
      <title>Exchange Service Pack / Cumulative Update Installation Checklist</title>
      <link>https://docs.microsoft.com/archive/blogs/shwetanayak/exchange-service-pack-cumulative-update-installation-checklist</link>
      <pubDate>Wed, 02 Mar 2016 19:39:00 GMT</pubDate>
      <dc:creator><![CDATA[shweta nayak]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/shwetanayak/2016/03/02/exchange-service-pack-cumulative-update-installation-checklist/</guid>
      <description><![CDATA[Here are the set of steps to go through, to ensure the Exchange 2010 Service Pack upgrades or the...]]></description>
      <content:encoded><![CDATA[<p></p>
<p>Here are the set of steps to go through, to ensure the Exchange 2010 Service Pack upgrades or the Exchange 2013 Cumulative Update installations happen smoothly</p>
<p style="padding:0;margin:0;"></p>
<p style="padding:0;margin:0;"></p>
<ul>
<li>Make sure the Execution policies are set to unrestricted by running the command :</li>
</ul>
<p style="margin-left:30px;"><b>&nbsp; &nbsp;Get-ExecutionPolicy -list</b></p>
<p style="margin-left:30px;">&nbsp; &nbsp;You can run the command Set-ExecutionPolicy Undefined -Scope PolicyName</p>
<p style="margin-left:30px;">&nbsp; &nbsp;Refer</p>
<p style="margin-left:30px;">&nbsp; &nbsp;You receive error 1603 when you try to install the Exchange Server 2010 RU1</p>
<p style="margin-left:30px;">&nbsp; &nbsp;&lt;<a href="https://support.microsoft.com/en-us/kb/981474">https://support.microsoft.com/en-us/kb/981474</a>&gt;</p>
<p style="margin-left:30px;">&nbsp; &nbsp;This is also applicable to Exchange 2013</p>
<p style="margin-left:30px;"></p>
<p style="margin-left:30px;"></p>
<ul>
<li>Since the server is already in production, the Windows OS updates and system requirements will already be met.</li>
</ul>
<p style="margin-left:30px;">&nbsp; &nbsp;However, I would still suggest to go through the hotfixes section.</p>
<p style="margin-left:30px;">&nbsp; &nbsp;<a href="https://technet.microsoft.com/en-us/library/bb691354(v=exchg.141).aspx">https://technet.microsoft.com/en-us/library/bb691354(v=exchg.141).aspx</a></p>
<p style="margin-left:30px;">&nbsp; &nbsp;<a href="https://technet.microsoft.com/en-us/library/aa996719(v=exchg.141).aspx">https://technet.microsoft.com/en-us/library/aa996719(v=exchg.141).aspx</a></p>
<p style="margin-left:30px;"></p>
<p style="margin-left:30px;"></p>
<ul>
<li>Make sure we do not have anything additional installed that is unsupported.</li>
</ul>
<p style="margin-left:30px;"><b>&nbsp; &nbsp;Exchange Server Supportability Matrix</b></p>
<p style="margin-left:30px;">&nbsp; &nbsp;&lt;<a href="https://technet.microsoft.com/en-us/library/ff728623(v=exchg.150).aspx">https://technet.microsoft.com/en-us/library/ff728623(v=exchg.150).aspx</a>&gt;</p>
<p style="margin-left:30px;">&nbsp; &nbsp;For example, the .Net framework and Windows Management Framework installed should fall into the supportability matrix. There are instances where admnistrators inevitably or unknowingly install one of the unsupported versions of .Net or WMF that prevents future upgrades.</p>
<p style="margin-left:30px;">&nbsp; &nbsp;Check the Powershell version by running the command $PSVersionTable</p>
<p style="margin-left:30px;">&nbsp; &nbsp;.Net framework version could be checked under the registry location :</p>
<p style="margin-left:30px;">&nbsp; &nbsp;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full</p>
<p style="margin-left:30px;"></p>
<ul>
<li>Interim Updates if any, need to uninstalled before Exchange 2010 Service Pack installation. For Exchange 2013, they need not be uninstalled, we can go ahead with the Cumulative Update installation.<br />
<p>If at all there are&nbsp;UM-LanguagePacks installed, they need to uninstalled before upgrading, for Exchange 2010 and Exchange 2013 both.</p>
<ul>
<li style="list-style-type:none;">
<p></p>
<p></p>
</li>
</ul>
</li>
<li>Make sure we have the latest back-up of the Exchange databases and also system state backup of the AD environment</li>
</ul>
<p style="padding:0;margin:0;"></p>
<p style="padding:0;margin:0;"></p>
<ul>
<li>Note down any customizations such as OWA, config files on servers, registry changes, Lync integration, or third party add-ons, prior to the installation.</li>
</ul>
<p></p>
<p></p>
<ul>
<li>We could perform the PrepareAD in advance separately. This only needs to be done once for the whole environment.</li>
</ul>
<p style="margin-left:30px;"><b>&nbsp; &nbsp;Exchange 2010</b></p>
<p style="margin-left:30px;">&nbsp; &nbsp;setup.com /preparead</p>
<p style="margin-left:30px;"><b>&nbsp; &nbsp;Exchange 2013</b></p>
<p style="margin-left:30px;">&nbsp; &nbsp;setup.exe /preparead /IAcceptExchangeServerLicenseTerms</p>
<p style="margin-left:30px;">&nbsp; &nbsp;If this is not done, setup will automatically perform it at the time of the upgrade of the first server.</p>
<p style="margin-left:30px;"></p>
<p style="margin-left:30px;"></p>
<ul>
<li>Set the server to be upgraded to maintenance mode if it is mailbox role in Exchange 2013 ( with or without DAG) and if is a DAG member in Exchange 2010.</li>
</ul>
<p style="margin-left:30px;">&nbsp; &nbsp;&nbsp;<b>For Exchange 2010 :</b></p>
<p style="margin-left:30px;">&nbsp; &nbsp;.\StartDagServerMaintenance.ps1 &lt;ServerName&gt;</p>
<p style="margin-left:30px;">&nbsp; &nbsp;Remove it from maintenance mode using the command below</p>
<p style="margin-left:30px;">&nbsp; &nbsp;.\StopDagServerMaintenance.ps1&nbsp; &lt;ServerName&gt;</p>
<p style="margin-left:30px;">&nbsp; &nbsp;&lt;<a href="https://technet.microsoft.com/en-IN/library/ee861125(v=exchg.141).aspx">https://technet.microsoft.com/en-IN/library/ee861125(v=exchg.141).aspx</a>&gt;</p>
<p style="margin-left:30px;"><b>&nbsp; &nbsp;For Exchange 2013 :</b></p>
<p style="margin-left:30px;">&nbsp; &nbsp;Use the steps as suggested in the article below,</p>
<p style="margin-left:30px;">&nbsp; &nbsp;Exchange 2013 Maintenance mode</p>
<p style="margin-left:30px;">&nbsp; &nbsp;&lt;<a href="/b/nawar/archive/2014/03/30/exchange-2013-maintenance-mode.aspx">http://blogs.technet.com/b/nawar/archive/2014/03/30/exchange-2013-maintenance-mode.aspx</a>&gt;</p>
<p style="margin-left:30px;">&nbsp; &nbsp;Or the script ,</p>
<p style="margin-left:30px;">&nbsp; &nbsp;Exchange Server 2013 Maintenance Mode Script (Start)</p>
<p style="margin-left:30px;">&nbsp; &nbsp;&lt;<a href="https://gallery.technet.microsoft.com/office/Exchange-Server-2013-ff6c942f">https://gallery.technet.microsoft.com/office/Exchange-Server-2013-ff6c942f</a>&gt;</p>
<p style="margin-left:30px;">&nbsp; &nbsp;For CAS, take the node to be upgraded out of the Load Balancer.</p>
<p style="margin-left:30px;"></p>
<p style="margin-left:30px;"></p>
<ul>
<li>Then proceed with the installation from GUI or from Administrator command prompt by pointing to the location where the files have been downloaded. Files should be downloaded from Microsoft Download Center</li>
</ul>
<p style="margin-left:30px;"><b>&nbsp; &nbsp;Exchange 2010</b></p>
<p style="margin-left:30px;">&nbsp; &nbsp;Setup.com /m:upgrade</p>
<p style="margin-left:30px;">&nbsp; &nbsp; <b>Exchange 2013</b></p>
<p style="margin-left:30px;">&nbsp; &nbsp;Setup.exe /m:upgrade /IAcceptExchangeServerLicenseTerms</p>
<p style="margin-left:30px;"></p>
<p style="margin-left:30px;"></p>
<ul>
<li>Make sure to use an elevated command prompt and to close all the other Exchange windows at the time of setup.</li>
</ul>
<p></p>
<p></p>
<ul>
<li>Also make sure there were no pending reboots prior to beginning the installation.</li>
</ul>
<p></p>
<p></p>
<ul>
<li>The order of installation for Exchange 2010 :</li>
</ul>
<p style="margin-left:30px;">&nbsp; &nbsp;Client Access Server (if you have multiple sites, internet facing sites first)</p>
<p style="margin-left:30px;">&nbsp; &nbsp;Hub Transport</p>
<p style="margin-left:30px;">&nbsp; &nbsp;Mailbox</p>
<p style="margin-left:30px;">&nbsp; &nbsp;The order of installation for Exchange 2013 :</p>
<p style="margin-left:30px;">&nbsp; &nbsp;Mailbox (Internet-facing site first)</p>
<p style="margin-left:30px;">&nbsp; &nbsp;CAS</p>
<p style="margin-left:30px;">&nbsp; &nbsp;Edge</p>
<p style="margin-left:30px;"></p>
<p style="margin-left:30px;"></p>
<ul>
<li>Post the installation we must reboot the Exchange server.</li>
</ul>
<p></p>
<p></p>
<ul>
<li>I would also recommend to test the setup in a lab before installing it in production.</li>
</ul>
<p>&nbsp;</p>
<p></p>
<p>- Shweta</p>]]></content:encoded>
    </item>
    <item>
      <title>Usage of Get-StoreQuery to query against the managed store</title>
      <link>https://docs.microsoft.com/archive/blogs/shwetanayak/usage-of-get-storequery-to-query-against-the-managed-store</link>
      <pubDate>Fri, 30 May 2014 08:08:00 GMT</pubDate>
      <dc:creator><![CDATA[shweta nayak]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/shwetanayak/2014/05/30/usage-of-get-storequery-to-query-against-the-managed-store/</guid>
      <description><![CDATA[Exchange15 focusses on providing more Diagnostic information to customers. The Introduction of...]]></description>
      <content:encoded><![CDATA[<p>Exchange15 focusses on providing more Diagnostic information to customers. The Introduction of Managed Store feature in E15 provides a read-only access to the Store table.</p>
<p>Store Query is a function that basically uses Get-ExchangeDiagnosticInfo command in the background and provides output that would make sense to humans.</p>
<p><b>Through this Blog I am sharing a few ways I found the command could be used for some of the Basic troubleshooting, </b></p>
<p>&nbsp;</p>
<p>However first, let us see how to load this command.</p>
<p>We first have to run the ManageStoreDiagnosticFunctions.ps1 script in the Shell.</p>
<p><strong>[PS] C:\Windows\system32&gt;cd &quot;C:\Program Files\Microsoft\Exchange Server\V15\Scripts&quot;</strong></p>
<p><strong>[PS] C:\Program Files\Microsoft\Exchange Server\V15\Scripts&gt;. .\ManagedStoreDiagnosticFunctions.ps1</strong></p>
<p>The method above is called Dot sourcing as script. It loads the script into Powershell session instead of just running it.</p>
<p>&nbsp;</p>
<p><span style="text-decoration:underline;"><b>Display all the Tables in the Catalog</b></span></p>
<p><b>Get-StoreQuery -Database dbname -query &quot;select * from Catalog&quot; |ft</b></p>
<p><b>This command helps you get the list of all the Tables and TableFunctions&nbsp; in the catalog. Tables are basically present on the Disk, whereas the TableFunctions are present in the Memory.</b></p>
<p><b><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/63/1.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-02-63/1.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/63/1.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-02-63/1.png" border="0" /></a><br /></b></p>
<p align="center">&nbsp;</p>
<p><span style="text-decoration:underline;"><b>How to find out the mailbox Number</b></span></p>
<p><b>Since you may need to use the MailboxNumber instead of displayname in most of the queries, and it is also easier to use the mailboxNumber, here is how we could get the list of Mailboxes on a specific database.</b></p>
<p><b>Get-StoreQuery -Database dbname -query &quot;select * from Mailbox&quot; |ft MailboxNumber,DisplayName</b></p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/63/2.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-02-63/2.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/63/2.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-02-63/2.png" border="0" /></a></p>
<p>&nbsp;</p>
<p><b>Alternately, if we know the displayname, we can find out the MailboxNumber and other details as below :</b></p>
<p><b>Get-StoreQuery -Database dbname -query &quot;select * from Mailbox where DisplayName = &#39;tester1&#39;&quot;</b></p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/63/3.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-02-63/3.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/63/3.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-02-63/3.png" border="0" /></a><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/63/3.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-02-63/3.png"></a></p>
<p align="center">&nbsp;</p>
<p><span style="text-decoration:underline;"><b>Display information about a specific message in the Message table from the MID and MailboxNumber</b></span></p>
<p><b>Get-StoreQuery -Database dbname -query &quot;select * from Message where MessageID = &#39;0x9EAD721616F9D74B9CBF644606B6F49B000004A0D79D00000100&#39; and MailboxPartitionNumber = &#39;106&#39;&quot;</b></p>
<p>&nbsp;<b>We can obtain the properties of a message as below :</b></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/63/4.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-02-63/4.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/63/4.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-02-63/4.png" border="0" /></a></p>
<p align="center">&nbsp;</p>
<p><span style="text-decoration:underline;"><b>Find out the mailbox details based upon a UserSID</b></span></p>
<p>Scenario : We find out a specific Mailbox SID as the culprit, however we do not know which mailbox does the SID belong to.</p>
<p><b>Get-StoreQuery -Database dbname -query &quot;select * from MailboxInfo where UserSID = &#39;S-1-5-21-3088144668-2606371049-731046914-2053&#39;&quot; |fl</b></p>
<p>Here, we have found out that the SID &quot;S-1-5-21-3088144668-2606371049-731046914-2053&quot; Belongs to the Health Mailbox, which wouldn&rsquo;t have been listed from the Shell Window.</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/63/5.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-02-63/5.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/63/5.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-02-63/5.png" border="0" /></a><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/63/6.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-02-63/6.png"></a></p>
<p align="center">&nbsp;</p>
<p><span style="text-decoration:underline;"><b>Find out the transactions that took place on a specific MessageID/FID or a Mailbox</b></span></p>
<p><b>Get-StoreQuery -Database dbname -query &quot;select * from Events where MID = &#39;0x812782A445F65B40A0A6608432BF2EBD0000E550867E0000&#39;&quot;</b></p>
<p>We may use this to track pervious transactions at database and mailbox level.</p>
<p>The results give out transactions which occurred in that order. It also mentions the Object Class, which may be the Message Class or the Folder Type on which the transaction took place.</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/63/6.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-02-63/6.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/63/6.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-02-63/6.png" border="0" /></a></p>
<p>&nbsp;</p>
<p>Lastly, in order to make sure the Store Query function is working fine, we could run the command</p>
<p><b>Test-StoreQuery</b></p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/63/7.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-02-63/7.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/63/7.png" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-02-63/7.png" border="0" /></a></p>
<p>&nbsp;<b>We could use store querying in lot many other ways, do share if you come across other helpful usages.</b></p>
<p><b>Hope this was a helpful start to using Managed Store querying!</b></p>
<p><b>&nbsp;</b></p>
<p><span style="font-size:medium;">&nbsp;- Shweta</span><span style="font-size:medium;"><br /></span></p>
<p></p>]]></content:encoded>
    </item>
  </channel>
</rss>