What commands need to be run in Server 2008 R2 core for Hyper-V manager and SCVMM to work?

Hey guys,

We are just getting into setting up our production virtualized environment and just have a few questions, here is a quick layout of what we have:  We will have 2 Poweredge R610's running as our Hosts (server 2008 r2 core) with a Equallogic PS6000e as our SAN.  We also have another poweredge server as our management server and will be running SCVMM.  

When setting up Server 2008 r2 core, I have read that there are certain commands that need to be run to open up the firewall for things such as, server manager, mmc etc.  Also, when I open up sconfig there are 3 options to allow/enable mmc, windows powershell, server manager.  What all commands need to be run to get this production setup going? It looks like in Server 2008 core you had to run some other netsh commands for firewall settings but some you dont have to in R2.  Can someone explain what needs to be run and what the actual commands are doing?

Thanks for the help


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Syed Mutahir AliTechnology ConsultantCommented:


Install  Powershell on your server core  or hyper-v server :

First you  would have to install .NET  and then powershell (Follow the technet  forum link)





Download  the Powershell Management  Library for Hyper-V :

Then  follow this article to add the  Powershell Mgmt Library and start using  Powershell for your Hyper-V mgmt  tasks :

Following  are the commands from  the Powershell Library download at codeplex:

Finding   a VM
Get-VM, Choose-VM  , Get-VMHost

Connecting  to a VM

Discovering   and  manipulating Machine states
Get-VMState , Set-VMState ,    Convert-VmState,  
Ping-VM , Test-VMHeartBeat, Shutdown-VM ,    Start-VM,  Stop-VM, Suspend-VM
Get-VMKVP, Add-KVP, Remove-KVP,    Get-VMJPEG

Backing up, exporting and snapshotting VMs
Export-VM    , Import-VM, Get-VMSnapshot, Choose-VMSnapshot , Apply-VMSnapshot ,    New-VMSnapshot ,Remove-VMSnapshot, Rename-VMSnapShot,   Update-VMSnapshot,  Get-VMSnapshotTree, Get-VmBackupScript

Adding   and removing  VMs, configuring motherboard settings.
New-VM ,   Remove-VM  ,  Set-VM , Get-VMCPUCount, Set-VMCPUCount, Get-VMMemory,   Set-VMMemory,  Set-VMSerialPort

Manipulating Disk  controllers,  drives and  disk images
Add-VMSCSIController   ,  Remove-VMSCSIcontroller
Get-VMDriveByController ,  Add-VMDRIVE ,   Remove-VMdrive
Get-VMDiskByDrive, Add-VMDISK ,  Set-VMDisk,  Get-VMDisk
Get-VMFloppyDisk  , Add-VMFloppyDisk

Manipluating   Network  Interface Cards
Get-VMNic , List-VMNic , Choose-VMNIC,   Add-VMNIC,   Remove-VMNIC , Set-VMNICAddress , Set-VMNICConnection ,   Get-VMNicport ,  
Get-VMnicSwitch, Choose-VMSwitch, New-VMSwitchPort,    Get-VMByMACaddress, Choose-VMExternalEthernet,
New-VMExternalSwitch,    New-VMInternalSwitch,New-VmPrivateSwitch

Working  with VHD   files
Get-VHDDefaultPath, Get-VHDInfo, New-VHD,  Compact-VHD,   Test-VHD,Convert-VHD,Merge-VHD,Mount-VHD,  Unmount-VHD

HV Remote is a very good utility for setting up and managing, do not forget the powershell library for Hyper-V too.

SuperRhinoAuthor Commented:
HV Remote looks like a great tool but is it really necessary still in R2?  I thought I had read that there are really only a couple commands to open up certain firewall settings to get Hyper-V and SCVMM to work.  Also doesn't using SCVMM take the need away to use powershell?  
Syed Mutahir AliTechnology ConsultantCommented:

