Tag: Image

Run Azure PowerShell in a Docker Container Image

Run Azure PowerShell in a Docker Container

Yesterday, the Azure PowerShell team announced the Azure PowerShell Docker Container images. In this post, I want to quickly highlight that announcement and show you how you can download, pull, and run Azure PowerShell in a Docker container image from Microsoft.

But first, let’s talk about why you would want to run an Azure PowerShell in a Docker container. Azure is continuously evolving, and the Azure PowerShell team releases a new version of the Azure PowerShell modules every three weeks. This makes it challenging to maintain a production or development environment up to date and ensuring the smooth execution of scripts. With the Azure PowerShell docker container image, you can quickly run scripts against a specific version of Azure PowerShell.

The team highlights the current scenarios:

  • On the same machine, you can run scripts that are using a different version of Az with no conflicts.
  • You can test a script against a different version of Az with no risks.
  • You can run the latest container image interactively.

Windows Terminal Background Acrylic Opacity

How to Change the Windows Terminal Background Image

As you may know, Microsoft released a new Windows Terminal, which is currently in preview. However, it has some great new features, and a lot of people are currently trying it out. Now I got a lot of questions about how you can change the background of the Windows Terminal. So I decided to write a quick blog post about how you can configure and customize the Windows Terminal background image. There are multiple ways you can do this. And you can not only change the color or use a background image, but you can also change the opacity, and if it should use the acrylic Windows effect.

Customize the Windows Terminal Background Image

First open the settings of the Windows Terminal app, which will open a JSON file, where the settings are stored.

Windows Terminal Settings

Windows Terminal Settings

This will allow you to customize the settings and colors of the terminal. Every console has a so-called profile, which you can modify. Let’s start with adding a background image.

            "acrylicOpacity" : 0.5,
            "closeOnExit" : true,
            "colorScheme" : "VibrantInk",
            "commandline" : "C:\\Program Files\\PowerShell\\6\\pwsh.exe",
            "cursorColor" : "#FFFFFF",
            "cursorShape" : "bar",
            "fontFace" : "Consolas",
            "fontSize" : 12,
            "guid" : "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
            "historySize" : 9001,
            "icon" : "ms-appx:///ProfileIcons/{574e775e-4f2a-5b96-ac1e-a2962a402336}.png",
            "name" : "PowerShell Core",
            "padding" : "0, 0, 0, 0",
            "snapOnInput" : true,
            "startingDirectory" : "%USERPROFILE%",
            "useAcrylic" : true,
            "backgroundImage": "C:/Users/thoma/OneDrive/Pictures/Me/Thomas Maurer Logos 2016/WindowsTerminal/Black Cloud Robot.png",
            "tabTitle": "PowerShell Core "

With the “backgroundImage” value, you can set a specific image as the background.

"backgroundImage": "C:/Users/thoma/OneDrive/Pictures/Me/Thomas Maurer Logos 2016/WindowsTerminal/Black Cloud Robot.png"


You can use the “backgroundImageOpacity” to set the opacity of the for the background image, and this is super helpful when you have a full background image.

Windows Terminal Background Image Opacity

Windows Terminal Background Image Opacity

You can add the following value to configure the opacity.

"backgroundImageOpacity" : 0.2

Acrylic effect

You can also configure the Windows Terminal to use the Acrylic effect in Windows 10 for the background. This will combine the acrylic effect with the background image.

Windows Terminal Background Acrylic Opacity

Windows Terminal Background Acrylic Opacity

Just set the following value to the settings.

"useAcrylic" : true,
"acrylicOpacity" : 0.5

Here is a full config you can have a look at, with all the settings enabled.



Let me know if that helps you to set, change, and customize the background image of the Windows Terminal. You can find more tips on how to customize the Windows Terminal on my blog and you can read more about the new Windows Terminal on the official blog. And if you want to know more about how you can run Azure Cloud Shell in the terminal, check out my blog post. If you have questions, let me know in the comments.

PowerShell Get-WindowsImage Windows Server 2019 Editions

Add Drivers to a Windows Server 2019 ISO Image

In this blog article, I am going to show you how you can add drivers to a Windows Server 2019 ISO Image or WIM file using PowerShell and the DISM module. This will allow you to already have the latest drivers within the Windows Server installation image when you install Windows Server 2019. We will add drivers to a Windows Server 2019 WIM file (WIM stands for Windows Imaging Format), which then can be used to create a new ISO image or for example in Windows Deployment Services.


