VMM: IP-Address Pools: Unterschied zwischen den Versionen
Aus Wiki-WebPerfect
Admin (Diskussion | Beiträge) K |
Admin (Diskussion | Beiträge) |
||
Zeile 9: | Zeile 9: | ||
$vNICs = $VM.VirtualNetworkAdapters | $vNICs = $VM.VirtualNetworkAdapters | ||
$IPPool = Get-SCStaticIPAddressPool -Name <"IP-PoolName"> | $IPPool = Get-SCStaticIPAddressPool -Name <"IP-PoolName"> | ||
− | Grant-SCIPAddress -StaticIPAddressPool $IPPool -GrantToObjectType | + | Grant-SCIPAddress -StaticIPAddressPool $IPPool -GrantToObjectType VirtualNetworkAdapter -GrantToObjectID $vNICs[0].ID -Description $VM.Name |
</source> | </source> | ||
Zeile 17: | Zeile 17: | ||
$vNICs = $VM.VirtualNetworkAdapters | $vNICs = $VM.VirtualNetworkAdapters | ||
$IPPool = Get-SCStaticIPAddressPool -Name <"IP-PoolName"> | $IPPool = Get-SCStaticIPAddressPool -Name <"IP-PoolName"> | ||
− | Grant-SCIPAddress -StaticIPAddressPool $IPPool -GrantToObjectType | + | Grant-SCIPAddress -StaticIPAddressPool $IPPool -GrantToObjectType VirtualNetworkAdapter -GrantToObjectID $vNICs[0].ID -Description $VM.Name -IPAddress <IP-Address> |
</source> | </source> | ||
Version vom 12. Dezember 2018, 17:15 Uhr
Inhaltsverzeichnis
Show IP-Address allocated to a IP-Address-Pool
(Get-SCStaticIPAddressPool <"IP-PoolName">) | Get-SCIPAddress | select Name, Description, State, ObjectType
Allocate new IP-Address to a VMM-IPAddress-Pool (Show which is the next IP address that VMM allocate to a VM -> VMM chooses the IP-Address)
$VM = Get-SCVirtualMachine -Name <"VMName"> $vNICs = $VM.VirtualNetworkAdapters $IPPool = Get-SCStaticIPAddressPool -Name <"IP-PoolName"> Grant-SCIPAddress -StaticIPAddressPool $IPPool -GrantToObjectType VirtualNetworkAdapter -GrantToObjectID $vNICs[0].ID -Description $VM.Name
Allocate new defined IP-Address to a VMM-IPAddress-Pool
$VM = Get-SCVirtualMachine -Name <"VMName"> $vNICs = $VM.VirtualNetworkAdapters $IPPool = Get-SCStaticIPAddressPool -Name <"IP-PoolName"> Grant-SCIPAddress -StaticIPAddressPool $IPPool -GrantToObjectType VirtualNetworkAdapter -GrantToObjectID $vNICs[0].ID -Description $VM.Name -IPAddress <IP-Address>
Revoke IP-Address
Get-SCIPAddress -IPAddress <IP-Address> | Revoke-SCIPAddress