Before Mac refactor
This commit is contained in:
parent
519343ba51
commit
7499c37bff
@ -27,7 +27,6 @@ New-VM @vms
|
||||
Set-VMMemory SRV-01 -DynamicMemoryEnabled $true -MinimumBytes 512MB -StartupBytes 1024MB -MaximumBytes 2GB
|
||||
$vmadapter = Get-VMNetworkAdapter -VMName "SRV-01"
|
||||
Set-VMNetworkAdapter -VMNetworkAdapter $vmadapter[0] -StaticMacAddress 00155D027000
|
||||
# Endregion SRV-01
|
||||
|
||||
# RTR-01
|
||||
|
||||
@ -68,14 +67,17 @@ $vms = @{
|
||||
Generation = '2'
|
||||
MemoryStartupBytes = 1024Mb
|
||||
VHDPath = "d:\VHD\$VMName.vhdx"
|
||||
SwitchName = 'Arc-SRV'
|
||||
SwitchName = 'Bou-LAN'
|
||||
}
|
||||
|
||||
New-VM @vms
|
||||
|
||||
Set-VMMemory RTR-03 -DynamicMemoryEnabled $true -MinimumBytes 512MB -StartupBytes 1024MB -MaximumBytes 2GB
|
||||
#Add-VMSwitch -Name "WAN" -ResourcePoolName "WAN"
|
||||
Add-VMNetworkAdapter -VMName RTR-02 -SwitchName "WAN" -StaticMacAddress 00155D027004
|
||||
Add-VMNetworkAdapter -VMName RTR-02 -SwitchName "Bou-LAN" -StaticMacAddress 00155D027005
|
||||
|
||||
$vmadapter = Get-VMNetworkAdapter -VMName "RTR-01"
|
||||
Set-VMNetworkAdapter -VMNetworkAdapter $vmadapter[0] -StaticMacAddress 00155D027004
|
||||
Add-VMNetworkAdapter -VMName RTR-02 -SwitchName "WAN" -StaticMacAddress 00155D027005
|
||||
|
||||
|
||||
# RTR-03
|
||||
|
||||
@ -92,13 +94,17 @@ $vms = @{
|
||||
Generation = '2'
|
||||
MemoryStartupBytes = 1024Mb
|
||||
VHDPath = "d:\VHD\$VMName.vhdx"
|
||||
SwitchName = 'WAN'
|
||||
|
||||
}
|
||||
|
||||
New-VM @vms
|
||||
|
||||
Set-VMMemory RTR-03 -DynamicMemoryEnabled $true -MinimumBytes 512MB -StartupBytes 1024MB -MaximumBytes 2GB
|
||||
Add-VMNetworkAdapter -VMName RTR-03 -SwitchName "Aston" -StaticMacAddress 00155D027006
|
||||
Add-VMNetworkAdapter -VMName RTR-03 -SwitchName "WAN" -StaticMacAddress 00155D027007
|
||||
|
||||
$vmadapter = Get-VMNetworkAdapter -VMName "RTR-01"
|
||||
Set-VMNetworkAdapter -VMNetworkAdapter $vmadapter[0] -StaticMacAddress 00155D027006
|
||||
Add-VMNetworkAdapter -VMName RTR-03 -SwitchName "Aston" -StaticMacAddress 00155D027007
|
||||
|
||||
|
||||
Start-VM -Name RTR*
|
||||
|
8
Memo.ps1
8
Memo.ps1
@ -1,4 +1,4 @@
|
||||
#$VMNetAdap = Get-VMNetworkAdapter -VMName RTR-01|ft -Property Switchname,Macaddress -HideTableHeaders
|
||||
#$VMNetAdap = Get-VMNetworkAdapter -VMName RTR-01|ft -Property Switchname,Macaddress -HideTableHeaders
|
||||
Get-VMNetworkAdapter -VMName RTR-01|Format-Table -Property Switchname,Macaddress -HideTableHeaders |Export-Csv D:\scripts\Guests\MACS\test.csv -NoTypeInformation
|
||||
#echo $VMNETADAP | out-file -FilePath D:\scripts\Guests\MACS\temp.txt
|
||||
|
||||
@ -27,3 +27,9 @@ $adapter | New-NetIPAddress `
|
||||
-DefaultGateway $Gateway
|
||||
# Configure the DNS client server IP addresses
|
||||
$adapter | Set-DnsClientServerAddress -ServerAddresses $DNS
|
||||
|
||||
|
||||
Get-VMNetworkAdapter -VMName "Virtual 2008 1" | Where-Object -Property MacAddress -eq "00155D647100" | Rename-VMNetworkAdapter -NewName "vNIC1"
|
||||
|
||||
Get-NetAdapter |Where-Object {$_.MacAddress -eq 'XX-XX-XX-XX'} | Select-Object`
|
||||
-Property Name | Format-Table -HideTableHeaders
|
||||
|
Loading…
Reference in New Issue
Block a user