Wednesday 31 August 2016

Customize the Remote Connection port for an Azure V2 VM

Customize the RDP port for an Azure V2 VM:

Plan A outlined below is more straightforward, we first change the RDP port from inside the VM, then we make Windows firewall and NSG rule to allow the new port.

Plan B outlined below is recommended. We use a NAT rule to route customized port --> 3389. In this way, we can change the external port anytime later and it doesn't involve additional modify from OS level.

Plan A
Important: Don't cut the branch while sitting on the branch!!
So, in a nutshell please note that :) Do not restart the server when prompted until and unless completing below steps 1 to 3. This can be hectic if you change port from registry level (mentioned in step 1) and then restart without allowing firewall port (mentioned in step 2)
step 1)      Change RDP port on Windows level.
For the steps, please refer to https://support.microsoft.com/en-us/kb/306759
step 2)      Allow the customized port on Windows Firewall.
step 3)      Allow the customized port on NSG.
To do this, go to Azure Portal, click on your VM name, click on Network Interfaces, click on the NIC name, select Network Security Group, click on the Network Security Group name, add the inbound security rule here.

Plan B
1)      Create the Azure Load Balancer.
2)      Create a Backend pool and associate it with the Load Balancer.
3)      Create a NAT rule to route the customized port to default 3389.
4)      Associate a NAT rule to the VM's NIC (VNIC)
For more detailed steps, you can refer to the articles below.

Troubleshooting The remote procedure call failed. [0x800706be] WMI Error in SQL Server 2012

SQL: You may end up getting "The remote procedure call failed. [0x800706be] WMI Error" when you click SQL Server Services in SQL Server Configuration Manager as shown in the snippet below.
This error pops-up when you have SQL Server 2008 or SQL Server 2008 R2 running along with SQL Server 2012 on the same machine OR you have installed Visual Studio 2012 OR while activating SharePoint 2013 features OR by activating any of the additional components you want to activate on the back-end machine (SQL 2012 & above) which thereby automatically installs SQL Server 2012 components.

One of the solution is to recompile MOF File to resolve "The remote procedure call failed. [0x800706be] WMI Error"
for this ..Open command prompt under administrative privileges i.e., using "Run as Administrator" and execute
mofcomp.exe "C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof"

Now, you can go ahead and open SQL Server Services under SQL Server Configuration Manger to see all SQL Server Services

BUT, in some cases we have experienced this may not turn out success for you.
So, make sure the SQL Server Configuration Manager which you are trying to OPEN is from the right executable version (SQL2008 or SQL2012) as there will be two executable files. So if you try to open the shortcut on a SQL 2012 installed machine you will definitely end up with EMI Error.. All what you can do is UNPIN and PIN the right executable.

Tuesday 31 May 2016

Simple GB Convertion in Excel

Format bytes a cell in Excel as KB, MB, GB etc?


Right click a particular cell, Format the cell and apply a Custom category and add to the 'Type' field [<1000000]0.00," KB";[<1000000000]0.00,," MB";0.00,,," GB"

works in office 2010 and above without any issues.

Thursday 23 October 2014

Network Load Balancing and Virtual Machines: Tuneup

SharePoint 2010 Web-Front-End NLB Tuning (points to be noted before configuring Network Load Balancing and Virtual Machines on Windows Server 2008 R2):
When running NLB as a Virtual Machine (VM) guest using Windows Server 2008 R2 Hyper-V you need to be aware of some specific configurations settings in Hyper-V host prior to configuring NLB. If you do not enable spoofing of MAC address prior to configuring NLB on the VM you could potentially have problems with the NLB cluster. 
When configuring NLB in unicast mode on Hyper-V with enable spoofing of MAC Address disabled you may see some of the following symptoms:
  • When initially configuring NLB you will lose network connectivity on the network adaptor NLB was configured on.
  • Either of the nodes NLB status might show converging instead of converged and healthy status.
  • There will be an NLB error event in the Windows Event Log stating that the network adaptor does not support dynamic MAC address updates.
  • After rebooting the server, NLB will appear to be bound to the network adapter, but the cluster VIP will not have been added to the network adaptor.
  • The cluster MAC address will still be the original MAC address associated with the network adaptor prior to configuring NLB.   Use CMD> ipconfig /all to view the MAC address.  It should start with "02-BF-***"
  • If you ignore all previous symptoms and manually add the VIP you could get an IP conflict if there are other nodes in the cluster that have the same VIP.
With that said, to allow VM guests to run NLB you need to set the VM property for "Enable spoofing of MAC Address". 
To enable spoofing of MAC Addresses open the Hyper-V management console.  Make sure the VM is stopped open the properties of the VM.  Select the Network Adaptor for the NLB VM and check the "Enable spoofing of MAC Address" and click OK.  Then start the VM.
also refer articles from technet here http://technet.microsoft.com/en-us/library/cc917873.aspx

Remote Desktop Licensing

Remote Desktop supports two concurrent connections to remotely administer a computer. You do not need a license server for these connections. However to permit more concurrent connections you need to acquire MS RD license.
Checklist: Configure Remote Desktop Licensing
For moving RD Licensing from an existing Remote Desktop license server to another server, use the steps in the below article.
For Migrating the RDS CALs from the existing license server to the new license server by using the Manage RDS CALs Wizard in Remote Desktop Licensing Manager, use the below link.
(Here you need to concentrate on the subheading Migrating CALs from Windows 2003 source to Windows 2008 R2 target)
Note: This can cause a downtime during the migration process.

Tuesday 20 May 2014

Remove Windows.old From a Server

Delete the windows.old from an upgraded Windows Client:Win7 & above or Server: 2008 & above
For a client OS that's upgraded, the Disk Cleanup utility can be used to delete the very large windows.old folder containing the old OS. This isn't available on a server OS without installing the Desktop Experience feature.
To delete, it is necessary to take ownership of the folder, give administrators full control, then delete. This can be done with the commands below:
  • takeown /F c:\Windows.old\* /R /A /D Y
  • cacls c:\Windows.old\*.* /T /grant administrators:F
  • rmdir /S /Q c:\Windows.old 
Using GUI: I improvised and claimed ownership of the parent folder as well as ensured I had Full Control and that all child folders and files were altered to inherit these attributes - at that point I deleted the folder successfully.