2016 Hyper-V Free WorkGroup Pseudo Script

2016 Hyper-V Free WorkGroup Pseudo Script

Kam Salisbury

Here is a pseudo script to set up the free Hyper-V Server 2016 hypervisor for home or small business use.

Planning

In addition to the specified system requirements, I recommend using an SDD type drive for the hypervisor operating system simply because they are faster than the larger spindle type drives. For the larger drives, I recommend planning two disks for a mirror (RAID1) and a third disk for temporary files. Shop around and do your research as you like. I chose two 2TB drives for the mirror (VMs) and a 1TB drive for the temporary files (ISOs, page files, etc) because they met my needs (Small business Hyper-V guest replica and test VMs for approximately 1-5 years) and price range.

Installation Pseudo Script

Install to the SSD drive.

Set static IP

Set host and workgroup names

Set time zone and time source

Download and install recommended updates

Diskpart:

Clean the mirror disks (and temporary files disk if desired)

Convert gpt

Convert dynamic (each disk)

Create volume mirror disk=x,y

Change the pagefile location to the temporary drive:

Verify current location: wmic pagefile list /format:list

Change the pagefile location: wmic pagefileset create name="D:\pagefile.sys"

Modify the pagefile settings: wmic pagefileset where name="D:\\pagefile.sys" set InitialSize=2048,MaximumSize=4096

Reboot...

Delete the old pagefile: wmic pagefileset where name="C:\\pagefile.sys" delete

More configuration:

Configuring for remote Hyper-V Manager (GUI) management in a work group: https://blogs.msdn.microsoft.com/virtual_pc_guy/2010/11/11/configuring-remote-management-of-hyper-v-server-in-a-workgroup/

Even more configuration:

However, Hyper-V Server 2016 is a "Server Core" installation. Other than enabling Remote Desktop to allow RDP'ing to the console (from sconfig at the server console), configuration is completed almost entirely at the command-line and/or via Powershell. Your needs will drive your web searches for solutions.

Or, adding a Windows Feature from Powershell: Add-WindowsFeature -name FS-FileServer

Then adding a user: net user User Password /add

Then setting that user's password expiration: WMIC USERACCOUNT WHERE Name='User' SET PasswordExpires=FALSE

Then sharing a folder; net share sharename=d:\scripts /grant:user,change /cache:none /remark:"HV Scripts"

Then installing an device management client: MerakiSM-Agent-systems-manager.msi /quiet

Or mapping a drive letter to another device's share to migrate data: net use x: \\ipaddress\share /user:AnotherUser

Or increasing security by renaming the Administrator account: wmic UserAccount where Name="Administrator" call Rename Name="new-name"

Powershell is the ultimate Muti-use tool though. For example;

Get-VM (displays the status of all VMs Hyper-V Server 2016 knows about)

Get-VM -Name "VM1" | Format-List * (Displays all VM settings for a Hyper-V guest named VM1)

Set-VM -Name "VM1" -ProcessorCount 2 (Changes the configured number of processors to 2)

Start-VM -Name "VM1" (Spins up the Hyper-V guest named VM1)

Report Page