Folder for adding drivers to Windows Server 2019

Folder for adding drivers to Windows Server 2019

First, you will need to create three new folders called Drivers, ISO, and Mount. In my example, I created these in C:\Images.

  • Drivers – This is the folder where you put all your extracted drivers, which you want to add to your Windows Server 2019 Image.
  • ISO – This is where you can extract the Windows Server 2019 ISO Image. Basically all the files on the ISO file.
  • Mount – This is an empty folder, which will be used to mount the WIM files.

You can now mount the ISO using Windows Explorer or the following PowerShell commands and copy the files to the ISO folder.

Mount ISO PowerShell

Mount ISO PowerShell

Mount-DiskImage -ImagePath C:\Temp\17763.379.190312-0539.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso
Copy-Item D:\* C:\Image\ISO\ -Recurse

In your case, the ISO may be mounted on a different drive letter instead of my D: drive.

Add drivers to the Windows Server 2019 Image

First, you can check in which Windows editions you want to add the drivers. To check that you can use the following PowerShell command:

Get-WindowsImage -ImagePath C:\Image\ISO\sources\install.wim
PowerShell Get-WindowsImage Windows Server 2019 Editions

PowerShell Get-WindowsImage Windows Server 2019 Editions

The Get-WindowsImage cmdlet will show you the different editions included in the WIM file.

After we have seen the Index numbers, we can now mount the Windows Image our Mount folder. In my example, I use Image Index 3, which is the Windows Server 2019 Datacenter Core Edition. If you want to check which editions of Windows Server 2019 you should use, check out the Microsoft Docs.

Mount-WindowsImage -Path C:\Image\Mount -ImagePath C:\Image\ISO\sources\install.wim -Index 3


After the image is mounted you can now add the drivers to the Windows Server 2019 Image using the following command:

Add-WindowsDriver -Path C:\Image\Mount -Driver C:\Image\Drivers -Recurse
Add Drivers to Windows Server 2019 ISO Image

Add Drivers to Windows Server 2019 ISO Image

After you have added all the drivers to the image, you need to dismount the image and save it.

Dismount-WindowsImage -Path C:\Image\Mount -Save

We have now added the drivers to the Install image, and you should also add the drivers to your boot image if it is, for example, a network or storage controller driver you might need to install the server. To do this do the same steps to the C:\Image\ISO\sources\boot.wim.

Now you can use these WIM files with Windows Deployment services or create a USB drive to install Windows Server 2019. If you want to create an ISO file, you can use the oscdimg command-line tool. The oscdimg tool comes with the Windows Assessment and Deployment Kit (Windows ADK), which you can get here.

oscdimg -n -m -bc:\temp\ISO\boot\etfsboot.com C:\temp\ISO C:\temp\mynew.iso

I hope this post helps you to add drivers to your Windows Server image. If you have any questions, feel free to leave a comment.

Microsoft Edge WebP Image Extensions

Windows 10 adds WebP support for Microsoft Edge

Today Microsoft released a new Windows 10 insider Preview build 17692. After updating to this build you will be able to automatically download the WebP Extension for Microsoft Edge. This means Microsoft Edge now supports the Google Image format called WebP. WebP is Google’s alternative smaller image format to that of JPEGs or PNGs.

This is still only present in the Windows 10 preview builds and it looks like it will be available in the next Windows 10 update later this year.

WebP – A new image format for the Web

WebP is a modern image format that provides superior lossless and lossy compression for images on the web. Using WebP, webmasters and web developers can create smaller, richer images that make the web faster.

WebP lossless images are 26% smaller in size compared to PNGs. WebP lossy images are 25-34% smaller than comparable JPEG images at equivalent SSIM quality index.

Lossless WebP supports transparency (also known as alpha channel) at a cost of just 22% additional bytes. For cases when lossy RGB compression is acceptable, lossy WebP also supports transparency, typically providing 3× smaller file sizes compared to PNG.

WebP Support

WebP is natively supported in Google Chrome and the Opera browser, and by many other tools and software libraries. Developers have also added support to a variety of image editing tools.

WebP includes the lightweight encoding and decoding library libwebp and the command line tools cwebp and dwebp for converting images to and from the WebP format, as well as tools for viewing, muxing and animating WebP images. The full source code is available on the download page.

Source Google.


How to create a Nano Server Image using PowerShell

