Last updated by at .

  • What's new in Hyper-V 2016
  • Microsoft Azure

Category: Windows Server 2008 R2

cmd clip

Pipe cmd prompt commands into the clipboard

This is a very all but very useful command if you work with the Windows Command Prompt. This allows you to output text from commands into the Windows clipboard.

Scott Hanselman from Microsoft just reminded the community about this feature, which is available in Windows since Windows Vista.

PowerShell v5 got some similar command using Set-Clipboard and Get-Clipboard.



unatted xml file for VM

Add unattend.xml to VHDX File for VM automation

If you for example don’t have System Center Virtual Machine Manager or another tool to create Virtual Machine Templates and automate the deployment, you can also do this using Sysprep, PowerShell and an unattend.xml file to automate or simplify the Virtual Machine creation process. In other blog posts I already wrote how you can sysprep Virtual Machines or how you can create Hyper-V Virtual Machines using PowerShell. In this post I will show you how you can add an unattend.xml file to your VHD or VHDX so your virtual machine gets some default settings like regional information.

Here we have a basic unattend.xml file. If you want to enhance it, or create your own, you can also use the Windows ADK.

To use this unattend.xml you first have to sysprep a virtual machine and create a sysprep VHD file. After that you can mount the VHDX file and insert the unattend.xml file to the VHD. Copy the unattend.xml file to the following location: D:\Windows\Panther (in my case the VHD was mounted as D drive).

You can mount the VHDX using the UI or PowerShell:

There are more paths as well. You can check out the Windows Setup Automation Overview on TechNet where you can see all the possible paths to place the unattend.xml file.



Veeam FastSCP for Microsoft Azure

Veeam FastSCP for Microsoft Azure

Veeam does some great products for your virtualization and datacenter environment such as their Veeam Backup & Replication suite, Veeam Endpoint Backup FREE and Management Packs for System Center Operations Manager. Now a couple of weeks ago Veeam released a cool free tool call Veeam FastSCP fro Microsoft Azure. With Veeam FastSCP (Secure Copy Protocol) for Microsoft Azure, IT Pros and Azure Developers can simply and reliably copy local files to Azure VMs, and copy files in Azure VMs to on-premises.

Veeam FastSCP for Microsoft Azure Diagram

The utility makes your life way easier when dealing with Virtual Machines running on Microsoft Azure IaaS.

  • Secure file copy with no independent encryption or VPN needed
  • Manual file copy to/from Azure VMs without the need to keep the UI open until the file copy completes
  • Automatic scheduling of file copy jobs for nightly or weekly copies to/from Azure VMs
  • A wizard-driven UI to copy files in just a few clicks – with no scripting needed

If you want to download it, check out the Veeam Website.

To set it up the tool connects to the PowerShell endpoint for your IaaS VM. Just add the Virtual Machine and you are ready to go! With that you can do some great things, like simply copy a file to an Azure IaaS VM or even doing scheduled backups of files from inside Azure VMs like Didier Van Hoye did.

 

 



Powershell

Get name of the PowerShell script file inside the script

When you create a script you sometimes want to create some output for a log file for example. In many cases it makes sense to use the script file name for the log file so you can easily see from which .ps1 the .log file was generated for example. To get the name of the PowerShell ps1. file you can use the following command:

This will return the ps1. file object. To get only the name string you could use:

To create a log file with the script file name you could use the following commands:



Powershell

Move files to folder sorted by year and month with PowerShell

I had to sort a lot of files and put them into folders for each month and year. So for example when the files was created/modified in February 2012, the file had to be moved into the folder 2012 and the subfolder 2 (for February). For this I created this quick and dirty script:

Please as always if you use a PowerShell script from the internet, test it first before you run it against your production environment.



Update Rollup 5 for System Center 2012 R2

Summary: Update Rollup 5 for System Center 2012 R2 and Azure Pack now available

Yesterday Microsoft released a new Update Rollup for System Center 2012 R2 and Azure Pack called Update Rollup 5. Update Rollup 5 has a lot of fixes and new features especially for Windows Azure Pack and System Center Virtual Machine Manager and Data Protection Manager.

