Hyper-V: The operation cannot be performed while the object is in use (Windows Server 2016 / Windows 10)

You have a number of virtual machines running on your Windows Server 2016, Windows 10 or Windows Server 2008 R2 Hyper-V system. As soon as you try to start another VM in the Hyper-V Manager console or Start-VM virtmachine via PowerShell, a rather cryptic message keeps preventing you from doing so:

[Window Title]
Virtual Machine Connection

[Main Instruction]
The application encountered an error while attempting to change the state of ‘virtmachine’.

[Content]
‘virtmachine’ failed to change state.

The operation cannot be performed while the object is in use.

[Close]

To resolve this, disassociate any other VM from “Physical CD/DVD device” under media before you retry the operation on the failed VM.

HELP: PowerShell 5.1 / 5.0 What’s New (and More) – Part 4 Variables

The good news about system variables in Windows PowerShell is that only one new (preference) variable $InformationPreference is added starting with PS 5.0. It has a default value of SilentlyContinue and is listed in the about_Preference_Variables Help file (PS 5.1). You use this mainly to control how the new PS 5.x Write-Information cmdlet behaves. Of note is that Write-Host is a wrapper for Write-Information beginning with PS 5.0. However, the $InformationPreference variable only affects the latter cmdlet.

Desired State Configuration is a new feature introduced in PowerShell 4.0. The about_Automatic_Variables help file in PS 5.1 lists this $AllNodes variable where it automatically becomes available in the scope of a DSC configuration document when passed using the -ConfigurationData parameter. As a side note, you may be interested to know that development of DSC resources using the new class feature is possible starting in PS 5.0.

REFERENCES

– Writing a custom DSC resource with PowerShell classes (TechNet)

 

Hyper-V: Virtual Machine failed to change state (Windows Server 2016 / Windows 10)

When you try to Apply a previously saved Checkpoint (snapshot) to a virtual machine in Hyper-V running Windows Server 2016, Windows 10 or Windows Server 2012 R2, a bizarre error message consistently appears even with full administrative rights on the machine:

[Window Title]
Virtual Machine Connection

[Main Instruction]
The application encountered an error while attempting to change the state of ‘virtmachine’.

[Content]
‘virtmachine’ failed to change state.

The operation is not supported.

[Close]

If restarting the “Hyper-V Virtual Machine Management” (vmms) and “HV Host Service” (HvHost) service does not help, a cold machine reboot should fix this rather strange issue.

HELP: PowerShell 5.1 / 5.0 What’s New (and More) – Part 3 Modules

In the last installment of this Windows PowerShell HELP series, you learnt about the new cmdlets introduced in both PS 5.0 and 5.1. But where do they actually come from?

A module is essentially a data repository which groups all relevant cmdlets, functions and commands under one roof. Since PS 3.0, the mere act of running a cmdlet will cause Windows PowerShell to load the corresponding module without administrative intervention. To make this work, modules must be placed in a location listed in $env:PSModulepath. Because of this automatic module loading feature, an administrator does not always need to know exactly in which module a particular command resides[1]. By changing the $PSModuleAutoLoadingPreference preference variable, you can enable, disable and configure automatic importing of modules.

For a default Windows Server 2012 R2 (PS 4.0) installation, a total of 63 modules are available for use. The addition …

Continue reading

HELP: PowerShell 5.1 / 5.0 What’s New (and More) – Part 2 Cmdlets

At the core of Windows PowerShell is the various sets of cmdlets designed to accomplish specific tasks, much like Control Panel applets (since Windows 3.x) and today’s modern Apps on desktop and mobile devices.

The number of cmdlets has grown significantly at each new release of PowerShell. For instance, the default installation of Windows Server 2016 RTM (en-us) makes 634 cmdlets available which are spread across 41 modules. Updating Windows Server 2012 R2 (PS 4.0) with the corresponding version of WMF 5.x results in 39 and 60 cmdlets added in PS 5.0 and 5.1 respectively. If you do the math(ematics), an additional 21 new cmdlets were introduced between the 5.0 and 5.1 releases. These deal mainly with the management of file catalog, local user/group, time zone and miscellaneous ones like Get-ComputerInfo.

Note that in pre- Windows Server 2016 and Windows 10 Anniversary Update systems …

Continue reading

HELP: PowerShell 5.1 / 5.0 What’s New (and More) – Part 1 Alias

Kicking off this series of installment is the topic of Alias in Windows PowerShell 5.x.

Here, there is really only a (less-than) handful of new aliases or alternate names introduced in PowerShell 5.0, namely:

gcb     #Get-Clipboard
gpv    #Get-ItemPropertyValue
scb     #Set-Clipboard

No new aliases are known to exist on top of 5.0 in PS 5.1.

Incidentally, …

Continue reading

HELP: PowerShell 5.1 / 5.0 What’s New (and More)

An authoritative learning resource to quickly get up to speed with new features and changes in Windows PowerShell is to consult the excellent built-in help system directly. This is provided that Update-Help is executed beforehand. Besides using ?* wildcards against the Get-Help (help or man) or Get-Command cmdlets to discover and learn more about a specific cmdlet set or feature, you should peruse the set of about_* help files to aid in your learning endeavours.

One good place to start is to run

help about_Windows_PowerShell_5.0 -ShowWindow

This help file continues to carry the same name under the production releases of Windows Server 2016, Windows 10 Anniversary Update or systems with WMF 5.1 installed. Interesting enough, it still refers to the former two as “Windows Server Technical Preview and Windows Technical Preview” in the documentation. Not surprisingly, certain inaccurate information remain such as references to a non-existence Compare-DscConfiguration, Test-ModuleManifest (which is already present in PowerShell 4.0) or “A new module, OneGet, lets you discover and install software packages …” (now formally call PackageManagement). Likewise, the provided links such as “What’s New in Windows PowerShell” contains information which are not necessarily updated# (Last Updated: 12/14/2016).