Last week Microsoft released Windows Server 2016 with the first GA release of Nano Server. A couple of months back I already wrote a blog post how you can create a new Nano Server Image in Technical Preview 4. This post is an updated version of that this post using Windows Server 2016 GA. In this post I will quickly show you how you can create a new VHD, VHDX or WIM file with your Nano Server configuration.

This is the PowerShell option, you can also use the Nano Server Image Builder.

First you have to download the latest Windows Server 2016 ISO file.

NanoServer Folder

If you open the Windows Server 2016 ISO file you can see a folder called “NanoServer” on the medium. This folder includes:

  • NanoServer.wim – This is the Nano Server Image file
  • Packages – The Package folder includes the Nano Server Packages, Windows Roles and Features and some basic drivers
  • NanoServerImageGenerator – In this folder you can find the Nano Server Image Generator PowerShell Module

I usually create a folder on my C:\NanoServer to store all the things I need, which makes things a little simpler.

Create Nano Server Image Folder

  • Base – This is a temporary folder where the images get mounted while updating or creating new images
  • Drivers – This is the folder where I copy all the drivers for a physical image
  • Files – This is the unpacked Windows Server 2016 ISO image (including, the sources folder, NanoServer folder, support, boot and efi folder as well as the setup.exe file)
  • Images – In this folder I store all the new created images
  • Updates – In this folder I store the Windows Server 2016 Update cumulative updates (.cab files)
  • XMLs – In this folder I store unattend.xml files if I need to do a extended configuration.

Of course you don’t have to use this folder structure, but it makes things easier.

If you have a look at the Packages folder you can find all the available packages for Nano Server:

Nano Server Packages

A new Nano Server Image can be created using the New-NanoServerImage PowerShell cmdlet. This will create a new Nano Server Image in a VHDX including the VM Guest drivers and nothing more.


# Change Working Directory
cd C:\NanoServer
# Import Module
Import-Module .\NanoServerImageGenerator.psm1
# Create Nano Server Image VHDX
New-NanoServerImage -MediaPath .\Files -BasePath .\Base -TargetPath .\Images\NanoVMGA.vhdx -MaxSize 20GB -DeploymentType Guest -Edition Datacenter -ComputerName "Nano01"
  • MediaPath – The location with the Windows Server 2016 files
  • BasePath – Temporary folder to mount the WIM file
  • TargetPath – Where the new Image file gets stored. You can create a .wim, .vhd or .vhdx file
    • .vhd creates a Image for a Generation 1 VM (BIOS boot)
    • .vhdx create a Image for a Generation 2 VM (UEFI boot)
  • DeploymentType allows you to choose between Guest and Host
    • Guest creates a Virtual Machine
    • Host creates a Physical Image
  • Edition can be Standard or Datacenter
  • ComputerName adds the server name of the Nano Server
  • MaxSize changes the Partition size, if you are not using this parameter it will create a default partition of 4GB

Hyper-V NanoServer VHDX

You can now copy the VHDX file from the Images folder, attach this to a new Hyper-V virtual machine and boot.

This will show the Nano Server recovery console:

Hyper-V Nano Server Console

There are more parameters to add roles and features, updates, drivers and additional configuration like IP addresses and more

For example if you want to add some updates to the Nano Server Image you can use the following cmdlet:

# Create Nano Server Image VHD with updates
New-NanoServerImage -MediaPath .\Files -BasePath .\Base -TargetPath .\Images\NanoVM.vhd -MaxSize 20GB -DeploymentType Guest -Edition Datacenter -ComputerName "Nano01" -ServicingPackagePath ".\Updates\Windows10.0-KB3176936-x64.cab", ".\Updates\Windows10.0-KB3176936-x64.cab"

To add a fixed IP address you can for example use the following cmdlet:

# Create Nano Server with IP address
New-NanoServerImage -MediaPath .\Files -BasePath .\Base -TargetPath .\Images\NanoVMSetupUI.vhdx -MaxSize 20GB -DeploymentType Guest -Edition Datacenter -ComputerName "Nano01" -Ipv4Address "" -Ipv4SubnetMask "" -Ipv4Gateway "" -Ipv4Dns ""

If you have some advanced deployment you can use for example the following thing, which helps you to set different configuration options. This example here is designed for a physical Hyper-V host

