Tag: install

Install or Update PowerShell 6 on Windows 10

How to Install and Update PowerShell 6

Today Windows 10 and Windows Server 2019 ship with Windows PowerShell 5.1 as the default version. PowerShell Core 6 is a new edition of PowerShell that is cross-platform (Windows, macOS, and Linux), open-source, and built for heterogeneous environments and the hybrid cloud. PowerShell 6 today is a side by side version next to Windows PowerShell 5.1. That means on Windows you cannot just upgrade to PowerShell 6, you will need to install it, same as on Linux and macOS. This blog post shows you how simple you can install PowerShell 6 or update PowerShell 6, if you have already installed it, on Windows 10, Windows Server 2019 or Linux.

One great example of how cross-platform PowerShell can work, check out my blog post: How to set up PowerShell SSH Remoting

Of course, you can find excellent documentation out there on Microsoft Docs. However, Steve Lee (Microsoft Principal Software Engineer Manager in the PowerShell Team) shared some one-liner, which helps you quickly install and update PowerShell 6.

Install PowerShell Core 6

Before showing you the one-liner option to install PowerShell 6, I want to share with you the documentation to install PowerShell Core 6 on different operating systems like Windows, macOS, and Linux.



Download Azure Stack Update

How to install and manage Azure Stack Updates

At itnetX, we help customers to implement as well as to operate  Azure Stack. One part of operating Azure Stack is keeping it up-to-date. This means installing Microsoft Azure Stack Updates, hotfixes as well as OEM update packages like drivers and firmware. In this blog post I will cover all the information you need to keep your Azure Stack up-to-date.

Why should you update your Azure Stack

Azure Stack Update

This may sound like a simple question, but a lot of people ask for it. First of all, Microsoft and the hardware vendors are obviously delivering quality fixes and security updates to keep Azure Stack stable and secure. But Microsoft also adds new functionality with their updates packages to keep up with the rapid cloud development on Azure. This is important if you want that your Azure Stack stays consistent with Azure in terms of functionality.

Another important reason to stay current is to stay supported. You are allowed to be behind two major versions of Azure Stack, which means 2-3 months. You basically should update monthly, to make sure that you are secure and stable, however there are reasons why you might have to defer an update. For example, this can happen for some companies, when they are in a freeze period where they are not allowed to do changes in their systems. If you are more than 3 major versions behind, your Azure Stack is considered out of support and will not be supported from Microsoft, until you have the at least required version installed.

You can read more about the Azure Stack servicing policy on the Azure Stack documentation site.

Updates for the Azure Stack Integrated System

Azure Stack Operations

As mentioned before, there are basically three types of updates to Azure Stack. The monthly Azure Stack Update Packages from Microsoft, Hotfixes and OEM updates.

  • Microsoft software updates – Microsoft is responsible for the end-to-end servicing lifecycle for the Microsoft software update packages. These packages can include the latest Windows Server security updates, non-security updates, and Azure Stack feature updates. These update packages are non-cumulative updates and need to be installed one after the other. These updates are fully automated and will update the complete Azure Stack infrastructure.
  • OEM hardware vendor-provided updates – Azure Stack hardware partners are responsible for the end-to-end servicing lifecycle (including guidance) for the hardware-related firmware and driver update packages. In addition, Azure Stack hardware partners own and maintain guidance for all software and hardware on the hardware lifecycle host.
  • Microsoft hotfixes – Microsoft provides hotfixes for Azure Stack that address a specific issue that is often preventative or time-sensitive. Each hotfix is released with a corresponding Microsoft Knowledge Base article that details the issue, cause, and resolution. Hotfixes are downloaded and installed just like the regular full update packages for Azure Stack. Other the the major updates, Azure Stack hotfixes are cumulative per iteration.
 ReleaseCumulativeWhere to find
Microsoft Software UpdatesMonthly (4th Tuesday of very month)NoRelease Notes
OEM Hardware Vendor UpdatesDepending on OEMDependsOEM Website
Microsoft HotfixesWhen neededYesKnowledge Base article

By the way, you can only update Azure Stack multi-node systems, the Azure Stack Development Kit needs to be redeployed.



Install Hyper-V on Windows Server using PowerShell

Install Hyper-V on Windows Server using PowerShell

If you want to install Hyper-V on Windows Server you can use the following PowerShell command to install the Hyper-V role. If you want to run Hyper-V, make sure your server does include the following requirements.

  • 64-bit Processor with Second Level Address Translation (SLAT)
  • CPU support for VM Monitor Mode Extension (VT-c on Intel CPU’s)
  • Processors with Intel Virtualization Technology (Intel VT) or AMD Virtualization (AMD-V) technology
  • Hardware-enforced Data Execution Prevention (DEP) must be available and enabled. Intel: XD bit (execute disable bit) AMD: NX bit (no execute bit)
  • Minimum of 4 GB memory