Components that are fixed in this update rollup

  • Data Protection Manager (KB3021791)
    • Protect SharePoint with SQL Always on Configuration
    • Protect SharePoint Server, Exchange Server, and Windows Client workloads to Microsoft Azure by using Data Protection Manager
    • Support for multiple retention ranges for long-term backup on Microsoft Azure
    • Ability to transfer initial backup copy offline to Azure
    • Support for protecting Microsoft workloads that are hosted in VMware
    • Display missed SLA alerts on the Data Protection Manager console
    • Enhanced reporting with Data Protection Manager central console
  • Operations Manager (KB3023138)
  • Service Manager (KB3009517)
  • Virtual Machine Manager (KB3023195)
    • Differencing disk as an option in the Windows Azure Pack VMRole deployment
    • New operating system support
    • New ExplicitRevokeRequired parameter to control IP address management when Grant-SCIPAddress is used
    • Support for SQL Server 2014
    • Azure Site Recovery
  • Windows Azure Pack (KB3023209)
    • Adds support for SQL Governor in the SQL Server Resource Provider.
    • Adds administrator support for disabling native Network RP to allow for third-party network provider
    • Provides detail on Virtual Machine Memory type, Memory Startup and Maximum values in the Tenant Portal.
    • Fix to the Get-MgmtSvcRelyingPartySettings PowerShell cmdlet.
    • Fix to the issue of failing to establish Remote Desktop Connection to virtual machines put behind a Network Address Translation (NAT) device.
    • Fix to the Attached Network dialog box where the network entries in the list were disabled.

As you can see you get several new feature with Update Rollup 5. In Data Protection Manager you finally get support for SharePoint, Exchange and Windows Client workload protection to Microsoft Azure, and support for workloads running on VMware infrastructure. Virtual Machines Manager not only brings new features such as support for the Virtual Machine Manager Database to run on SQL Server 2014 it also includes a lot of fixes and a security update (3035898
MS15-017: Vulnerability in Virtual Machine Manager could allow elevation of privilege: February 10, 2015). Some of the most interesting fixes for me are:

  • DHCP extension: Currently, users have to manually update the DHCP extension after update rollup installation on all hosts. This is now automated. After the DHCP extension is replaced in the Virtual Machine Manager server’s installation folder to the latest version, Virtual Machine Manager automatically checks the DHCP extension against all hosts. If the host has an older version of DHCP extensions, the agent version status will be displayed as “DHCP extension needs to be updated in host properties on the Status page.” The user calls the update agent and updates the DHCP extension on the Hyper-V host in the same way that the user did this for the Virtual Machine Manager agent. Also, if the VSwitch is a logical switch, the status will be shown in “logical switch compliance.” The user can remediate the logical switch. This will also update the DHCP extension on the host.
  • Bare-Metal Deployment: If a physical computer profile is created by using vNic (and by using a virtual machine network) and if there are more than one hostgroup for a logical network that also has that virtual machine network when you add a host resource on the “Provisioning Options” page, the host profile will be displayed for only one host group. The profile won’t be displayed for the rest of the host groups.

For Windows Azure Pack also includes some important fixes and improvements on of the is in the Tenant Portal, users can now see details on Virtual Machine Memory type, Memory Startup and Maximum values.

Update Rollup 5 for System Center 2012 R2 brings a lot of new features and important fixes to the table, however before deploying the fixes in your production environment, I recommend to test the Update Rollup and maybe wait for some reports about issues from other users.



Licensing Microsoft Server in a Virtual Environment

Altaro Hyper-V Licensing Microsoft Server in a Virtual Environment webinar recording available

Together with Altaro I did a webinar on “Licensing Microsoft Server in a Virtual Environment” together with Andy Syrewicze (Microsoft MVP Hyper-V). Now the recording of this webinar is now available. You can also download the free eBook for Licensing Microsoft Server in a Virtual Environment from Eric Siron.