Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam AZ-104 All Questions

View all questions & answers for the AZ-104 exam

Exam AZ-104 topic 1 question 31 discussion

Actual exam question from Microsoft's AZ-104
Question #: 31
Topic #: 1
[All AZ-104 Questions]

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?

  • A. Run the New-AzureRMVMConfig PowerShell cmdlet.
  • B. Run the Set-AzureSubnet PowerShell cmdlet.
  • C. Modify the VM properties in the Azure Management Portal.
  • D. Modify the IP properties in Windows Network and Sharing Center.
  • E. Run the Set-AzureStaticVNetIP PowerShell cmdlet.
Show Suggested Answer Hide Answer
Suggested Answer: E 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Quantigo
Highly Voted 3 years, 2 months ago
Correct Answer E: Run the Set-AzureStaticVNetIP PowerShell cmdlet.
upvoted 19 times
...
blackmetalx
Highly Voted 2 months ago
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
upvoted 15 times
...
7bc6163
Most Recent 4 days, 11 hours ago
Selected Answer: C
To configure static internal IP addresses for Azure VMs in the Resource Manager model, modify the NIC properties in the Azure Portal. This ensures the IP address is managed correctly by Azure and avoids conflicts.
upvoted 1 times
...
MackD
2 weeks, 1 day ago
Correct answer is currently not applicable anymore. It should be Set-AzNetworkInterface See: https://learn.microsoft.com/en-us/powershell/module/az.network/set-aznetworkinterface?view=azps-12.4.0
upvoted 2 times
...
RVivek
4 weeks, 1 day ago
Selected Answer: C
Set-AzureStaticVNetIP The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement. https://learn.microsoft.com/th-th/powershell/module/servicemanagement/azure/set-azurestaticvnetip?view=azuresmps-4.0.0
upvoted 2 times
...
DT95
1 month ago
Selected Answer: C
E is wrong in 2024. The Set-AzureStaticVNetIP cmdlet is part of the classic (ASM) PowerShell module (Azure), which is deprecated. Answer is C: $nic = Get-AzNetworkInterface -Name <NIC_Name> -ResourceGroupName <Resource_Group> $nic.IpConfigurations[0].PrivateIpAllocationMethod = 'Static' $nic.IpConfigurations[0].PrivateIpAddress = '<Desired_IP_Address>' Set-AzNetworkInterface -NetworkInterface $nic
upvoted 4 times
...
Rovdy
2 months ago
El cmdlet Set-AzureStaticVNetIP se usaba en el antiguo modelo Azure Service Manager (ASM), que ya no se recomienda usar, ya que Azure ahora utiliza Azure Resource Manager (ARM). Por lo tanto, modificar la IP desde el portal es la mejor opción en el contexto actual. https://learn.microsoft.com/en-us/powershell/module/servicemanagement/azure/set-azurestaticvnetip?view=azuresmps-4.0.0
upvoted 1 times
...
kagomezfk
2 months ago
Correct Answer E
upvoted 1 times
...
EmnCours
2 months ago
Selected Answer: E
Specify a static internal IP for a previously created VM If you want to set a static IP address for a VM that you previously created, you can do so by using the following cmdlets. If you already set an IP address for the VM and you want to change it to a different IP address, you'll need to remove the existing static IP address before running these cmdlets. See the instructions below to remove a static IP. For this procedure, you'll use the Update-AzureVM cmdlet. The Update-AzureVM cmdlet restarts the VM as part of the update process. The DIP that you specify will be assigned after the VM restarts. In this example, we set the IP address for VM2, which is located in cloud service StaticDemo. Get-AzureVM -ServiceName StaticDemo -Name VM2 | Set-AzureStaticVNetIP -IPAddress 192.168.4.7 | Update-AzureVM
upvoted 4 times
...
tsummey
2 months ago
Selected Answer: 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.
upvoted 4 times
Debugs_Bunny
2 months ago
you need to have azure powershell module installed.
upvoted 1 times
...
...
SeMo0o0o0o
2 months, 3 weeks ago
Selected Answer: E
E is corerct
upvoted 1 times
...
lj114
2 months, 3 weeks ago
Selected Answer: C
Correct answer C.
upvoted 1 times
...
Bobip
3 months ago
Argue: ?! In the ARM model, setting a static IP address is typically done through the Azure Portal or by using ARM-specific PowerShell cmdlets like New-AzNetworkInterface or by specifying the static IP during VM creation via the New-AzVM cmdlet. The Set-AzureStaticVNetIP is not applicable in ARM, which is now the default and recommended deployment model in Azure.
upvoted 1 times
...
Nico1973
4 months, 2 weeks ago
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.
upvoted 1 times
...
23169fd
5 months, 2 weeks ago
Selected Answer: 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.
upvoted 3 times
...
3c5adce
6 months, 2 weeks ago
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.
upvoted 3 times
...
3c5adce
6 months, 2 weeks ago
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.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...