Thursday 1 February 2018

Microsoft Azure DNS Management Using Powershell






FILE -> New -> DNS ZONE -> After Creating you set Named server on Godaddy. And Namedserver copy from DNS Zone.







Next Go TO PowerShell Write->  nslookup.exe

==================POWERSHELL CODE====================================
Windows PowerShell
Copyright (C) 2012 Microsoft Corporation. All rights reserved.

PS C:\Users\satyabrata> nslookup.exe
Default Server:  satya.test.co.in
Address:  142.188.1.2

> nslookup
Server: satya.test.co.in
Address:  142.188.1.2

*** satya.test.co.in can't find nslookup: Non-existent domain
> set q*Ns
> Dolna.in
Server:  satya.test.co.in
Address:  142.188.1.2
Name:    Dolna.in
> 52.237.76.149                                      ///This is Generate by us.
Server:  satya.test.co.in
Address:  142.188.1.2

*** satya.test.co.in can't find 52.237.76.149: Non-existent domain
> > nslookup.exe
Server:  satya.test.co.in
Address:  142.188.1.2

Non-authoritative answer:
Name:    nslookup.exe.co.in
Address:  72.52.4.122

> dolna.in
Server:   satya.test.co.in
Address:  142.188.1.2

Non-authoritative answer:
Name:    dolna.in
Address:  52.237.76.149




New -> PublicIP Address ->




Next Go to DNS -: Create a Record Set ->


Next Go to DNS -: Create a Another Record Set with CNAME ->





========================Final Power Shellk Work===============


Windows PowerShell
Copyright (C) 2012 Microsoft Corporation. All rights reserved.

PS C:\Users\satyabrata> Login-AzureRmAccount


Account                  : satya@test.onmicrosoft.com
SubscriptionName : Microsoft Azure
SubscriptionId        : 67ffdff-1962-6777-ba2d-df5677777
TenantId                 : d6d56df-2aff3-4ad1-8eb0-hhhhh6666
Environment           : AzureCloud



PS C:\Users\satyabrata> Get-AzureRmSubscription


Name     : Microsoft Azure
Id       : ddd-1962-ddd66-ba2d-ad0570f72ec2
TenantId : d56666-2a93-4ad1-8eb0-f17c9247b5dc
State    : Enabled



PS C:\Users\satyabrata> Select-AzureRmSubscription -SubscriptionId ddd-1962-ddd66-ba2d-ad0570f72ec2


Name             : [admin@swashconvergencetech.onmicrosoft.com, 64aeb01f-1962-46b0-ba2d-ad0570f72ec2]
Account          : satya@satyatest.onmicrosoft.com
SubscriptionName : Microsoft Azure
TenantId         :ddd-1962-ddd66-ba2d-ad0570f72ec2

Environment      : AzureCloud

PS C:\Users\satyabrata> Get-AzureRmPublicIpAddress -ResourceGroupName SATYAERP -Name dolnatestip
Name                     : dolnatestip
ResourceGroupName        : SatyaERP
Location                 : southeastasia
Id                       : /subscriptions/56dfd-1962-46b0-ba2d-ad0570f72ec2/resourceGroups/SatyaERP/providers/Mic
                           rosoft.Network/publicIPAddresses/dolnatestip
Etag                     : W/"dcd17847-690a-4b1d-9eb8-d86875e61146"
ResourceGuid             : fgg5555-8a38-41be-8b9a-cf9593564b6a
ProvisioningState        : Succeeded
Tags                     :
PublicIpAllocationMethod : Static
IpAddress                : 52.237.76.149
PublicIpAddressVersion   : IPv4
IdleTimeoutInMinutes     : 4
IpConfiguration          : null
DnsSettings              : {
                             "DomainNameLabel": "dolnatestip",
                             "Fqdn": "dolnatestip.southeastasia.cloudapp.azure.com"
                           }
Zones                    : {}
Sku                      : {
                             "Name": "Basic"
                           }
PS C:\Users\satyabrata>  New-AzureRmPublicIpAddress -ReverseFqdn rdns.dolna.in
-ResourceGroupName KenCloudERP -Name dolnatestip -Location "southeastasia" -AllocationMethod Static -DomainNameLabel dolnatest
WARNING: The output object type of this cmdlet will be modified in a future release.
Confirm
Are you sure you want to overwriteresource 'dolnatestip'
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): Y

Name                     : dolnatestip
ResourceGroupName        : SatyaERP
Location                 : southeastasia
Id                       : /subscriptions/ddd44-1962-46b0-ba2d-ad0570f72ec2/resourceGroups/SatyaERP/providers/Mic
                           rosoft.Network/publicIPAddresses/dolnatestip
Etag                     : W/"gg666-f0e9-43f9-9f1f-f85fb6ce28c3"
ResourceGuid             : 666666-8a38-41be-8b9a-cf9593564b6a
ProvisioningState        : Succeeded
Tags                     :
PublicIpAllocationMethod : Static
IpAddress                : 52.237.76.149
PublicIpAddressVersion   : IPv4
IdleTimeoutInMinutes     : 4
IpConfiguration          : null
DnsSettings              : {
                             "DomainNameLabel": "dolnatest",
                             "Fqdn": "dolnatest.southeastasia.cloudapp.azure.com",
                             "ReverseFqdn": "rdns.dolna.in"
                           }
Zones                    : {}
Sku                      : {
                             "Name": "Basic"
                           }



PS C:\Users\satyabrata>

No comments:

Post a Comment