Hyper-V Core Commands Line

all windows list need install/remove
get-windowsfeature install-windowsfeature -Name Hyper-V -Restart
remove-windowsfeature -Name Hyper-V -Restart -=-=-=-=-=-=-=-
storage configuration
diskpart –> list volume -=-=-=-=-=-=-=-=-
Disk Management for remote admin
Netsh advfirewall firewall set rule group=”Remote Volume Management” new enable=yes
note: please run this command above on client and server then you can remote ‘Disk Management’ =-=-=-=-=-=-=-=-=-=-=-=-
Enabling File Sharing on Windows Server core
netsh advfirewall firewall set rule group=”File and Printer Sharing” new enable=Yes -=-=-=-=-=-=-=-=-
Set Hostname
netdom renamecomputer %COMPUTERNAME% /NewName:<NewComputerName> =–=-=-=-=-=-=-=-=-
Join Domain
netdom join %COMPUTERNAME% /domain:<DomainName> /userd:<UserName> /passwordd:* =-=-=-=-=-=-=-=-=-
Remove Domain
netdom remove =-=-=-=-=-=-=-=-=-=
Rename Network Interface
netsh interface set interface name=”old name” newname=”new name” =-=-=-=-=-=-=-=-=-=-
Configure IP Address
netsh interface ipv4 set address name=”<Interface Name>” source=static address=<IPAddress> mask=<SubnetMask> gateway=<DefaultGateway> =-=-=-=-=-=-=-=-=-=-
Configure DNS Servers
netsh interface ipv4 add dnsserver name=”<Interface Name>” address=<DNS Server IP> index=1 =-=-=-=-=-=-=-=-=–=-
Disable Firewall (not recommended)
netsh advfirewall set allprofiles state off =-=-=-=-=-=-=-=-=-=-=-=
Enable PowerShell Remoting
Enable-PSRemoting =-=-=-=-=-=-=-=-=-=-=-=
Enable Remotedesktop
netsh advfirewall firewall set rule group=”remote desktop” new enable=yes =-=-=-=-=-=-=-=-=-=-=-
Enable Remote Administration
advfirewall firewall set rule group=”Remote Administration” new enable=yes =-=-=-=-=-=-=-=-=-=-=-=-=-
Enable ICMP (Ping)
netsh firewall set icmpsetting 8 =-=-=-=-=-=-=-=-=-=-=-=
Change Administrator password
net user administrator * =-=-=-=-=-=-=-=-=-=-=-=-=-
get-vm – this displays any VMs provisioned on a Hyper-V host
get¬-vmhost – displays information about a Hyper-V host
get-vmmemory – Gets the memory of a virtual machine or snapshot
get-vmnetworkadapter – Gets the virtual network adapters of a virtual machine, snapshot, management operating system, or of a virtual machine and management operating system.
get-vmswitch – Gets virtual switches from one or more virtual Hyper-V hosts. =-=-=-=-=-=-=-=-=-=-=-=-=-=- Enable-NetFirewallRule -DisplayGroup “Windows Remote Management”
Enable-NetFirewallRule -DisplayGroup “Remote Event Log Management”
Enable-NetFirewallRule -DisplayGroup “Windows Firewall Remote Management”
Enable-NetFirewallRule -DisplayGroup “Remote Event Log Management”
Enable-NetFirewallRule -DisplayGroup “Remote Scheduled Tasks Management”
Enable-NetFirewallRule -DisplayName “Windows Management Instrumentation (DCOM-In)”
Set-Service VDS -StartupType Automatic =-=-=-=-=-=-=-=-=-=-=-=-=-=-
Install SNMP
Add-WindowsFeature -Name SNMP-Service -IncludeAllSubFeature -IncludeManagementTools –Restart –WhatIf -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

About Damon Luong

San Jose, California
This entry was posted in core. Bookmark the permalink.