in Windows Server 2008 R2, there's an easy to use CLI, SCONFIG.  SCONFIG dramatically eases server configuration for Windows  Server 2008 R2 core deployments. With SCONFIG, you can easily  set your system up, get it on the network so you can easily manage the  server remotely.  Rename your computer? Press 2 and  you will be prompted to type in the computer name.  
Domain  join? Press 1 and you'll be prompted for name & password.
Simple and fast.
With SCONFIG you can easily have a Windows  Server 2008 R2 Server Core deployment setup in minutes.  I should also mention that SCONFIG is also localized in almost 20  languages.  
Tasks include:  Domain join  
Rename  Computer  
Configure Remote (Enable management via Server  Manager, & PowerShell including properly configuring the firewall.)  
Configuring Windows Update  
Enabling Remote Desktop  (in case you want to login remotely.)  
Configuring Networking  (static vs. DHCP and for multiple NICs)
All you have to do  is type sconfig at the command line.


To open firewall to allow remote management of HyperV service type  folowing line in your Hyper-V Server command prompt:
netsh firewall set portopening ALL 137 “Hyper-V Management”

also like to be able to copy ISO images to Hyper-V server and for  this reason you need to open another two ports or enable sharing. I did  it in this way:
netsh firewall set portopening ALL 139 “Sharing 01¿
netsh firewall set portopening ALL 445 “Sharing 02¿

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

SuperRhinoAuthor Commented:
Are the commands in Hyper-V Server the same as the commands in Server 2008 r2 core?  Basically this is the first time we are setting up Server core.  We will be running Server 2008 r2 core enterprise on the Host Machines and then running another Server 2008 r2 enterprise full on a management server.  On the management machine, we will be running SCVMM.  I just need the basic commands to get the Core servers ready to be managed from the SCVMM server.  From what I am readying online it looks like there is a few firewall commands to be done.  

Msmanji, this article is all about MMC firewall commands but it doesnt talk about anything else.  I would like to get some answers from someone that has setup SCVMM with hosts in a production environment.  No need to link links on something that you just googled as I have been googleing for days on getting some clear answers.  

Thanks for the responses though guys.
"Someone that has setup SCVMM with hosts in a production environment"
Will it make you feel any better to know that I fit that description.

I would like to clear something about giving you links to information. Googling would have been good. But this came from my favorites. The reason for linking is giving credit to the original person who posted it. It was useful for me and though it might be useful to you. Clearly it wasn't, for which, I humbly sorry.

SuperRhinoAuthor Commented:

I apologize so much, I wasn't trying to be mean.  I feel terrible, I had open a different article from googleing myself and thought it was the one you had linked.  I was completely mistaken!  I was going back through the answers/links that you had provided and when I did I realized that the link actually does have some good info.  Please do accept my apology.  Thank you so much for the link.  One of those days so far.
don't feel bad. No need for apologies. genuine misunderstanding. :)

Will try to compile something useful for you on the weekend.

Syed Mutahir AliTechnology ConsultantCommented:
Are the commands in Hyper-V Server the same as the commands in Server  2008 r2 core?  Basically this is the first time we are setting up Server  core.  We will be running Server 2008 r2 core enterprise on the Host  Machines and then running another Server 2008 r2 enterprise full on a  management server.  On the management machine, we will be running SCVMM.   I just need the basic commands to get the Core servers ready to be  managed from the SCVMM server

Yes the basic commands to setup a computer name, open firewall, rdp are the same or enhanced with "Hv remote", "core configurator".

Once you have set that up, you would have to use SCVMM 2008R2 to Manage Hyper-V Server 2008R2 or Windows 2008R2 Core.


Another article with the commands required to open firewall on server 2008R2 core :

Above are the commands required to open up your R2Core box to be managed by SCVMM.

Now, what is the information you need about SCVMM R2 ? is there anything in specific, as above is what you would need atleast to get your R2core or HyperServer R2 core up and running.

You can then Install VMM and connect to the hosts to manage them,
Have a look at this article

The following article will enable you to manage the server core machine firewall remotely.

As far as the VMM requirements are concerned, you only need to install the VMM agent on the hyper-V core machine.
Two ways to do that you either install using the VMM server which will take care of the port requirements (ports are mentioned in the above post by mutahir),
you install the VMM agent locally by using the setup provided in the media, in which case you are asked to enter ports on which the VMM Server will communicate with the hyper-V host. You need to match these with ports with the ports used during the VMM Server setup. normally these are port 80(HTTP, WinRM) and 443 (BITS).

After this you need to make sure that BITS and Windows Remote Management (WS-Management) are running as services on the Core machine. Use the article provided earlier to setup management of services remotely.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Virtual Server

From novice to tech pro — start learning today.