Monday, March 13, 2017

How to Edit the Windows registry remotely

 

Here I’m going to show steps to change the RDP default port in a server.

In my case, what happened was I have changed the RDP port in my azure environment and change the endpoint policy accordingly. Unfortunately, I was not able to RDP into my Azure VM and not able to connect through the Azure portal also.

Then I have added a another PC into the same resource group (Which will reflect the same subnet) and connect to the server registry remotely and edit that.

Here I’ll show two methods to change default RDP port a Server.

1. RDP Port Change – Locally

Go into registry and go to

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber

image

Select edit DWORD and select Decimal. You will see the port 3389 given and change that to the port which you want to change. Click OK to save.

 

image

2. How to Edit the Windows registry remotely

Open the Registry editor in another PC which is in same subnet. Go to File> Connect to network Registry.

image

Then select the PC or the saver name which you want to remotely connect.

image

Now you will be able to control the registry in the other server.

image

If you want to change the RDP port back to default or another port, now you should be able to do that by go into below location.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber

Saturday, March 11, 2017

Create a Resource group in Azure

Here I’m gonna talk about creating the Resource group by using PowerShell.

First you need to login into the Azure portal by using the subscription that you have.

image

Then give the correct credentials and remotely connect to your Azure portal.

To Deploy a resource  first you need to find the correct location. To find the a available  locations you can run Below Command,

Get-AzureRmLocation | sort DisplayName | Select DisplayName 

PS C: Get—AzureRmLocation 
Di spl ayName 
Australia East 
Australia Southeast 
Brazi I South 
Canada Central 
Canada East 
Central US 
East Asia 
East US 
East US 2 
Japan East 
J apan West 
North Central US 
North Europe 
South Central US 
Southeast Asia 
UK South 
UK West 
I sort DisplayName 
Sel ect 
Di spl 
West 
West 
West 
West 
Central US 
Europe

To Create a new Azure Resource group, you can try the following command. Here I have used the Resource group name as "SL_Resource_Group" and the location as "East Asia"

New-AzureRmResourceGroup -Name "SL_Resource_Group" -Location "East Asia"

PS C : New—AzureRmResourceGroup 
—Name 
" SL_Res our ce_Group" 
r'East Asia" 
—Location

You will get the confirmation as below,

Resour ceGroupName 
Locat i on 
Pr ovi si oni ngState 
Tags 
Resour celd 
SL_Resource_Group 
eastas i a 
. Succeeded 
. 'subscriptions/l 
/ r esour ceGr oups roup

Here I'm going to create a VM by using a already given script. Once you run that, It will  create the VM under the resource group which you have created earlier. This will prompt for username, Password, DNS name 

New-AzureRmResourceGroupDeployment -ResourceGroupName "SL_Resource_Group" -TemplateUri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vm-simple-windows/azuredeploy.json

PS New—AzureRmResourceGroupDepIoyment —ResourceGroupName "SL_Resource_Group" 
cmdlet Nee—AzureRmResourceGroupDepIoyment at cormand pipeline position I 
-T ateUr 
"https : / [raw. gi 
Supply values for the following parameters: 
(Type !? for Help.) 
adminUsername: HemaIAdmi n 
cmdlet New AzureRmResourceGroupDepIoy... 
adminpassword 
adminpassword 
Running script/ selection. 
Press Ctrl*3reak to stop. Press Ctrl+3

Thursday, March 9, 2017

Azure VPC not resolving O365 autodiscovery

 

O365 need to have a Autodicover.yourdomainname.com pointing to autodiscover.outlook.com when its come to autodiscovery configuration,

Here I’m going to highlight few things if you are facing and issue with configuring the outlook with 0365.

  • Check whether you have added the correct CNAME record in your domain Cpannel and whether that is propagate correctly.
  • To check the propagation, you can find some famous free web site from the Internet.
  • Then by using Microsoft Tool, you can find where is the problem now and the resolution to solve that issue. Most of the time this will give you a hint to find a path to resolve the issue.
  • if it says your computer is still not resolving DNS, then  you can try one of the following method to resolve that.

In your PC or the Server you can do below mentioned task to forward your Autodiscover traffic to “autodiscover.outlook.com “

1.If you know the IP address of  “autodiscover.outlook.com “ domain then add a host   entry in your PC saying that “Atodicover.yourdomainname.com”  traffic forward to that IP address which you have found.

2. If your PC or the server is in a domain environment, then add a CNAME in your DNS saying that for the “Autodicover.yourdomainname.com”  traffic forward to  “autodiscover.outlook.com “

Here you can find the steps for adding that in your DNS,

Go to DNS settings, Add a New Zone.

image

New Zone Wizard 
Welcome to the New Zone 
Wizard 
This wizard helps you create a nevv zone for your DNS 
A zone translates DNS names to related data, such as [P 
addresses or newvork services. 
To continue, dick Next. 
< Sack

Select Primary zone in the next window,

New Zone Wizard 
Zone Type 
The DNS server supports various types of zones and storage. 
Select the type of zone you want to create: 
@ Primary zone 
Creates a cop,' of a zone that can be updated directly on this server. 
O 
Secondary zone 
Creates a com of a zone that exists on another server This opton helps balance 
the gruessing load of primary servers and provides fault tolerance. 
C) Stub zone 
Creates a com of a zone containing only Name Server O'S), Start of Authority 
(SOA), and possibly glue Host (A) records. A server containing a stub zone is not 
authoritatve for that zone. 
[e] Store the zone in Active Directory (available only ifDNS server is a writeable domain 
con tr oller)

New Zone Wizar 
Dynamic Update 
You can specify that this DNS zone accepts secure, nonsecure, or no dynamic 
updates. 
Dynamic updates enable DNS dient computers to register and dynamically update their 
resource records with a DNS server whenever changes xcur. 
Select the type of dynamic updates you want to allow: 
@ Allon only secure dynamic updates (recommended for Active Directory) 
This option available only for Actve Directory-integrated zones. 
C) Allon both nonsecure and secure dynamic updates 
Dynamic updates of resource records are accepted from any client. 
This opton is a significant security vulnerability because updates can be 
Lis 
accepted from untrusted sources. 
O 
Co not allon dynamic updates 
Dynamic updates of resource records are not accepted by this zone. You must update 
these records manually.

image

Under that zone give your autodiscover address and the 0365 one.

image

Once that done that, go into CMD and check the DNS status.

Now you will able to resolve that O365 autodiscovery DNS issue.

image