Creating Self Signed Certificates in Windows 10

February 18, 2015

Did you know you can create self signed certificates in Windows 10?
To be honest you can do it in Windows 8.1 and Windows Server 2012 R2 as well :)

I will be using self signed certificates in my WAP lab.

First you start Powershell and use the New-SelfSignedCertificate cmdlet.

To understand how to use the cmdlet I type:

help New-SelfSignedCertificate

PS C:\> help New-SelfSignedCertificate

NAME
    New-SelfSignedCertificate

SYNTAX
    New-SelfSignedCertificate [-DnsName <string[]>] [-CloneCert <Certificate>] [-CertStoreLocation <string>] [-WhatIf]
    [-Confirm]  [<CommonParameters>]

ALIASES
    None

REMARKS
    Get-Help cannot find the Help files for this cmdlet on this computer. It is displaying only partial help.
        — To download and install Help files for the module that includes this cmdlet, use Update-Help.
        — To view the Help topic for this cmdlet online, type: “Get-Help New-SelfSignedCertificate -Online” or
           go to http://go.microsoft.com/fwlink/?LinkId=386828.

To create my certificate I enter the command:

New-SelfSignedCertificate -certstorelocation cert:\localmachine\my -dnsname *.awesome.se

Make note of the certificate thumb print we are needing that when we export the certificate.

image

If we then use the Export-PfxCertificate to export our certificate we might get the following error message stating that Export-PfxCertificate : Password and ProtectTo cannot both be absent.

image

If you add the -Password YourPassword to your command you will recieve another error message stating:
Export-PfxCertificate : Cannot bind parameter ‘Password’. Cannot convert the “YourPassword” value of type “System.Strin
g” to type “System.Security.SecureString”.

image 

What we need to do is to create a variable and store our password and use that in our export command.

$CertPwd = ConvertTo-SecureString -String “YourPassword” -Force –AsPlainText

The complete export command looks like this:
Export-PfxCertificate -cert cert:\localMachine\my\BEF89AC19107DEB96494BCDF589791B689FBEC96 -FilePath c:\temp\AwesomeCert.pfx -Password $CertPwd


Microsoft Ignite: Content Catalog Deep Dive

February 3, 2015

I have been playing around with the Microsoft Ignite Content Catalog and  must say I like what I see.

There are currently 274 282 371 Ignite Sessions listed in the Catalog and I think there will be more then a thousand sessions when the conference kicks of on Star Wars Day, May the 4:th.

So back to the Content Catalog with that huge amount of sessions there needs to be a great way to sort out the sessions. The session catalog of Microsoft Ignite is the best I have seen so far.

The catalog is dynamic in multiple dimensions and will automatically react to the settings you define. The result is a personalized list of sessions.

The Search Session Catalog function gives you the ability to search the entire catalog for keywords.

image

A quick look in the Products list displays 0 Azure Pack sessions but the search returns two hits at the moment. So don’t be alarmed if the topic you are looking for isn’t displayed, do a search for it. :)

Dynamic filters

On the left side are the filters sorted into six areas, Audiences, Topics, Formats, Products, Themes and Levels

image

Simply click the area/areas of interest and  the list will dynamically change to display the sessions associated with your selection.

Lets say you want to learn the best practices in upgrading SQL Server. You click SQL Server in the Products section, Best Practices in the Formats section and Level 400 in the Levels section. That will direct you to the session “Upgrading and Migrating Microsoft SQL Server”

Each area displays several related categories

The Audiences area displays the sub categories, IT Influencers and Implementers, Enterprise Developers, IT Decision Makers and Architects

image

In Topics we find Deployment & Implementation, Usage & Adoption, Development, Security & Access Management, Architecture, Operations & Management, Governance & Compliance, Upgrade & Migration

image

Formats lets you choose; Overview, Best Practices, Deep Dive, How to, What’s New, Pre-Day Sessions, Business Value, Strategy, Customer Showcase

image

Products, listed at the moment are:
Office 365, Azure, Exchange, SharePoint, Windows, Skype for Business, SQL Server, Visual Studio, Office Client, Yammer, Windows Server, OneDrive, Delve, System Center, Project, Surface, Visual Studio Online, Microsoft Intune, Application Insights, Team Foundation Server, Visio, .NET, ASP.NET, Azure Pack, Dynamics

image

Themes lists Productivity and Collaboration, Cloud, Big Data, Mobility, Unified Communications, Security and Compliance, Social and Internet of Things

  • image

All sessions are graded into Levels, 400, 300, 200, 100

image

Level 100;
is an introductory and overview session. Assumes little or no expertise with topic and covers topic concepts, functions, features, and benefits.

