Happy New Year

Another great year ends and 2012 is just around the corner. 2011 was a successful year but I think 2012 will be even better. The private cloud products we all have talked about in the past months like System Center 2012 and Windows Server 8 will finally be released. And I am sure a lot of other stuff is coming in 2012.
I hope you all had fun reading my blog posts and tweets. I have learned a lot in the past year and had the chance to talk to a lot of interesting people.

Some predictions for 2012:

  • 2012 will be the year of Hyper-V (by Aidan Finn)
  •  Windows 8 will be released ;-)
  • I will buy my first Windows Tablet
  • My blog will hit the magic line of 2000 unique visitors a day
  • A lot of interesting projects
  • System Center 2012 changes the datacenter
  • Windows Phone will get some market share
  • I will do my private cloud proof of concept for my diploma thesis

Thank you all and happy new year.

Hyper-V 3: Import and Export VMs with PowerShell

Hyper-V-Powershell02

Aidan Finn (Virtual Machine MVP) just made a blog post about Hyper-V & PowerShell in Windows Server 8 and how you can enable Hyper-V via PowerShell in Windows Server 8. So this gave me the idea about doing a little more with PowerShell and Hyper-V 3.

I already did a blog post about how you can attach multiple VHDs to a SCSI Controller with PowerShell in Windows Server 8. In this post I will show how easy you can export and import a lot of Virtual Machines.

First you can run a Get-VM Test*, to check which VMs you will export.


Get-VM Test*

Now you can export the Virtual Machines


Get-VM Test* | Export-VM -Path "C:\VMs"

Now I removed the Virtual Machines in Hyper-V with Powershell (You could also add the -confirm parameter so you don’t have to press “y” for each VM.


Get-VM Test* | Remove-VM

And now you can import the Virtual Machines again


Get-Childitem "C:\VMs" -Recurse *.xml | Import-VM

Hyper-V-Powershell01

I will post more about PowerShell in Windows 8 and Windows Server 8 (Hyper-V 3) in the next upcommig weeks. If you want know more about what new Hyper-V features and improvments are coming in Windows Server 8, you can read the following blog post: “Hyper-V: Version 3 kills them all

 

Enable RSAT on Windows Server 2008 R2 for Hyper-V

Hyper-V R2 SP1

With the Remote Server Administration Tools (RSAT) you can administrate the Server with remote consoles. Now you can download the Remote Server Administration Tools for Windows 7, but if you are on Windows Server 2008 R2 you can just enable the tools per ServerManagerCmd.exe.


ServerManagerCmd -install RSAT-Hyper-V
ServerManagerCmd -install RSAT-Clustering

 

Automated Active Directory Deployment with PowerShell

Powershell

For a small presentation at KTSI I created a PowerShell script will automatically will deploys Active Directory Servers, adds other member servers, creates Organization Units and adds users via Powershell Remoting. As source there is a XML configuration file and CSV files for User Data.

Install AD with Powershell

This script is just for Lab deployments not for production, and it is not perfect, but I think maybe some people will enhance this script with their own code.

I do not support this script. it is just something I need to deploy my test environments and nothing more. More it shows diffrent

You can find more information about it works in this document.

XML Config file:


<?xml version="1.0" encoding="utf-8"?>
<lab>
<config>
<servers>
<server name="ADS01" ip="192.168.100.11" id="1" adminpw="passw0rd"/>
<server name="ADS02" ip="192.168.100.12" id="2" adminpw="passw0rd"/>
</servers>
<ad>
<domain name="ktsi.local" netbiosname="ktsi" forestlevel="4" domainlevel="4" safemodepw="passw0rd" />
</ad>
<ous>
<ou name="UserAccounts" path="DC=KTSI,DC=LOCAL" />
<ou name="BASEL" path="OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="CHICAGO" path="OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="NEWYORK" path="OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="SALES" path="OU=BASEL,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="IT" path="OU=BASEL,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="ADMINISTRATION" path="OU=BASEL,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="PRODUCTION" path="OU=BASEL,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="SALES" path="OU=CHICAGO,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="IT" path="OU=CHICAGO,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="ADMINISTRATION" path="OU=CHICAGO,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="PRODUCTION" path="OU=CHICAGO,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="SALES" path="OU=NEWYORK,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="IT" path="OU=NEWYORK,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="ADMINISTRATION" path="OU=NEWYORK,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
<ou name="PRODUCTION" path="OU=NEWYORK,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
</ous>
<users>
<file name="users.csv" path="OU=ADMINISTRATION,OU=BASEL,OU=USERACCOUNTS,DC=KTSI,DC=LOCAL" />
</users>
<members>
<member name="PC101" ip="192.168.100.21" />
<member name="PC101" ip="192.168.100.22" />
<member name="PC101" ip="192.168.100.23" />
</members>
</config>
</lab>

The PowerShell Script:

Continue reading

Slipstream SQL Server 2008 SP2 for SCCM 2012

The Release Candidate version of System Center Configuration Manager 2012 requires MS SQL Server 2008 SP2 with Cumulative update package 6. Now this can be a little annoying and will hopefully change to SQL Server 2008 R2 in the RTM version.

Now if you want to install MS SQL Server 2008 on a Windows Server 2008 R2 you need at least a install media with SP1. Now this post shows you how you can integrate Service Pack 2 into the install media of SQL Server 2008.

  1. Copy the SQL Server 2008 install media to C:\SQLServer2008withSP2
  2. Download and copy the SQL Server 2008 Service Pack 2 files to C:\temp
  3. Now you can run the following commands:
    SQLServer2008SP2-KB2285068-IA64-ENU.exe /x:c:\SQLServer2008withSP2\PCU
    SQLServer2008SP2-KB2285068-x64-ENU.exe /x:c:\SQLServer2008withSP2\PCU
    SQLServer2008SP2-KB2285068-x86-ENU.exe /x:c:\SQLServer2008withSP2\PCUrobocopy C:\SQLServer2008withSP2\PCU c:\SQLServer2008withSP2 Setup.exe
    robocopy C:\SQLServer2008withSP2\PCU c:\SQLServer2008withSP2 Setup.rll
    robocopy C:\SQLServer2008withSP2\pcu\x86 C:\SQLServer2008withSP2\x86 /XF Microsoft.SQL.Chainer.PackageData.dll
    robocopy C:\SQLServer2008withSP2\pcu\x64 C:\SQLServer2008withSP2\x64 /XF Microsoft.SQL.Chainer.PackageData.dll
    robocopy C:\SQLServer2008withSP2\pcu\ia64 C:\SQLServer2008withSP2\ia64 /XF Microsoft.SQL.Chainer.PackageData.dllecho PCUSOURCE="C:\SQLServer2008withSP2\PCU" >> C:\SQLServer2008withSP2\x86\DefaultSetup.ini
    echo PCUSOURCE="C:\SQLServer2008withSP2\PCU" >> C:\SQLServer2008withSP2\x64\DefaultSetup.ini
    echo PCUSOURCE="C:\SQLServer2008withSP2\PCU" >> C:\SQLServer2008withSP2\ia64\DefaultSetup.ini
  4. After you have done this you can install the MS SQL Server
  5. After you have installed it, you still need to download and install the Cumulative update package 6 for SQL Server 2008 Service Pack 2

More about SQL Slipstreaming on Peter Saddow’s MSDN blog post.