Windows Server Core 2022 Tips & Tricks - How to install Hyper -V + managment
HTML-код
- Опубликовано: 26 фев 2024
- Support the channel : (any donation are appreciated) , god bless.
paypal.me/ITwi...
/ itwiz
#Install Hyper-V and management tools
Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -Restart
#Set some general hyper-v settings
Get-VMHost
Get-VMHost | fl *
#Create a new switch
New-VMSwitch -Name 'TestSW' -SwitchType Private
New-VMSwitch -Name 'TestSW' -SwitchType Internal
New-VMSwitch -Name 'TestSW' -SwitchType External
#Create a simple VM that boots from the CD and has a 512MB startup RAM value
New-VM -BootDevice CD -MemoryStartupBytes 512MB -Name 'Test1'
#Create the VM and assign it a switch; also make it generation 2
New-VM -BootDevice CD -MemoryStartupBytes 512MB -Name 'Test2' -SwitchName 'TestSW' -Generation 2
#Delete a VM; does not delete any HDDs that the VM uses
Remove-VM -Name 'Test3' -Confirm:$false -Force
#Create the VM and give it an existing VHDX file
New-VM -BootDevice CD -MemoryStartupBytes 512MB -Name 'TestVM3' -VHDPath 'C:\VMs\Virtual Machines\Test3.vhdx'
#Configure VM integration service checkboxes
Get-VMIntegrationService -VMName TestVM1
Disable-VMIntegrationService -Name 'Time Synchronization' -VMName 'Test1'
Enable-VMIntegrationService -Name 'Guest Service Interface' -VMName 'Test2'
#Configure SecureBoot
Set-VMFirmware -VMName 'Test2' -EnableSecureBoot Off
Set-VMFirmware -VMName 'Test2' -EnableSecureBoot On
#Create a new VHDX that is fixed
New-VHD -LogicalSectorSizeBytes 4096 -Path 'C:\VMs\Virtual Machines\TestVM3_D.VHDX' -SizeBytes 2000MB -Fixed
#Change a VM's startup order for Gen1 machines
Get-VMBios -VMName 'Test1'