Level 200;
means intermediate leveled content will be presented. Assumes 100-level knowledge and provides specific details about the topic.

Level 300;
this session contains advanced material. Assumes 200-level knowledge, in-depth understanding of features in a real-world environment, and strong coding skills. Provides a detailed technical overview of a subset of product/technology features, covering architecture, performance, migration, deployment, and development.

Level 400;
this is the expert session often with detailed material. Assumes a deep level of technical knowledge and experience and a detailed, thorough understanding of topic. Provides expert-to-expert interaction and coverage of specialized topics.

This concludes my initial explanation of the Microsoft Ignite Catalog. I will continue this exploration when future functions are reviled. The schedule building process very much involves knowledge of the content catalog.

Have you registered yet? Go to the Microsoft Ignite Registration page and do it today

custblogbling

I hope we meet in Chicago…

Ahh I also found a currently hidden section in the content catalog when I poked around. The hidden section called Roles and I expect it to be reviled soon, perhaps in combination with the schedule builder function of the catalog. The list contains sub categories that will add further filtering options.

  • IT Generalist
  • CIO, CTO, CISO, or Chief or Sr. Architect
  • Cloud Services Architect/Administrator
  • Director of MIS, IS, or IT
  • Technical or Business Consultant
  • Mgr, Cloud Services, Planning, & Support
  • Cloud Services Support
  • Cloud Services/Business Systems Analyst
  • Security/Storage/Web Admins
  • Mgr, App Development & Support
  • Systems/Network/Datacntr Admin
  • Technology Trainer or Teacher
  • Chief or Sr. Architect
  • Mgr, Infrastructure, Networking, or Datacenter
  • CEO or CFO or COO
  • Help Desk/Call Center Support
  • Power Users
  • VP of MIS, IS, or IT
  • Business Analyst
  • Journalists
  • LOB Managers
  • Researchers
  • VP or Executive/Senior Vice President
  • Database, BI & Data Warehouse Admin
  • Owner/Partner
  • President/Chairman
  • Sales
  • Unofficial IT Person (Office Manager, SMB Owner)
  • Chief Officer
  • Social Manager

Update: Microsoft Ignite Pre-Day Sessions are live with Speakers listed

January 28, 2015

Update: Even if the speakers aren’t listed in the full catalog yet, the speakers for the Pre-day sessions are. :)

From the registration page you can find the speakers of each pre-day session. I have updated the Pre conference session list below.

If you have registered for Microsoft Ignite or still work at getting approval to attend. You now have the opportunity to improve your chances and further extend your Ignite experience.
Today a list of 17 all day Pre-Day Sessions have been posted.
These sessions give you an opportunity to really dig in to a topic and retrive knowledge and insights of noted industry experts.

Pre-Day Sessions will take place on Sunday, May 3, from 9:00am – 5:00pm and are an additional investment of $500. The Pre-Day Session fee includes a full day of dedicated class time with a noted industry expert, lunch, and materials (if applicable).

C’ya in Chicago!


Windows 10 as primary OS here we go.

January 28, 2015

Today i will convert my primary PC to Windows 10. I have been playing around with it since the Preview and been thinking of making the shift for some time now.

I will use the Disk2vhd utility to create a VM of my old install so that I can get access to the old OS if i need to.

Disk2vhd is really easy to use, download the software, unpack and execute the disk2vhd.exe file.

image

Select the drives you need. Default format is Vhdx. If you want to upload it to Azure un-check the box to create a vhd. Since I will run this on a VM on my new Windows 10 install I keep the defaults.

image

Click Create

Disk2vhd takes a snapshot of the disk and starts to build the vhdx.


Nesting Hyper-V Part 2

January 9, 2015

In the first part of this series of blog posts I explained how to nest Hyper-V on Hyper-V.

This time we will nest Hyper-V on a VMware ESXi. This will add the functionality to have running VM:s on Hyper-V. This solution is off course not supported by either VMware or Microsoft so do not attempt to do this in a production environment. The use case for this install is to learn the beauty of Microsoft Cloud OS or perhaps install an environment to prepare for a certification exam that involved mutiple Hyper-V installations like the Microsoft Virtualization exam 74-409 covered in the MVA Course Server Virtualization with Windows Server Hyper-V and System Center, or any of the System Center Private Cloud exams 70-246 and 70-247

Create a bootable USB flash drive for Vmware ESXi

First you need to register and download the free Vmware ESXi

Once you have downloaded the ISO you either need to burn it to a CD or as in my case create a bootable USB drive and install the hypervisor.

I use the Netbootin tool which I find really easy to use.

clip_image002

Choose DISKIMAGE and browse to the location you have downloaded the ISO and click OK

clip_image003

Click Yes to overwrite the menu.c32 file

