Hello folks,
This blog post is meant to show you how you can move a virtual machine from Dynamic IP to a static IP Pool in System Center Virtual Machine Manager (SC VMM) for your virtual machines post deployments.
I deployed recently a virtual machine from VM Templates, however, during the deployment, I missed selecting the IP address to be Static IP (from a static IP Pool).
I ended up with a VM without an IP address.
![]()
A little bit of context about IP Pool in VMM.
An IP Pool is like a DHCP server. There is an IP address range, where you can configure basic options such as a gateway, the suffixes DNS and DNS itself, etc… An IP Pool is associated with a VM Subnet that belongs to a VM network. For each VM Subnet, it is possible to create one or more IP Pools while the IP addresses in the range belong to the VM subnet.
So after the VM is deployed, you cannot change the IP address mode in the UI from Dynamic to Static, the option will be greyed out as shown in the following screenshot.
![]()
If we click on Connection details… we can see the VM has no IP address assigned.
![]()
So what is the solution, then… PowerShell, of course!
By running the following script, we can update the IP address from Dynamic to Static IP Pool on the fly while the VM is running.
<#
.SYNOPSIS
Switch From Dynamic IP To Static IP Pool.
.DESCRIPTION
Switch From Dynamic IP To Static IP Pool in Virtual Machine Manager.
.NOTES
File Name : Set-SCVMIPAddressMode.ps1
Author : Charbel Nemnom
Date : 13-Mar-2021
Version : 2.0
Requires : PowerShell Version 3.0 or above, VMM IP Pools defined
OS : Windows Server 2016 or later with SCVMM 2016 or later
.LINK
To provide feedback or for further assistance, please leave a comment below.
.EXAMPLE
./Set-SCVMIPAddressMode -VMMServer <VMMServerName> -VM <VMName>
This example will switch <VMName> from Dynamic IP to Static IP Pool and assign a static IP Address
#>
[CmdletBinding()]
param(
[Parameter(Mandatory=$true, HelpMessage='VMM Server Name')]
[Alias('VMMServer')]
[String]$VMMServerName,
[Parameter(Mandatory=$true, HelpMessage='Virtual Machine Name')]
[Alias('VM')]
[String]$VMName
)
$VM = Get-SCVirtualMachine -Name $VMName
# Select The VM Network
$VMNetwork = Get-SCVMNetwork -VMMServer $VMMServerName | Out-Gridview -PassThru -Title 'Select VM Network'
# Select the VM Subnet
$VMSubnet = Get-SCVMSubnet -VMMServer $VMMServerName -VMNetwork $VMNetwork | Out-GridView -PassThru -Title 'Select VM Subnet'
# Select the IP Address Pool
$IPPool = Get-SCStaticIPAddressPool -VMMServer $VMMServerName -VMSubnet $VMSubnet | Out-GridView -PassThru -Title 'Select IP Address Pool'
# Select which Virtual NIC you want to apply Static IP Mode
$NIC = Get-SCVirtualNetworkAdapter -VMMServer $VMMServerName -VM $VM.Name | Out-Gridview -PassThru -Title 'Select VMs vNIC'
# Get a free IP address from the IP Pool
$IPAddress = Grant-SCIPAddress -GrantToObjectType VirtualNetworkAdapter -GrantToObjectID $VM.VirtualNetworkAdapters[($NIC.SlotID)].ID -StaticIPAddressPool $IPPool -Description $VM.Name
# Allocate to the vmNIC an IP Address from the IP Pool
Set-SCVirtualNetworkAdapter -VMMServer $VMMServerName -VirtualNetworkAdapter $VM.VirtualNetworkAdapters[($NIC.SlotID)] -VMNetwork $VMNetwork -IPv4AddressType Static -IPv4Addresses $IPAddress.Address
.\Set-SCVMIPAddressMode.ps1 -VMMServerName VMM01 -VMName DEMO-VM
When the job is completed, look back at the VM properties in VMM, and we can see the IP address is set to Static IP (from a static IP Pool).

Click on Connection details… to check if the VM has an IP address allocated from the IP Pool.
![]()
And lastly, login to the VM and ensure that these settings are reflected within the guest Operating System as well.
![]()
That’s it. Have a good one!
__
Thank you for reading my blog.
If you have any questions or feedback, please leave a comment.
-Charbel Nemnom-
Greetings! I’ve some trouble with IP in guest Windows system… In my template the checkbox for static IP is checked, but when Windows VM deployed we see correct IP from ip pool in VM properties and APIPA (169.254…) in guest OS. What we can perform to solve this?
Hello Sergey, thanks for the comment!
The issue of getting an APIPA (169.254.x.x) address inside the guest OS, despite the SCVMM showing the correct IP from the IP pool, suggests a few possible causes:
1) DHCP Relay/Configuration Conflict: In some environments, even with a static IP pool, DHCP conflicts can occur if DHCP relay or similar configurations exist. Check for any DHCP settings on the network level that might interfere with SC VMM’s static IP assignment.
2) VMM PowerShell Script Verification: If the guest OS still shows an APIPA address, try re-running the
Set-SCVMIPAddressMode.ps1script as described in this article, targeting the affected VM and explicitly assigning the static IP from the pool. The script can help ensure the IP is applied correctly. Does this work for you?If these steps don’t resolve it, you may want to check event logs in the guest OS for network adapter errors or conflicts and confirm network integration settings in SCVMM.
Greetings!
Thank you for your reply. The issue was in incorrect virtual disk for template. It wasn’t syspreped in correct way.
Hello Sergey, thank you for confirming!
Yes, this causes the network adapter issue in Guest OS due to the incorrect Sysprep.
I am happy to hear the issue is resolved now.