Now you may wonder what this blog post is all about?

Continue reading

Skype for Business Server 2015 – Windows Server 2016 and PowerShell 5.1 Support

Although Windows Server 2016 has been officially released since 26 Sep 2016 (Ignite conference in Atlanta), it is still not listed as a supported server operating system platform to install or operate Skype for Business Server 2015.  Likewise, this applies to domain controllers in the Active Directory environment.

Per “Server requirements for Skype for Business Server 2015” (TechNet – Topic Last Modified: 2017-02-23):

Windows Server 2016 is not included in this list right now, but we’re planning to add it as a supported option after Skype for Business Server Cumulative Update 5 is released. Until then, please don’t try to use Windows Server 2016 as an OS for your Skype for Business deployment today, as it’s not yet supported, and we don’t recommend it. And check back to this page once the cumulative update is released to confirm Windows Server 2016 is added to our supported list at that time.

Additionally, PowerShell 5.1 is delivered in Windows Server 2016 and Windows 10 Anniversary Update (Build 1607). On supported legacy and down-level Windows operating systems, you can apply Windows Management Framework 5.1 (KB3191565) to update to this current version. Nevertheless, WMF 5.1 is marked as incompatible with Skype for Business Server 2015 (or for that matter Lync Server 2013 and 2010).

The golden rule “If it ain’t broken, don’t fix it” should apply (particularly on live production systems)!

REFERENCES
Announcing the launch of Windows Server 2016 (Hybrid Cloud Blog link)
Windows Server 2016 RTM, System Center 2016 RTM and Azure Stack TP2 – now available (link)
Requirements for your Skype for Business environment (TechNet link)
WMF 5.1 Product Compatibility Status (Last Updated: 1/31/2017 link)

Update Digest: Skype for Business Server 2015 CU4 Hotfix 1 (Feb 2017)

Improvements and fixes as described in “Updates for Skype for Business Server 2015” (KB3061064)

  • version 9319.277 released 13 Feb 2017 (download SkypeServerUpdateInstaller.exe)
  • support Skype for Business mobile clients in Location-Based Routing
  • 3212371 Skype for Business Server 2015 installer can’t update necessary drivers (Media Relay driver)
  • 3209571 LastActive attribute provides inaccurate information about a user’s presence status in Skype for Business
  • 3209570 You can’t set mobile phone number if it matches work phone number in Skype for Business Server 2015
  • 3209569 Display name in contact cards is not returned in Skype for Business Server 2015
  • 3209568 Add Push Notification support for Skype for Business for iOS and Android clients in Skype for Business Server 2015
  • 3209567 Add a flag to the Web.config file to allow Join Launcher to accept across-domain anonymous meeting join requests
  • 3209566 Skype for Business Server 2015 installer may fail silently in Windows Server 2016
  • 3209565 Enhanced 911 (E911) calls using Skype for Business 2016 on Mac don’t work through the non-Windows authentication in Skype for Business Server 2015
  • 3209563 Update reverts the Application Sharing Server (ASMCU) changes in CU4 in Skype for Business Server 2015
  • 3207037 UCWA may crash when parsing the ms-trunking-peer header in Skype for Business Server 2015
  • 4014212 “Screen presenting is not supported with this contact” error when sharing desktop between the Windows and Mac Skype for Business 2016 client

REFERENCES
Skype for Business Server 2015 Cumulative Updates (CU) List (link)

RTM! Windows Management Framework (WMF) 5.1 KB3191565

Windows Management Framework (WMF) 5.1 per KB3191565 updates Windows PowerShell and associated features in legacy and downlevel Windows operating systems to match those released in Windows Server 2016 and Windows 10 Anniversary Edition.

SUPPORTED OS

  • Windows Server 2012 R2
  • Windows Server 2012
  • Windows Server 2008 R2 SP1
  • Windows Server 2008
  • Windows 8.1
  • Windows 7 SP1

REQUIREMENTS

  • .NET Framework 4.5.x or higher
  • Install and Configure WMF 5.1 (download)
  • direct installation over WMF 4.0 or 5.0
  • uninstall WMF 5.1 Preview
  • Windows Server 2008 R2 SP1 or Windows 7 SP1
    – either uninstall WMF 3.0 or save/restore $PSModulePath before/after installing WMF 5.1
    – elevated execution of Set-WSManQuickConfig to configure WinRM (default not enabled)
    – unzip Win7-KB3191566-x??.zip, execute Install-WMF5.1.PS1 and follow on-screen instructions
  • WMF 4.0 required (on Windows Server 2008 R2 or Windows 7)

INCOMPATIBLE / NOT TESTED

  • Microsoft Exchange Server 2013
  • Microsoft Exchange Server 2010 SP3
  • Skype for Business Server 2015
  • Microsoft Lync Server 2013
  • Microsoft Lync Server 2010
  • System Center 2012 R2 Service Management Automation
  • Microsoft SharePoint Server 2010
  • System Center 2012 Virtual Machine Manager

REFERENCES
– Installing the .NET Framework (MSDN Library)
– Windows Management Framework (WMF) 5.1 Release Notes (link)
– Windows Management Framework (WMF) 5.1 Released (Windows PowerShell Blog)
– .NET Framework Versions and Dependencies (MSDN Library)
– Mailbag: What version of the .NET Framework is included in what version of the OS? (MSDN Blog)

Windows Management Framework (WMF) 5.1 Released