Tag: PowerShell

Last updated by at .

Windows Server 2012 Logo

Microsoft Nano Server your new Cloud Platform infrastructure Server

Microsoft yesterday announced the availability of Windows Containers and the new SKU for Windows Server vNext named Nano Server. As Microsoft mentions, Nano Server is a purpose-built operating system designed to run born-in-the-cloud applications and containers. But Nano Server is not only designed for Modern Application, but it also is ready and designed to run on your datacenter fabric such as Hyper-V Server and Scale-Out File Server.

Nano Server is a redesign version of Windows Server Core which is very lightweight, very small footprint and remote managed. The first version of Nano Server is designed for the following key scenarios:

  1. Born-in-the-cloud applications – support for multiple programming languages and runtimes. (e.g. C#, Java, Node.js, Python, etc.) running in containers, virtual machines, or on physical servers.
  2. Microsoft Cloud Platform infrastructure – support for compute clusters running Hyper-V and storage clusters running Scale-out File Server.

As mentioned Nano Server has a very small footprint and the first version show some great improvements versus the Windows Server:

  • 93 percent lower VHD size
  • 92 percent fewer critical bulletins
  • 80 percent fewer reboots

To achieved this results Microsoft removed some parts of Windows Server like:

  • GUI stack
  • 32 bit support (WOW64)
  • MSI support
  • RDP
  • Some default Server Core components

By removing the GUI stack makes this server to a true headless server, without any login screen or RDP support. By removing things like this, a lot of people will need a totally new way to manage this servers. The answer is simple and is the best practice for managing servers for a long time called Remote Management. Nano Server will offer some advanced remote Management features such as:

  • WMI
  • PowerShell
  • PowerShell Desired State Configuration
  • RSAT Tools
  • System Center and other Management tools
  • Web-based management tools (to replace local inbox management tools)

In my opinion the effort Microsoft does with Nano Server really makes sense and will help Service Providers as well as Enterprise companies to deploy clouds even faster, more secure, more efficient and with less management overhead. I am really looking forward to Microsoft Ignite to get some more information on Nano Server. If you want to see a little bit more about Nano Server checkout the following video.

 

 



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.



Hyper-V vNext Runtime Memory Resize

Sneak Peek into the Next Version of Hyper-V

Back in October Microsoft released the first public Windows Server Technical Preview for the next release of Windows Server. At TechEd Europe Bed Armstrong, Principal Program Manager on the Hyper-V team at Microsoft, talked about a couple of new features which are coming in the next release of Windows Server Hyper-V. This is a quick list of some of the new features we will get in the next release of Windows Server Hyper-V, there is a lot more coming until the release of Windows Server vNext and System Center vNext in 2016.

Virtual Machine Configuration Changes

Hyper-V vNext VM Configuration Files

In the next release of Hyper-V Microsoft will change the Virtual Machine configuration files. Today the Hyper-V VM configuration files had the xml file format. You were able to open the file and check and edit the virtual machine configuration inside that file, even it was never supported. By running more and more workloads virtual and in a dynamic cloud way, scale and performance gets even more critical. In the next version of Hyper-V Microsoft will change the VM configuration from the xml file to a binary file format. The new binary format brings more efficient performance at large scale. Microsoft also now includes a resilient logging for changes in the configuration files so this should protect virtual machines from corruption.

New file extensions:

  • .VMCX (Virtual Machine Configuration) – replaces the .xml file
  • .VMRS (Virtual Machine Runtime State) – replaces .bin and .vsv file

Production VM Checkpoints (Snapshots)

Hyper-V vNext Production CheckPoint

Virtual Machine Checkpoints or in older versions Virtual Machine Snapshots were a great solution to take a state of a virtual machine and save it, doing some changes and if something fails you could simply revert back to the time you took the checkpoint. This was not really supported to use in production, since a lot of applications couldn’t handle that process. Microsoft now changed that behavior now fully supports it in production environments. For this Production Checkpoints are now using VSS instead of the Saved State to create the checkpoint. This means if you are restoring a checkpoint this is just like restoring a system from a backup. For the user everything works as before and there is no difference in how you have to take the checkpoint. Production Checkpoints are enabled by default, but you can change back to the old behavior if you need to. But still using Checkpoints brings some other challenges, like the growing .avhdx file, which still apply.

Hyper-V Replica support for Hot Add of VHDX

Hyper-V Replica was one of the greatest new features in Windows Server 2012 Hyper-V. In Windows Server 2012 and Windows Server 2012 R2 Hyper-V, if you have hot added a VHDX file to a Virtual Machine, replication failed. In the next version of Hyper-V when you add a new virtual hard disk to a virtual machine that is being replicated, it is automatically added to the not-replicated set so replication continues to run and you can then online update this set with via PowerShell and the VM will automatically resynchronize and everything works as expected.

Hot add / remove of Virtual Machine Memory

Hyper-V vNext Runtime Memory Resize

In Windows Server 2012 R2 Hyper-V you could decrease the Minimum Memory and increase the Maximum Memory of a Virtual Machine using Dynamic Memory while the VM was running. In the next version of Hyper-V you can now increase and decrease the Memory assigned to virtual machines while they are running, even if they are using static memory.

Hot add / remove of virtual network adapters

Hyper-V vNext Hot Add and Remove Virtual Network Adapters

This was maybe the feature VMware fan boys all over the world have used against Hyper-V. However I didn’t really saw a lot of customers doing this, but it is great that you can now hot add and remove network adapters from Virtual Machines.

Virtual Network Adapter Identification

Hyper-V vNext Virtual Network Adapter Identification

For me more important than hot add or remove virtual network adapters is this feature. When dealing with automation you are always happy you can identify different network adapters. For the Hyper-V hosts we have different solutions such as Consistent Device Naming (CDN), sort by PCI slot using PowerShell and other options to identify network adapters. But we didn’t really have a great solution for Virtual Machines. With Network Adapter Identification this changes. You can name individual virtual network adapters in the virtual machine settings and see the same name inside the guest virtual machine.

PowerShell on the Hyper-V Host

PowerShell in the guest

Hyper-V Manager Improvements

Finally, this is something which is not a problem in most environments , since we know how things work. But a lot of people which are Hyper-V beginners coming from VMware or other platforms, they have some simple troubles with Hyper-V Manager. In the next version there are a couple of create improvements which make things a lot easier.

  • Hyper-V Manager is now connecting via WinRM instead of WMI
  • Support for alternate credentials (Requires that you have CredSSP enabled on the server and client)
  • Connected to Hyper-V Hosts via IP address
  • Mange Windows Server 2012 Hyper-V, Windows Server 2012 R2 Hyper-V and the next version of Hyper-V from the latest console

Power Management improvements

SleepStudy Report Connected Standby Transitions

Microsoft updated the hypervisor power management model to support new modes of power management. And this is one of the reasons I run Windows 10 Technical Preview on my Surface Pro 3. Surface Pro 3 is a device which can run Connected Standby, but if you install Hyper-V on Windows 8.1 Connected Standby stops working. In the next version of Hyper-V Connected Standby will work.

Rolling Cluster Upgrade

Hyper-V vNext Rolling Cluster Upgrades

With this new feature you are finally able to upgrade a Hyper-V Cluster from Windows Server 2012 R2 Hyper-V to the next version of Hyper-V without new hardware, no downtime and the ability to roll-back safely if needed. In Windows Server 2012 R2 you had to create a new Hyper-V Cluster while the old Hyper-V Cluster was still running and migrate a Hyper-V Cluster via Cluster Migration Wizard or Live Migration. You can now have Windows Server 2012 R2 Hyper-V Hosts and the next version of Hyper-V running in the same Hyper-V Cluster. To make this scenario possible, the Hyper-V team had to do some changes to the Virtual Machine Upgrade Process

New Virtual Machine Upgrade Process

Hyper-V vNext Update VM Configuration Version

To support Rolling Cluster Upgrades Microsoft had to make some changes to the Virtual Machine Upgrade Process. In the current versions of Hyper-V, Virtual Machines were automatically upgraded from the old to the new version, which means that if you once moved a Virtual Machine to a new Hyper-V host you couldn’t move it back again. In a mixed cluster environment this does not work. In the next version of Hyper-V, Virtual Machines will not be upgraded automatically. Upgrading a virtual machines is a manual operation that is separate from upgrading the Hyper-V host. This allows you to move virtual machines back to earlier version of Hyper-V until they have been manually upgraded.

New way how VM Drivers (integration services) get updated

Since Windows Server 2012 R2 Hyper-V, VM drivers (integration services) were updated with each new host release, and it was required that the VM driver version matches the host version. When new Hyper-V integration services were shipped you had to update the Hyper-V host and form there you could upgrade the VM drivers inside the virtual machine. With Windows Server vNext Hyper-V Microsoft brings VM driver updates over Windows Update. This means also that you now don’t have to have the VM integration services matching the host version, you simply need the latest version of the integration services released.

Secure Boot Support for Linux

Microsoft is pushing hard to bring more and more supported for Linux operating systems such as dynamic memory and other features. With Hyper-V vNext Microsoft bring Secure Boot support for Linux which works with Ubuntu 14.04 (and later) and SUSE Linux Enterprise Server 12.

PowerShell to enable Secure Boot Support for Linux:

Distributed Storage QoS

Hyper-V vNext Storage QoS

In Windows Server 2012 R2 Hyper-V we got the possibility to limit maximum IOPs for an individual virtual hard disk which was a great feature. Everything worked great when you were running the Virtual Machine on a single Hyper-V host, but when you were running multiple Hyper-V hosts with multiple Virtual Machine against the same storage, the Hyper-V host didn’t know that he had to compete with other servers for Storage IOPs or bandwidth. For example the scenario of a minimum IOPs setting did only work on standalone Hyper-V servers. With the next release of Hyper-V and Windows Server Microsoft adds a lot of new stuff. Together with the Scale-Out File Server and Storage Spaces, Microsoft now allows you to define IOPs reservation for important virtual hard disks and a IOPs reserve and limit that is shared by a group of virtual machines / virtual hard disks. This intelligence, build by Microsoft Research, enables a couple of interesting scenarios especially in service provider environments and large scale enterprises.

Virtual Machine Compute Resiliency

Hyper-V vNext Compute VM Reciliency

Microsoft invested heavily into VM resiliency, especially to hardware failure. One of them is the VM Compute Resiliency feature. This feature allows Virtual Machines to run on a host even if the cluster node is not available to the other nodes in the cluster. For example in Windows Server 2012 R2, if the cluster service couldn’t reach the node in the cluster for 30 seconds, the cluster would failover all the virtual machines to another node. If the same things happens in Windows Server vNext Hyper-V, the node would go into isolated mode for the next 4 minutes (default setting) and when the node comes back in four minutes all the virtual machines will still be running. If it doesn’t come back within four minutes the VMs will failover to another node. If a node is flapping from Isolated Mode to running the cluster service will set the node to quarantined and will move all the virtual machines from the node to another node. This should help keep your workloads running even if there are some hardware or network failures.

Evolving Hyper-V Backup

If you are working in IT you know that Backup is always a issues. And things didn’t really get better by running Virtual Machines running on Storage Systems. With the next release of Hyper-V Server Microsoft will release a completely new architecture to improve reliability, scale and performance of Virtual Machine backups. There are three big changes in the backup architecture:

  • Decoupling backing up virtual machines from backing up the underlying storage.
  • No longer dependent on hardware snapshots for core backup functionality, but still able to take advantage of hardware capabilities when they are present.
  • Built in change tracking for Backup of Virtual Machines

RemoteFX

Microsoft also did some improvements on RemoteFX which now includes support for OpenGL 4.4 and OpenCL 1.1 API. It also allows you to use larger dedicated VRAM and VRAM in now finally configurable.

Hyper-V Cluster Management

This is maybe something you will never use by yourself but there is another great improvements in terms of automation and development. If you have ever used WMI against a Hyper-V Cluster you always had to run it against every Hyper-V Host in the cluster to get all the information. In the next version of Hyper-V you can finally run WMI against Hyper-V Cluster and it will handle it as it would be a single Hyper-V host, so you get all the information from all hosts in the cluster.

This was a quick overview over just some of the feature and improvements which are coming in the next release of Windows Server Hyper-V which will be released in 2016. There will be much more coming until Microsoft officially releases the next version of Hyper-V and of course some of the stuff I wrote about will be improved as well.

If you want to know more about the next version of Hyper-V checkout Ben Armstrong’s TechEd Europe session or visit some of our TechNet events.

 



Microsoft Switzerland IT-Events

New Microsoft Switzerland TechNet Events for Windows Server & System Center vNext in 2015

Microsoft today released some dates for the upcoming free TechNet events for IT-Pros in Switzerland. The events are focused on different Microsoft Technologies such as Windows 10, Microsoft Azure, System Center, Cloud OS, Windows Server, Office and many more. Together with Philipp Witschi (itnetx) and Michael Rüefli (itnetx & Microsoft MVP) I will present about the new features in Windows Server, Hyper-V and System Center vNext.

Microsoft TechNet Event 2015

Am 1. Oktober 2014 wurde die erste Technical Preview der kommenden Versionen unseres Windows Server und System Center veröffentlicht. Im Rahmen unseres Technet Seminars am 11. März 2015 präsentieren wir einen ersten Überblick über alle Neuerungen im Betriebssystem sowie im Management.

In diesem Seminar werden Michael Rüefli (Cloud Architect, CDM MVP), Thomas Maurer (Cloud Architect, Hyper-V MVP) und Philipp Witschi (Head of Consulting & Operations) der itnetx gmbh

intensiv auf die Schwerpunkte Virtualisierung mit Hyper-V, Storage und Backup Restore eingehen und Ihnen das Neuste auf Basis von Microsoft Technologie vorstellen, viel Live-Demo inklusive!

 

Nutzen Sie diese Gelegenheit! Besuchen Sie uns in Wallisellen und informieren sich über die künftigen Möglichkeiten von Windows Server und System Center. Der Anlass ist wie immer kostenlos.

 

Agenda

09.00 – 09.15     Begrüssung (René Hanselmann, Microsoft Schweiz)

09.15 – 10.30     Windows Server Storage vNext (Michael Rüfli, itnetx GmbH)

10.30 – 10.45     Pause

10.45 – 12.00     Windows Server Hyper-V vNext (Thomas Maurer, itnetx GmbH)

12.00 – 13.00     Lunch

13.00 – 14.15     Hybrid Scenario & Backup-ASR-Storage Replication (Michael Rüfli, Thomas Mauer, Philipp Witschi, itnetx GmbH)

14.15 – 14.30     Kaffee Pause

14.30 – 15.45     Real World scenario mit Fokus auf Automation (Michael Rüfli, itnetx GmbH)

15.45 – 16.00     Q & A

ab 16.00             Ende

Feel free to register for this free events on the Microsoft Switzerland TechNet event page:

Windows Server & System Center vNext – Deep Dive (Option1) 12. Mai 2015

Am 1. Oktober 2014 wurde die erste Technical Preview der kommenden Versionen unseres Windows Server und System Center veröffentlicht. Im Rahmen unseres Technet Seminars am 11. März 2015 präsentieren wir einen ersten Überblick über alle Neuerungen im Betriebssystem sowie im Management. In diesem Technet werden Michael Rüfli (Cloud Architect, CDM MVP), Thomas Maurer (Cloud Architect, Hyper-V MVP) und Philipp Witschi (Head of Consulting & Operations) der itnetx gmbh intensiv auf die Schwerpunkte Virtualisierung mit Hyper-V, Storage und Backup/Restore eingehen und Ihnen das Neuste auf Basis von Microsoft Technologie vorstellen, viel Live-Demo inklusive! Nutzen Sie diese Gelegenheit! Besuchen Sie uns in Wallisellen und informieren sich über die künftigen Möglichkeiten von Windows Server und System Center. Der Anlass ist wie immer kostenlos.

Windows Server & System Center vNext – Deep Dive (Option2) 17. Juni 2015

Am 1. Oktober 2014 wurde die erste Technical Preview der kommenden Versionen unseres Windows Server und System Center veröffentlicht. Im Rahmen unseres Technet Seminars am 11. März 2015 präsentieren wir einen ersten Überblick über alle Neuerungen im Betriebssystem sowie im Management. In diesem Seminar werden Michael Rüfli (Cloud Architect, CDM MVP), Thomas Maurer (Cloud Architect, Hyper-V MVP) und Philipp Witschi (Head of Consulting & Operations) der itnetx gmbh intensiv auf die Schwerpunkte Virtualisierung mit Hyper-V, Storage und Backup/Restore eingehen und Ihnen das Neuste auf Basis von Microsoft Technologie vorstellen, viel Live-Demo inklusive! Nutzen Sie diese Gelegenheit! Besuchen Sie uns in Wallisellen und informieren sich über die künftigen Möglichkeiten von Windows Server und System Center. Der Anlass ist wie immer kostenlos.

 

To get an overview about Windows Server & System Center vNext you can also join the following session with Markus Erlacher (itnetx), Marcel Zehner (itnetx & Microsoft MVP) and Martin Wüthrich (itnetx).

Am 1. Oktober 2014 wurde die erste Technical Preview der kommenden Versionen von Windows Server und System Center veröffentlicht. Die Zeit könnte nun nicht günstiger sein, Ihnen die wichtigsten technischen Neuerungen im Rahmen unserer TechNet Seminare zu präsentieren – viele Live-Demos inklusive!

Markus Erlacher, Geschäftsführer bei der itnetx gmbh, ehemaliger Technical Solution Professional Datacenter bei Microsoft Schweiz und einer der versiertesten Datacenter-Experten wird zu Beginn unseres Technets einen Überblick zu den Szenarien und Funktionen der nächsten Version von Windows Server und System Center geben.

 

IT-Abteilungen stehen immer mehr unter Druck: Kosten müssen eingespart, Durchlaufzeiten verkürzt und Fehler minimiert werden. Um diese Ziele zu erreichen, ist Automatisierung von IT-Prozessen unumgänglich. Lösungen wie System Center Orchestrator, Systems Management Automation und Azure Automation werden in der Session 2 von Marcel Zehner, MVP Cloud & Datacenter Management bei der itnetx gmbh vorgestellt.

 

Der Nachmittag beginnt mit der Vorstellung unserer Enterprise Mobility Suite (EMS), ein interessant zusammengeschnürtes Paket wichtiger Funktionen, u.a. für “Bring your own device” Scenarien, die in aller Munde sind und die ein oder andere Herausforderung in der Umsetzung mit sich bringen: Wie kann diese Anforderung in Firmen umgesetzt werden? Welche Techniken bietet Microsoft hier? Themen wie Authentifizierung in der Cloud, ADFS, Zugriffsrechte (Rights Management) und Mobile Device Management (Intune) werden von Martin Wüthrich, Workplace Architekt und System Center Configuration Manager und Packaging Spezialist der itnetx gmbh, thematisiert – inklusive Scenarien, die mit Hilfe von Azure RemoteApp umgesetzt werden können.

 

Damit IT-Infrastrukturen und Applikationen einwandfrei betrieben werden können, ist eine umfangreiche End-to-End-Überwachung notwendig. In Zeiten vom hybriden IT-Infrastrukturen ist es notwendig, Ressourcen unabhängig von Ihrem Betriebsort überwachen zu können und in einer einheitlichen Sicht zu visualisieren. In der Session 4 zeigt Ihnen Marcel Zehner wie diese Ziele mit dem System Center Operations Manager erreicht werden können. Zudem stellt er die Azure Operational Insights vor, ein neuer cloud-basierter Service der die schnelle und umfangreiche Analyse von Messdaten erlaubt.

 

Nutzen Sie diese Gelegenheit! Besuchen Sie uns in Wallsiellen und informieren sich über die künftigen Möglichkeiten von Windows Server und System Center. Der Anlass ist wie immer kostenlos.

 

Agenda

09.00 – 09.15      Begrüssung (René Hanselmann, Microsoft Schweiz)

09.15 – 10.30     Übersicht Windows Server und System Center (Markus Erlacher, itnetx GmbH)

10.30 – 10.45     Pause

10.45 – 12.00     IT Prozess-Automatisierung (Marcel Zehner, itnetx GmbH)

12.00 – 13.00     Lunch

13.00 – 14.15     EMS & Mobile Device Management (Martin Wüthrich, itnetx GmbH)

14.15 – 14.30     Kaffee Pause

14.30 – 15.45     End-to-End Infrastruktur- und Serviceüberwachung (Marcel Zehner, itnetx GmbH)

15.45 – 16.00     Q & A

ab 16.00               Ende

Windows Server & System Center vNext - ein erster Überblick 11. März 2015

Am 1. Oktober 2014 wurde die erste Technical Preview der kommenden Versionen von Windows Server und System Center veröffentlicht. Die Zeit könnte nun nicht günstiger sein, Ihnen die wichtigsten technischen Neuerungen im Rahmen unserer TechNet Seminare zu präsentieren – viele Live-Demos inklusive! Markus Erlacher, Geschäftsführer bei der itnetx gmbh, ehemaliger Technical Solution Professional Datacenter bei Microsoft Schweiz und einer der versiertesten Datacenter-Experten wird zu Beginn unseres Technets einen Überblick zu den Szenarien und Funktionen der nächsten Version von Windows Server und System Center geben.

 



Windows Azure Pack IaaS

Add Domain User or Group to Azure Pack Administrators

When you install and configure Windows Azure Pack (WAP) you will have set your install user to the administrators list in Azure Pack, so you can login to the Azure Pack Admin Portal. If you want to use other users you can add them via PowerShell. To add a domain user or group to the Windows Azure Pack Admins you can use the following PowerShell commands. Of course it does make a lot of sense to create a security group in your domain, where you add all the WAP administrators, and add this group to the Azure Pack administrators.

With the following command you can check who is in the admin list right now.

With the following command you can add an user group to the Azure Pack Admin list



System Center Logo

SCVMM 2012 R2 Error 23317 When You Try to Apply Changes on VM That is Using Shared VHDX Disk

A customer of mine had a issue when he tried to change properties of Virtual Machines in System Center Virtual Machine Manager 2012 R2 which use shared VHDX, which were not created with VMM. The properties do he wanted to change had nothing to do with the Shared VHDX it self. He tried to set the availability set for these Virtual Machines.

The Error in SCVMM is the following:

Error (23317)
The operation Change properties of virtual machine is not permitted on a virtual machine that has shared virtual hard disks.

Recommended Action
The operation Change properties of virtual machine is not permitted on a virtual machine that has shared virtual hard disks.

Stanislav Zhelyazkov (Microsoft MVP) blogged about this in October 2013. The solution is pretty easy and is called PowerShell. Just do the modification but do not apply it. Use the script view in Virtual Machine Manager to get the code which would run behind the scene.

For example:

Remove all the things you don’t need and run the script: