Zürich PowerShell Training Kurs/Course (from May 2017)

PowerShellThe bad news is that I will miss another year of PowerShell Europe Conference in Hanover, Germany (2 – 5 May 2017). The very excellent news though is that I shall deliver and teach a private PowerShell 5.x course* to the biggest number one Swiss bank in the country, ranked as one of the top Fortune 500 global financial services institution worldwide.

How can I participate in or organize private (customized) lessons then? Simple really. Contact me for more information today. Or you can sign-up for any of my popular public PowerShell, Microsoft Windows Server 2016, MCSA certificate or specialized cloud training classes covering beginners to advanced levels:

  • Kurs: PowerShell V5.x – Einführung / Basics (link)
    Next (evening) class start Wed 10. May 2017
  • Kurs: PowerShell V5.x – Aufbau / Advanced (link)
    Next (evening) class start Wed 30. Aug 2017
  • Office 365, Azure, Exchange/Skype for Business Server, PowerShell Automation, etc. (contact)
  • Others

I look forward to work with you on training or consultancy engagements in your language (English, German, 中文, etc.) from Zurich, Switzerland to pretty much anywhere in the world.

#PowerShell #ITPros #Events #Training @ebzuerich

* hence the apparent quietness online

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

Many new functions were introduced or “reborn” as functions (where life started as cmdlets or vice versa) in PowerShell 5.0. Find-Command and Find-RoleCapability are the only 2 additions in PS 5.1 which brings the total function count to 59 for a default installation of Windows Server 2016 RTM (en-us).

PS 5.0

PS 5.1

Compress-Archive

Compress-Archive

ConvertFrom-SddlString

ConvertFrom-SddlString

Disable-DscDebug

Disable-DscDebug

Disable-NetworkSwitchEthernetPort

Disable-NetworkSwitchEthernetPort

Disable-NetworkSwitchFeature

Disable-NetworkSwitchFeature

Disable-NetworkSwitchVlan

Disable-NetworkSwitchVlan

Enable-DscDebug

Enable-DscDebug

Enable-NetworkSwitchEthernetPort

Enable-NetworkSwitchEthernetPort

Enable-NetworkSwitchFeature

Enable-NetworkSwitchFeature

Enable-NetworkSwitchVlan

Enable-NetworkSwitchVlan

Expand-Archive

Expand-Archive

Export-ODataEndpointProxy

Export-ODataEndpointProxy

Find-Command

Find-DscResource

Find-DscResource

Find-Module

Find-Module

Find-RoleCapability

Find-Script

Find-Script

Format-Hex

Format-Hex

Get-DscConfigurationStatus

Get-DscConfigurationStatus

Get-InstalledModule

Get-InstalledModule

Get-InstalledScript

Get-InstalledScript

Get-NetworkSwitchEthernetPort

Get-NetworkSwitchEthernetPort

Get-NetworkSwitchFeature

Get-NetworkSwitchFeature

Get-NetworkSwitchGlobalData

Get-NetworkSwitchGlobalData

Get-NetworkSwitchVlan

Get-NetworkSwitchVlan

Get-PSRepository

Get-PSRepository

Get-SilComputerIdentity

Get-SilComputerIdentity

Import-PowerShellDataFile

Import-PowerShellDataFile

Install-Module

Install-Module

Install-Script

Install-Script

New-Guid

New-Guid

New-NetworkSwitchVlan

New-NetworkSwitchVlan

New-ScriptFileInfo

New-ScriptFileInfo

New-TemporaryFile

New-TemporaryFile

Publish-Module

Publish-Module

Publish-Script

Publish-Script

Register-PSRepository

Register-PSRepository

Remove-DscConfigurationDocument

Remove-DscConfigurationDocument

Remove-NetworkSwitchEthernetPortIPAddress

Remove-NetworkSwitchEthernetPortIPAddress

Remove-NetworkSwitchVlan

Remove-NetworkSwitchVlan

Restore-NetworkSwitchConfiguration

Restore-NetworkSwitchConfiguration

Save-Module

Save-Module

Save-NetworkSwitchConfiguration

Save-NetworkSwitchConfiguration

Save-Script

Save-Script

Set-NetworkSwitchEthernetPortIPAddress

Set-NetworkSwitchEthernetPortIPAddress

Set-NetworkSwitchPortMode

Set-NetworkSwitchPortMode

Set-NetworkSwitchPortProperty

Set-NetworkSwitchPortProperty

Set-NetworkSwitchVlanProperty

Set-NetworkSwitchVlanProperty

Set-PSRepository

Set-PSRepository

Stop-DscConfiguration

Stop-DscConfiguration

Test-ScriptFileInfo

Test-ScriptFileInfo

Uninstall-Module

Uninstall-Module

Uninstall-Script

Uninstall-Script

Unregister-PSRepository

Unregister-PSRepository

Update-DscConfiguration

Update-DscConfiguration

Update-Module

Update-Module

Update-ModuleManifest

Update-ModuleManifest

Update-Script

Update-Script

Update-ScriptFileInfo

Update-ScriptFileInfo

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)

 

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)

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