Exam AZ-104 All QuestionsBrowse all questions from this exam
Question 31

Your company has two on-premises servers named SRV01 and SRV02. Developers have created an application that runs on SRV01. The application calls a service on SRV02 by IP address.

You plan to migrate the application on Azure virtual machines (VMs). You have configured two VMs on a single subnet in an Azure virtual network.

You need to configure the two VMs with static internal IP addresses.

What should you do?

    Correct Answer: E

Discussion
[Removed]Option: E

Correct answer E. FYI: For the new PowerShell cmdlets you would use: Set-AzNetworkInterface

SanjSL

$Nic = Get-AzNetworkInterface -ResourceGroupName "ResourceGroup1" -Name "NetworkInterface1" $Nic.IpConfigurations[0].PrivateIpAddress = "10.0.1.20" $Nic.IpConfigurations[0].PrivateIpAllocationMethod = "Static" $Nic.Tag = @{Name = "Name"; Value = "Value"} Set-AzNetworkInterface -NetworkInterface $Nic https://docs.microsoft.com/en-us/powershell/module/az.network/set-aznetworkinterface?view=azps-6.5.0

jackdryan

E is correct

ricardona

Option E is the correct answer. The Set-AzureStaticVNetIP PowerShell cmdlet is used to set a static internal IP address for an Azure virtual machine. This cmdlet allows you to set the IP address, subnet mask, and default gateway for the virtual machine's network interface. Option A, New-AzureRMVMConfig, is used to create a new virtual machine configuration object. Option B, Set-AzureSubnet, is used to modify the properties of an existing Azure subnet, not to set static IP addresses for virtual machines. Option C, modifying VM properties in the Azure Management Portal, does not provide a way to set static IP addresses for virtual machines. Option D, modifying the IP properties in Windows Network and Sharing Center, only applies to the local network interface of the VM and does not set a static internal IP address for the VM on the Azure virtual network.

etrop

Thanks this saved a lot of headaches

QuantigoOption: E

Correct Answer E: Run the Set-AzureStaticVNetIP PowerShell cmdlet. https://docs.microsoft.com/en-us/powershell/module/servicemanagement/azure.service/set-azurestaticvnetip?view=azuresmps-4.0.0

blackmetalxOption: C

Set-AzureStaticVNetIP is for Classic VMs and will be retired on September 1, 2023. For new VM it can be don in the portal or using Powershell: https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/reset-network-interface #Add/Change static IP. This process will change MAC address $vnet = Get-AzVirtualNetwork -Name $VNET -ResourceGroupName $ResourceGroup $subnet = Get-AzVirtualNetworkSubnetConfig -Name $subnet -VirtualNetwork $vnet $nic = Get-AzNetworkInterface -Name $NetInter -ResourceGroupName $ResourceGroup #Remove the PublicIpAddress parameter if the VM does not have a public IP. $nic | Set-AzNetworkInterfaceIpConfig -Name ipconfig1 -PrivateIpAddress $PrivateIP -Subnet $subnet -PublicIpAddress $publicIP -Primary $nic | Set-AzNetworkInterface

GoldBear

The answer is now C and E. You can use the Portal or Powershell to make this change.

JWS80Option: E

E: Is correct however the command is no longer accurate. Set-AzNetworkInterface is the new command. C: You cannot change from dynamic to static in properties. In the portal go to your Virtual Machine, select networking, Select the Network Interface, Ip configurations, then the ipconfig at the bottom, where you can change it from dynamic to static

tsummeyOption: C

If this question is still on the test, the answer today would be C. You can log in to the portal, select the VM, then Networking followed by Network Settings. There is a box named 'Network Interface / IP Configuration' with a link. If you click on the link, you can change the associated IP to static. The PowerShell command 'Set-AzureStaticVNetIP' is still available in PowerShell: PS C:> Find-Command -Name Set-AzureStaticVNetIP Name Version ModuleName Repository ---- ------- ---------- ---------- Set-AzureStaticVNetIP 5.3.1 Azure PSGallery However, when I tried to use the cmdlet after verifying it's available, the result was: 'Set-AzureStaticVNetIP : The term 'Set-AzureStaticVNetIP' is not recognized as the name of a cmdlet, function, script file, or operable program.' That's just what I see today.

3c5adceOption: C

C. Modify the VM properties in the Azure Management Portal. This is the best option because it allows you to configure static internal IP addresses for the VMs directly through the Azure Management Portal, providing a user-friendly interface and ensuring the changes are correctly applied within the Azure environment. This method is effective and integrates seamlessly with other Azure services and configurations.

23169fdOption: C

the correct way to set a static internal IP address for Azure VMs is either by modifying the VM properties in the Azure Management Portal (Option C) or using the appropriate ARM-based PowerShell cmdlets (Set-AzNetworkInterfaceIpConfig), but not Set-AzureStaticVNetIP, which is deprecated for ARM deployments.

tashakoriOption: C

C is right answer

delacruzjoshua30Option: C

I think C can be a correct answer too. I have tried this multiple times already on our AzVMs.

photon99Option: E

Tbh, This Commandlet Set-AzureStaticVNetIP does not adheres to Az Powershell module name. It should start with Set-AzStaticVNetIP. Idk why they include such kinds of questions.

kamalpur

This question is explained in below video https://youtu.be/ldpefLkTy44

raj24051961Option: C

https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/virtual-networks-static-private-ip-arm-pportal

Fenix872

C is refering to windows and sharing center in Windows. Your link is referring to the Azure Portal, which is a possible solution, but not listed.

Nico1973Option: E

Based on the scenario provided, the correct option to configure the two Azure VMs with static internal IP addresses is: E. Run the Set-AzureStaticVNetIP PowerShell cmdlet. Explanation: The Set-AzureStaticVNetIP PowerShell cmdlet is used to set a static internal IP address for an Azure VM within a virtual network. This cmdlet allows you to specify the desired IP address that you want to assign to the VM within the Azure virtual network. By running this cmdlet, you can ensure that the VMs have static internal IP addresses as required for the application migration.

3c5adceOption: C

C. Modify the VM properties in the Azure Management Portal. This approach allows you to securely set and manage static IP configurations within the Azure infrastructure, ensuring that the settings are maintained across reboots and do not conflict with Azure’s network management.

nospamplsOption: E

https://learn.microsoft.com/en-us/powershell/module/servicemanagement/azure/set-azurestaticvnetip?view=azuresmps-4.0.0#example-1-set-the-virtual-network-ip-address-associated-with-a-virtual-machine

dhivyamohanbabuOption: E

Correct answer E