clip_image004

Click Exit to end the process. If you would like to install ESXi on the same machine click Reboot Now

Insert the USB drive to your machine and install VMWare ESXi from your USB drive.

To be able to take screenshots of the procedure I use VMware workstation. I have always use the ESXi version because I want as little overhead as possible. (The software isn’t free but you get a 30 day trial in case you want to try this on your PC)

Step 1 Install VMware ESXi

If you haven’t worked with VMware products before I made a Step by Step instruction on how to install it.

Select the ESXi standard installer

clip_image006

The installer loads

clip_image008

Once the installer has loaded you will see a screen similar to this showing your hardware configuration.

clip_image010

To start the installation press Enter

clip_image012

Scroll down to the end of the EULA and press F11

clip_image014

Select the disk where you will install ESXi (You can install it on a 1 GB flash drive to save precious storage on your rig)

clip_image016

Select keyboard layout and press Enter

clip_image018

Enter a password for root (Built in Administrator account) press Enter

clip_image020

clip_image022

To start installing press F11 (notice that the disk will be repartitioned)

clip_image024

When the installation is completed press Enter to reboot

clip_image026

When the hypervisor comes back up again you are met with a similar screen.
Make a note of the URL or type it in your browser to connect to the installs.
If you don’t want DHCP or want to configure a static IP address you need to log on using the password you created earlier. Press F2

To skip the configuration skip to the next step

clip_image028

Enter your password and press Enter

clip_image030

Select configure Management Network and press Enter

clip_image032

Select Set static IP address and network configuration and add your IP configuration. Press Enter to apply your settings.

clip_image034

You will be prompted to apply the changes and restart the management network press Y

clip_image035

Step 2 Installing the vSphere client

Open the address noted in previous step and click Continue to this website

clip_image037

Click the link Download vSphere Client

clip_image039

Download the client and install it on your PC (Next, Next,,,Finish)

Connecting to ESXi using VMware vSphere Client.

Enter your IP address and log on using root and your password

clip_image041

When you have logged on you are met by a message stating that the host lacks persistent storage, that is expected since you haven’t configured datastore. A datastore is the place where you place your VMs (virtual machines) and other system files such as ISOs, templates. Datastores are equivalent to Microsoft CSV and VMM libraries.

Step 3 Create a Datastore in the vSphere Client

Click the link click here to create a datastore

clip_image043

Select the disk that will be configured as a datastore.and click Next (If you are using VMware Workstation you will have to add another disk to the ESXi VM and rescan)

clip_image045

Select VMFS-5 click Next

clip_image047

Click Next

clip_image049

Enter a datastore name, and click Next

clip_image051

Select capacity and click Next

clip_image053

Review your settings and click Finish

clip_image055

Your datastore is created and is visible in the vSphere client.

clip_image057

Step 4 Create a VM in vSphere Client and install Windows Server 2012 R2

Click FileàNewàVirtual Machine (or right click the host)

Select Custom and click Next

clip_image059

Enter the name of your Hyper-V VM and click Next

clip_image061

Select the datastore where your VM will be stored and click Next

clip_image063

Choose Virtual Machine Version 8 and click Next

clip_image065

Select guest OS Microsoft Windows Server 2012 (64-bit) and click Next

clip_image067

Select the numbers of virtual CPUs and click Next (Take into consideration the hardware you are installing upon and the number of Hyper-V hosts you will install)

clip_image069

Configure the VM memory size and click Next (Take into consideration the hardware you are installing upon and the number of Hyper-V hosts you will install)

clip_image071

Add the number of NICs you need and click Next

clip_image073

Select LSI Logic SAS and click Next

clip_image075

Select Create a new virtual disk and click Next

clip_image077

Specify the disk size and click Next

clip_image079

Click Next

clip_image081

Review your settings and click Finish

clip_image083

When the V; is created Right click and select Settings

On the hardware tab choose CD/DVD drive and select the place where you have your Windows Server 2012 R2 media, tick the Connect at power on checkbox and click OK.

clip_image085

Start your VM and install Windows Server 2012 R2

clip_image087

When your Windows Server 2012 R2 is installed make sure you install the VMware tools to enhance the performance of the VM.

Step 5 Nesting Hyper-V on VMware ESXi

If we try to add the Hyper-V role to our installation now we get the following error message.

clip_image088

To trick Windows Server 2012 R2 into believing that it’s install on physical hardware we need to add some parameters to the configuration file.

First we need to shut down the VM.