To check if Hyper-V is enabled, use the following command:

If you are looking for installing Hyper-V on Windows 10, check the following blog post: Install Hyper-V on Windows 10 using PowerShell

 



Install Hyper-V on Windows 10 using PowerShell

Install Hyper-V on Windows 10 using PowerShell

On since Windows 8 you can run Hyper-V on your desktop, laptop or Windows tablet. To install or enable Hyper-V on your Windows 10 machine, you just need to have the following requirements:

  • Windows 10 Enterprise, Professional, or Education (Home does not have the Hyper-V feature included)
  • 64-bit Processor with Second Level Address Translation (SLAT)
  • CPU support for VM Monitor Mode Extension (VT-c on Intel CPU’s)
  • Minimum of 4 GB memory

The easiest way to enable Hyper-V on Windows 10 is to run the following PowerShell command as an administrator:

or you can use the following CMD DISM command:

If you are looking for installing Hyper-V on Windows Server, check the following blog post: Install Hyper-V on Windows Server using PowerShell



Install Azure PowerShell Az Module

How to Install the Azure PowerShell Module

This blogs post describes how you can install the Azure PowerShell module. Microsoft a couple of weeks ago released version one of their new Azure PowerShell module on .NET Core called the Az module. The Az module will replace the AzureRM module over time. however, the AzureRM module is still supported. The new Az module is a cross-platform module.

Well if you are working with Microsoft Azure you may need the PowerShell Modules for automation and some settings which are only available in PowerShell. With the latest releases you can install the Azure PowerShell Module using the package management in PowerShell, and install the Azure PowerShell module form the PowerShell Gallery.

Az module features

  • Az is a replacement for AzureRM and AzureRM.Netcore.
  • Runs on PowerShell 5.1 and PowerShell Core.
  • It is always up to date with the latest tooling for Azure services.
  • Az ships in Cloud Shell.
  • It shortens and normalizes cmdlet names. All cmdlets use “Az” as their noun prefix.
  • Az will simplify and normalize module names. Data plane and management plane cmdlets for each service will use the same Az module.
  • It ships with new cmdlets to enable script compatibility with AzureRM (Enable/Disable-AzureRmAlias).

Supported platforms

  • PowerShell 5.1 – Windows 7 or greater with .Net Framework 4.7.2 or greater installed
  • PowerShell Core 6.0 – Windows, Mac OS, Linux
  • PowerShell Core 6.1 – Windows, Mac OS, Linux

Install Azure PowerShell module

For me using the PowerShell Package Management and the PowerShell Gallery is may the easiest and fastest way to install it. In Windows 10 or a computer with the Windows Management Framework 5 installed, you can use the following PowerShell cmdlets to install it.

You should not install Az side-by-side with AzureRM. Remove all AzureRM modules before installing Az.

You can also update the AZ module using the following command:

And you can use the following command to login:

You can also see the Azure PowerShell Modules and versions using the PowerShell Package Management:

AzureRM compatibility

If you would like to run scripts developed for AzureRM using Az, use the Enable/Disable-AzureRmAlias cmdlets to add or remove aliases from AzureRM cmdlets to Az cmdlets.

This can be enabled and disabled:

Run Azure PowerShell from Cloud Shell

You can also run the latest Azure PowerShell module version directly from Cloud Shell, with no need to install it.

This blog post was updated with the release 1.0.0 of the Azure Az module based on .NET Core. You can find more about the new Azure PowerShell module on the GitHub repo.

Also check out my blog post: Mastering Azure using Cloud Shell



Automated Active Directory Deployment with PowerShell

Powershell

For a small presentation at KTSI I created a PowerShell script will automatically will deploys Active Directory Servers, adds other member servers, creates Organization Units and adds users via Powershell Remoting. As source there is a XML configuration file and CSV files for User Data.

Install AD with Powershell

This script is just for Lab deployments not for production, and it is not perfect, but I think maybe some people will enhance this script with their own code.

I do not support this script. it is just something I need to deploy my test environments and nothing more. More it shows diffrent

You can find more information about it works in this document.

XML Config file:

The PowerShell Script:



HP Network Interface does not start.

I just installed two new HP ProLiant DL360 G6 with Microsoft Windows Server 2008 R2. Everything worked fine until I installed the HP Support Pack which includes Drivers and Firmware for the HP Server.

This device cannot start. (Code 10)

After I installed the HP ProLiant Support Pack one of my Network Interfaces could not start. I got the following error in the Device Manager:

HP NC382i DP Virtual Bus Device
This device cannot start. (Code 10)

I tried to uninstall the device and rebooted the server but this didn’t work. I had still the same error.

The problem was that just uninstalling the driver does not work, you also have to check the checkbox on “Delete the driver software for this device.”

Delete the driver software for this deviceAfter doing that you can rescan for new hardware and the system will find this adapter again and everything will work fine.