A Guide to PowerShell – part 3

Welcome to part 3 of 3 of The Solving A guide to PowerShell. Check also Part 1 and Part 2.

In this final part we will combine the concepts learnt so far and demonstrate practical uses of PowerShell for System Administrators. PowerShell can make the life of an IT Administrator much easier and can be used to manage your infrastructure effortlessly. PowerShell is a fantastic tool at making server management simple, it is great at gathering information about your Server and displaying that data in different formats.

This part of the guide will introduce several new concepts. Take your time and work through each part individually. (more…)

A Guide to PowerShell – part 2

Welcome to part 2 of 3 of The Solving A guide to PowerShell. Click here for Part 1 and Part 3. Here we will introduce importing & exporting data to and from the Shell.

Importing Data into PowerShell

PowerShell supports a large number of data formats which can be imported into it. This gives administrators the ability to execute tasks or commands against the data input. There are 2 key commands to grasp, Get-Content and Import-csv. The Get-Content cmdlet will get the content of an item at a defined location, this is usually text or a string. Import-Csv creates a table-like custom object using the data and headings from a csv file. Remember you can read more by typing get-help get-content -full and get-help import-csv -full

To demonstrate this I will be using The-Solving 2012 R2 Lab. I have created a text file with the server hostnames and saved it to C:\Temp\Test.txt

test file - hostnames (more…)

A Guide to PowerShell – part 1

Welcome to part 1 of 3 of The Solving A guide to PowerShell. Click here for Part 2 and Part 3.

Windows PowerShell is a vast subject, the aim of this guide is to provide system administrators a simple, usable guide to the fundamentals of PowerShell. We will also demonstrate scripts and commands which can be used in typical day-to-day tasks. This guide will give you the basic steps to get you started, it will teach you the core skills needed to open the door to PowerShell and object oriented scripting.

What is PowerShell?

Windows PowerShell is a command line shell, a scripting language and an automated task framework from Microsoft. It is based on .NET framework and is great at automating batch jobs and system tasks. PowerShell is available on both Windows and Linux platforms, and has been integrated into Microsoft operating systems since Windows Server 2003 R2. Today, PowerShell is installed by default on all Microsoft Server releases, and all professional versions of their modern desktop operating systems. Additionally you can download it direct from the Microsoft website if required. (more…)

Install VMware ESXi on a Hyper-V

It is possible to use nested virtualization to run VMware ESXi as a Virtual Machine in Hyper-V. To some, this may be a viable option if you are unable to acquire any new hardware, or if you simply want to test new VMware products on your Windows 10 desktop.

Although this process is not officially supported by VMware or Microsoft, it is possible to get an ESXi environment stood up using Hyper-V. There are a number of prerequisites to adhere to as well as an understanding that following this process may not give a smooth end-to-end user experience.

Before we start we MUST prep the ISO and inject Hyper-V compatible Network drivers. If you do not do this the process will fail and you will be unable to connect to your ESXi server. (more…)

How to install and configure VMware PowerCLI version 10

VMware PowerCLI is a collection of Windows Powershell modules which are used to manage and maintain a VMware virtual environment. PowerCLI is a great tool for system administrators and can be used to gather detailed information and/or execute bulk commands against multiple VMs, Hosts, Network or Storage devices.

It is typically installed on Microsoft Windows based operating systems. A desktop or server must have network access to the VMware vCenter server(s) and be capable of running a minimum of Windows PowerShell 2.0 with .NET 3.5 SP1 pre-installed. However, it is highly recommended to install the very lastest official releases of Powershell and PowerCLI modules.

This step by step procedure is to prepare your system to run VMware PowerCLI Version 10 (released February 2018), configure shortcuts to your infrastructure and make the first connection to your vCenter server(s). (more…)

How to set up a Hyper-V failover cluster

Hyper-V can enable high-availability using Windows Server Failover Cluster Manager. This allows you to create a virtual infrastructure which is resilient to server failures.

A typical Hyper-V failover cluster setup consists of 2 or more servers, which share clustered network and clustered storage resources. In the event of a server failure, the clustered resources are seemlessly failed over to the next available server. To the end user, there is generally no impact on services running on the server.

Failover is an automated process which is managed by the Operating System. Hyper-V enables you to create clustered storage and clustered networking which are an infrastructure requirement for cluster failover manager. (more…)

When and How to use Sysprep

Sysprep is the Microsoft system preparation tool used by system administrators often during the automated deployment of Windows Server based operating systems. Sysprep is most frequently used in virtualized environments to prepare a system image which will be cloned multiple times.

Typically, a system administrator creates a template for a system build and customizes the operating system to their requirements. During the build process, the Operating System allocates the server with a unique SID (System Identifier). Each time you clone the system image/template, you will also clone the SID.

In a Microsoft Windows Server network, duplicate SIDs can cause problems. Issues such as WSUS incompatability, Volume Licence key activation problems as well errors in Microsoft Office products. Other non Microsoft products such as Citrix do not work correctly on environments with duplidated SID. (more…)