# Nano Server Packages for Image
$NanoPackages = "Microsoft-NanoServer-Compute-Package",
$ServicingPackagePath = ".\Updates\Windows10.0-KB3176936-x64.cab", ".\Updates\Windows10.0-KB3176936-x64.cab"
$UnattanedXML = ".\XMLs\unattend.xml"
$MaxSize = 20GB
$Edition = "Datacenter"
$VHDXName = ".\Images\NanoHost01.vhdx"
$DeploymentType = "Host"
$DriverPath = ".\Drivers"
$MediaPath = ".\Files"
$BasePath = ".\Base"
$ComputerName = "Nano01"
$DomainName = "thomasmaurer.ch"
#IP Configuration if not DHCP
#$Ipv4Address = ""
#$Ipv4SubnetMask = ""
#$Ipv4Gateway = ""
#$Ipv4Dns = ""
# Nano Image
New-NanoServerImage -MediaPath $MediaPath -BasePath $BasePath -TargetPath $VHDXName -DriversPath $DriverPath -DeploymentType $DeploymentType -Edition $Edition -Packages $NanoPackages -MaxSize $MaxSize -ServicingPackagePath $ServicingPackagePath -UnattendPath $UnattanedXML -ComputerName $ComputerName -DomainName $DomainName

You can for example use this VHDX file now to create a boot from VHDX scenario:

# Boot from VHDX
Mount-VHD C:\VHDX\NanoHost01.vhdx -Passthru | get-disk | Get-Partition | where Size -GE 3GB | Set-Partition -NewDriveLetter V
# Set Boot Partition
cd v:\windows\system32
bcdboot v:\windows
# Unmounted
Get-VHD C:\VHDX\NanoHost01.vhdx | Dismount-VHD

I hope this helps you to get started with Nano Server in Windows Server 2016. I also prepared a blog post how you can create a Nano Server Image using the Nano Server Image Builder tool.

Cisco UCS Hyper-V Cluster – Install Blade Servers – Part 3

After you have created a new Hyper-V 2008 R2 ISO Installation image you can now start to install the Cisco Blade Servers. There are many ways (WDS, Virtual Media) how you can deploy the Hyper-V Image on your Blade Nodes. I will use the Virtual Media to install the Blade Notes in this guide.

  1. Start the KVM Console in the UCS Manager
    Cisco UCS KVM Console
  2. Attach the Hyper-V 2008 R2 Image to the Virtual Media
    Cisco UCS Virtual Media
  3. Now do the standard Hyper-V installation. With the Image we created Hyper-V will have all the drivers you need.
    Hyper-V 2008 R2 Installation
  4. After the Installation is finished and you set the local administrator password. I change the IP Address of the Server and install the latest updates.
    Hyper-V 2008 R2 Updates

Cisco UCS Hyper-V Cluster – Create Hyper-V Image for Blade Servers – Part 2

We use Microsoft Hyper-V Server 2008 R2 as Operating System for our Cisco Blade Notes. The Cisco UCS does need some special drivers which are not included in Hyper-V Server Image (Network and HBA). So I created a Hyper-V Server 2008 R2 ISO file which includes the Drivers from the Cisco UCS.

I made a blog post about adding Drivers to a Windows ISO, this is pretty much the same.

  1. First Download the Hyper-V Server 2008 R2 ISO from microsoft.com
  2. Download the Drivers from Cicso.com, you can download the Bundle File which also includes firmware.
  3. Download and install the Windows Automated Installation Kit
  4. Extract the Hyper-V ISO to C:\temp\hypervr2
  5. Extract the Windows Driver folder in the Cisco Driver ISO (In my case ucs-b2xx-drivers-1.3.1g.iso) to C:\temp\Drivers\Windows
  6. Create a folder for the WIM mount point C:\temp\WIM
  7. Start Windows AIK Deployment Tools Command Prompt from Start menu
    Windows AIK Deployment Tools Command Prompt
  8. Now mount the install.wim file form the original Hyper-V Image (C:\temp\hypervr2\SOURCES) to C:\temp\WIM
    imagex /mountrw C:\temp\hypervr2\SOURCES\install.wim 1 C:\temp\wim
  9. Add Drivers with dism
    CD C:\temp\Drivers\Windows\Network\Emulex\M72KR\W2K8R2\x64
    dism /image:C:\temp\WIM /add-driver /driver:. /recurse
  10. After adding all drivers to the Image you can unmout the WIM Image
    imagex /unmount /commit C:\temp\wim
  11. Now create the new ISO file
    oscdimg -n -m -bc:\temp\hypervr2\boot\etfsboot.com C:\temp\hypervr2 C:\temp\hypervr2drivers.iso

Now you can use this new Image to deploy the Hyper-V Hosts on your Cisco UCS Blades.