Tag: Core

Windows Server 2012: Install Hyper-V Role for beginners

Windows Server 2012 RC Logo

Still a lot of people haven’t tired Windows Server 2012 Hyper-V. Now this blog post should help them doing the first step with Windows Server 2012 Hyper-V.

If you install you want to install the Hyper-V role on a Windows Server 2012 you have basically two choices. First you can install the role with the Server Manager.

Add Hyper-V role Server Manager

Here you can choose if you want also the management tools for Hyper-V. The management include the Hyper-V Manager Console and the Hyper-V PowerShell module.

If you want to install the Hyper-V role via command line or you are using the Windows Server 2012 core installation. There is the following PowerShell cmdlets available.

  Add-WindowsFeature Hyper-V -Restart -IncludeManagementTools

The parameters -restart and -includeManagementTools are optional.



Windows Server 2012 – Add and Remove GUI

Windows Server 8

Microsoft worked hard on the management of the new Windows Server 2012. In Windows Server 2008 R2 you had to choose during the Installation if the Server is a Windows Server Full Installation (with GUI) or a Windows Server Core Installation (without GUI). In Windows Server 2012 you can add and remove the GUI from the server.

Add GUI on a Core Server

On a Core Server you can add the with the following PowerShell command

Add-WindowsFeature Server-GUI-Shell

add-windowsfeature server-gui-shell

After the Installation you have to restart the server

 Restart-Computer

AddGUIPowershell

Remove GUI on a Server

There are two ways you could do that, first via Server Manager remote the GUI feature:

RemoveGUI

Or via Windows PowerShell

 Remove-WindowsFeature Server-GUI-Shell

Remove GUI with Powershell

It is also important that you understand that Windows Server 2012 has three different GUI options.

  • Core
  • GUI
  • GUI with Management Tools

So if you activate the GUI you do not get all of the Management tools automatically. You have also to activate the “Management tools GUI”.



Replace netsh with Windows PowerShell – Basic network cmdlets

Some days ago I made a blog post about how you can replace diskpart.exe with the new cmdlets in Windows PowerShell v3. Now my next goal was to replace netsh with PowerShell.

Microsoft offers a lot of new cmdlets for networking tasks lets see what we have here. We got a lot of new PowerShell modules which are related to networking.

get-module

Now the two modules which sound really interesting are

NetAdapter
NetTCPIP

lets check which cmdlets are included

Get-Command -Module NetAdapter

net-adpater module

 Get-Command -Module NetTCPIP

Now lets start with NetAdpater.

List all Network Adapters

 Get-NetAdapter

get-netadapter

Just list Wireless Network Adapters

 Get-NetAdapter -Name *Wireless* 

get-netadapter wireless

Get more information VLAN ID, Speed, Connection status

 Get-NetAdapter | ft Name, Status, Linkspeed, VlanID 

get-netadapter information

Get driver information

 Get-NetAdapter | ft Name, DriverName, DriverVersion, DriverInformation, DriverFileName 

get-netadapter driver

Get adapter hardware information. This can be really usefull when you need to know the PCI slot of the NIC.

 Get-NetAdapterHardwareInfo 

get-netadapterhardwareinfo

Disable and Enable a Network Adapter

 Disable-NetAdapter -Name "Wireless Network Connection"
Enable-NetAdapter -Name "Wireless Network Connection" 

disable enable network adapter

Rename a Network Adapter

 Rename-NetAdapter -Name "Wireless Network Connection" -NewName "Wireless" 

rename network adapter

Now with the NetTCPIP PowerShell module we can work with IP settings

Get IP and DNS address information

 Get-NetAdapter -Name "Local Area Connection" | Get-NetIPAddress 

get-ipaddress

Get IP address only

 (Get-NetAdapter -Name "Local Area Connection" | Get-NetIPAddress).IPv4Address 

get-ipaddress only

Get DNS Server Address information

 Get-NetAdapter -Name "Local Area Connection" | Get-DnsClientServerAddress 

get-dnsserver

Set IP Address

 New-NetIPAddress -InterfaceAlias "Wireless" -IPv4Address 10.0.1.95 -PrefixLength "24" -DefaultGateway 10.0.1.1 

or if you want to change a existing IP Address

 Set-NetIPAddress -InterfaceAlias "Wireless" -IPv4Address 192.168.12.25 -PrefixLength "24"