When the VM is turned off Right click and choose Remove from Inventory. On the Confirm Remove pop up, click Yes (don’t worry nothing will be deleted.

clip_image089

Right click the Datastore where you stored your VM and select Browse Datastore

Select the folder of your VM (as you can see I have a folder called ISO from which I installed the VM to create such a folder just right click and create the folder)

clip_image091

The file we are looking for is the *vmx file. Select the file and click

clip_image093

clip_image095

Once you downloaded it we need to edit the file. I use Notepad ++ since I already have it on my PC (Don’t use Notepad the file is character sensitive and Notepad adds the wrong character set, if I remember correct WordPad does :) )

Add the following rows to anywhere in the file, I add them on the end.

vhv.enable = “TRUE”

hypervisor.cpuid.v0 = “FALSE”

If you are copying the text from the blogpost make sure the character is correct or else it will not work.

clip_image096

Save the file and upload it again

clip_image098

Use the same button if you want to upload files like ISOs to the Datastore.

Once the file has been uploaded, Right click the *.vmx file and choose Add to Inventory

Leave the suggested name and click bNext (Having mismatch between the VM and the filenames can be a real pain when troubleshooting)

clip_image100

Click Next

clip_image102

Review the settings and click Finish

clip_image104

Before we start the VM we need to add the Intel® VT-x/AMD-V™ instruction set.

Right click the VM and choose Settings, click the Option tab and select CPU/MMU Virtualization and change the option box from Automatic to Use Intel® VT-x/AMD-V™ for instruction set virtualization and Intel ® EPT/AMD RVI for MMU virtualization click OK

clip_image106

Now start the VM and install the Hyper-V role :)

clip_image108

In my next blog post I will start installing the Windows Azure Pack on my lab servers.

The install will consist of two VMware ESXi hosts with three nested Hyper-V hosts on each. If you want to follow along make sure you have your nested Hyper-Vs patched and ready.


Time summarize 2014

December 31, 2014

Well its time to look back at 2014.

The year had a slow start with a long assignment away from home, which wasn’t ideal. On top of that my application for TechEd Houston was turned down.

In May it turned around, something that made me really happy happened. I was invited by Microsoft to the TechEd Europe Roundtable discussions in Barcelona.

A long warm summer followed with much fun with my family.

In August I started a new job at Crayon and a really busy autumn followed.

Thanks to my #theKrewe friends I once again went down to Barcelona in October for TechEd Europe and was staffing during the Ask the Experts evening.

In early December I traveled to Amsterdam to attend a Microsoft Cloud OS training.

I look forward to 2015 I got a feeling that the new year has a lot to offer.

See you on the other side


Nesting Hyper-V Part 1

December 31, 2014

My first blog post is also one of my most successful Lab-V, nesting Hyper-V creating your own lab

I thought it is about time I make a proper post out of that one. I can’t even remember how many times I have battled the really useful feature of nesting hypervisors. Follow my vlog and you will learn the awesome stuff you can do with nested hypervisors.

We will start by nesting Hyper-V on Hyper-V for those of you that just want to get familiar with nesting on the Microsoft platform. Microsoft Hyper-V has some limited functionality that enables you to nest Hyper-V.

Nesting Hyper-V on Hyper-V:

  1. Download and install the Windows assessment and deployment kit for Windows 8.1 Update 
    Select your installation folder
    image
    Choose wheter or not to participate in the CEIP
    image
    Accept the License Agreement
    image 
    Select the features you want to install:
    We only need this feature for this exercise.
    image 
  2. Mount and copy the content of your Windows 2012 R2 ISO to a folder. In my case C:\TempInst\Win2012R2.Lab-V
  3. Open a command prompt and enter the command
    dism /get-ImageInfo /ImageFile:C:\TempInst\Win2012R2.Lab-V\sources\install.wim
    image 
    Choose witch version you’d like to edit
    1. Create a empty folder on to whish you will execute your imagedism /Mount-Image /ImageFile:C:\TempInst\Win2012R2.Lab-V\sources\install.wim /Index:4 /MountDir:C:\TempInst\Lab-V
      image 
      To get a list of features run the command
      dism /Image:C:\TempInst\Lab-V /Get-features /Format:List
  4. We will enable the Hyper-V feature
    dism /Image:C:\TempInst\Lab-V /Enable-Feature:Microsoft-Hyper-V
    image 
  5. Save the changes and unmount the image
    dism /Unmount-Image /mountdir:C:\TempInst\Lab-V /commit
    image

Now create a ISO of the folder C:\TempInst\Win2012R2.Lab-V and use it to install a VM in your environment and voila a woring Hyper-V inside your Hyper-V.

Now to the not so god part, you can create VMs inside the nested Hyper-V but you cannot start them. I have debated several hours regarding the usefulness of this, but for now that’s the way it is.

To be able to do so you must use another hypervisor. But that is my next blog post, stay tuned


Follow

Get every new post delivered to your Inbox.