Remove IP Address

 Get-NetAdapter -Name "Wireless" | Remove-NetIPAddress 

Set DNS Server

 Set-DnsClientServerAddress -InterfaceAlias "Wireless" -ServerAddresses "10.10.20.1","10.10.20.2"

Set interface to DHCP

 Set-NetIPInterface -InterfaceAlias "Wireless" -Dhcp Enabled

Now with this basic knowledge we can replace some of the basic netsh commands and ipconfig

netsh

ipconfig
netsh interface set interface "Local Area Connection" newname="Management"
netsh interface ipv4 set address "Management" static 192.168.10.101 255.255.255.0 192.168.10.1

Windows PowerShell

Get-NetAdapter
Rename-NetAdapter -Name "Local Area Connection" -NewName "Management"
New-NetIPAddress -InterfaceAlias "Management" -IPv4Address 192.168.10.101 -PrefixLength "24" -DefaultGateway 192.168.10.1


Remote Disk Management with “RPC server is unavailable” Error

If you have a Windows Server 2008 R2 Core Server or a Hyper-V R2 Server, which is also managed like a Core Server, you are really happy if you can use the Server Manager for this Remote Machine. Basiclly I had the the Remote Setup done. I could connect to the remote Machine with the Server Manager but when I tried to use the Disk Management on a remote Server and I got the following error “RPC server is unavailable”. After checking it I found the solution. The Problem is that the Firewall blocks the remote communication to virtual disk service. So you have to open the Firewall on the Management Machine

  1. First make sure you activated all the Remote Management options on the Remote Machine. I had all done this but its good to check that.
  2. Now you can run the following Command in cmd on the Management Machine to add the a new firewall rule
    netsh advfirewall firewall set rule group="Remote Volume Management" new enable=yes

firewall



How to add a Windows Server 2008 R2 Core as Secondary DNS Server

This shows you how you can add a secondary DNS Server to your Network on a Windows Server 2008 R2 Core.

  1. As usual you configure the Windows Server 2008 R2 Core with Sconfig
  2. Now install the DNS Server role on the Windows Server 2008 R2 Core
    Windows Server 2008 R2 Core DNS Serverstart /w ocsetup DNS-Server-Core-Role
  3. On the primary DNS Server open the DNS Server MMC
  4. Right click properties on the DNS zones you wanna transfer to the new core server
  5. Add the new DNS Server in the Name Server Tab. In this case this is server04.corp.pepsi.local
    Windows Server 2008 R2 DNS Server
  6. Allow Zone Transfers to this Server or Server in the Name Servers Tab
    Windows Server 2008 R2 DNS Server


How to add a Windows Server 2008 R2 Core as Secondary Domain Controller (replica)

This is a small How to which shows you how you can add a Windows Server 2008 R2 Core as a Secondary Domain Controller or Replica.

  1. sconfig Windows Server 2008 R2First configure the Core Server, Name, Domain, IP Adresse and more. You can use the command sconfig to run the Server Configuration Utility.
  2. Now you can go back to the Command Promt.
  3. Now you have to possibilities to install a Domain Controller. First you run dcpromo with a unattend file you have created and copied on the server, or you run dcpromo with some parameters. I decided to run dcpromo with the necessary parameters because I just need a simple replica.
  4. Now you can run the command on the Command Promt
    Dcpromo Windows Server 2008 R2 Core Dcpromo /unattend /replicaOrnewDomain:replica /replicaDomainDNSName:corp.pepsi.local /ConfirmGC:yes /username:corp’administrator /Password:* /safeModeAdminPassword:PepsiPassword
  5. After that the Server will run the installer and reboot.
    Windows Server 2008 R2 Core DCPROMO
  6. A replication connection was created
    Windows Server 2008 R2 AD Replication

If you need more Information about Active Directory Creation on a Windows Server 2008 Core Server you can checkout the Microsoft KB947034.



Cisco UCS and Microsoft Hyper-V R2

Last week we run our first tests with the Cisco UCS Bladecenter, VMware ESXi and Microsoft Hyper-V R2.

I am really excited about the performance and the easy management of the Cisco Bladecenter. Maybe I get some more information about Hyper-V and the UCS out there for next week.

There is also a Microsoft TechNet event next Tuesday:

Cisco Unified Computing System + Microsoft Hyper-V/System Center = die Komplettlösung für Virtual IT und Private Cloud