PowerShell for Windows Admins


May 26, 2016  5:12 AM

Y shaped people

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
DevOps

During the WinOps conference – http://winops.org/ – I attended a session on DevOps culture. At one point the discussion got on to skill sets.

I introduced the concept of the Y shaped skillset.

You should have a deep understanding on at least one area – C# development, Active Directory, web development, Exchange management – whatever it is you should a ‘go to’ person for that area. That’s represented by the down stroke of the Y

In addition in a devops world you ideally need a bunch of skills that span the devops range. At the top you should have a broad understanding across the range of skills – at least enough to have sensible conversations with other practitioners. Those skills can be backed up with a few areas that complement your main skill as you drop deeper into the Y.

Over time you may see your main skill set change and what was your primary skill migrate into a secondary area to be replaced by something else.

Next time you’re wondering what to learn – think of this model and think about what skills you need to add to complement and build on your current skill set

May 18, 2016  3:51 AM

Windows container providers

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
containers, Windows Server 2016

Containers are a new feature in Windows 2016. I was preparing for my talk at the WinOps conference next week – http://winops.org/ – and realised I needed the container OS image for nano server

I discovered that there are 2 container image providers available through the PowerShell gallery.

In TP4 I used the ContainerProvider provider. That still exists BUT only supplies the TP4 images

PS>  ContainerProvider\Find-ContainerImage | ft -a

Name              Version      Source Description
—-              ——-      —— ———–
NanoServer        10.0.10586.0        Container OS Image of Windows Server 2016 Technical Preview 4 : Nano Server Installation
WindowsServerCore 10.0.10586.0        Container OS Image of Windows Server 2016 Technical Preview : Windows Server Core Installation

If you want the TP5 images you have to use the ContainerImage provider

PS>  ContainerImage\Find-ContainerImage | ft -a

Name              Version         Source                Summary
—-              ——-         ——                ——-
NanoServer        10.0.14300.1010 ContainerImageGallery Container OS Image of Windows Server 2016 Technical Preview 5 : Nano Server I…
WindowsServerCore 10.0.14300.1000 ContainerImageGallery Container OS Image of Windows Server 2016 Technical Preview 5 : Windows Serve…

This isn’t very satisfactory and will cause lots of confusion in the long term. I just hope we’re not getting a new provider with every new version of Windows 2016


May 11, 2016  12:03 PM

Cloud Native Applications

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Books, Cloud Computing

Cloud Native Applications is a collection of hand-picked chapters presenting five topics that will give you insights into the world of cloud computing.  The link is here: http://bit.ly/1T46wP7

This is excellent value – its FREE.

You’ll find chapters on:

Amazon Web Services

Docker

Mesos

RabbitMQ

Netty

Enjoy


May 5, 2016  12:12 PM

PowerShell and Nano server

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell, Windows Server 2016

Nano server is the new install option introduced with Windows 2016. It has a really tiny footprint compared to a server core machine.

Of course it has PowerShell but its not a complete port of the PowerShell you’re used to. The features that aren’t present are detailed here:

https://technet.microsoft.com/en-us/library/mt671124%28v=ws.12%29.aspx

What you get is PowerShell re-written for .NET core

If you want to develop your own cmdlets try this article to get you started:

https://blogs.msdn.microsoft.com/powershell/feed/


May 2, 2016  7:45 AM

Loading assemblies

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

PowerShell is .NET based but doesn’t load all available .NET assemblies when it starts.

Many people still use something  like

[System.Reflection.Assembly]::LoadWithPartialName(‘System.Windows.Forms’)

to load additional assemblies.  This is a hang over from PowerShell v1 when there wasn’t another way to perform the load.

The LoadWithPartialName method has been deprecated – https://msdn.microsoft.com/en-us/library/12xc5368(v=vs.110).aspx – and shouldn’t be used.

Your alternatives are:

Add-Type -AssemblyName System.Windows.Forms

or in PowerShell v5

using assembly System.Windows.Forms

using namespace System.Windows.Forms

can be used


April 29, 2016  1:25 PM

Free ebook: IoT

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
e-books, iot

A free ebook from Manning: Using the Web to Build the IoT is a collection of six hand-picked chapters that introduce the key technologies and concepts for building the application layer of the IoT.  The page is here: http://bit.ly/1SUJW0P


April 29, 2016  5:13 AM

WinOps conference

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
DevOps, Powershell

The WinOps conference is dedicated to ‘Windows in a DevOps World’  Its in London 24 May 2016. I’ll be speaking as will Jeffrey Snover and Ed Wilson of Microsoft.

More details from http://winops.org/

Hope to see you there


April 28, 2016  3:19 AM

Windows Server 2016 TP5 Cumulative Update

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Windows Server 2016

An update – KB 3157663 – should be installed BEFORE installing any roles, features or applications into a TP5 system.

Finding the update isn’t easy – no links from the TP5 pages and doesn’t show in search on Bing or if search microsoft.com

You can find it here:

https://support.microsoft.com/en-us/kb/3157663

Lets hope RTM is a bit more organised


April 27, 2016  2:13 PM

Windows Server 2016 TP5 now available

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Windows Server 2016

Microsoft have released Technology Preview 5 (TP5) of Server 2016 today.

Its available from MSDN and the evaluations site

Lots of new stuff to try out


April 27, 2016  10:11 AM

New variables with the variable cmdlets

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

So you have some data in csv format:

column1 column2 column3 column4
——- ——- ——- ——-
a1      b1      c1      d1
a1      b2      c1      d1
a1      b3      c1      d1
a2      b3      c1      d1
a2      b4      c1      d1
a2      b3      c1      d1
a3      b5      c1      d1
a3      b6      c1      d1
a3      b7      c1      d1
a4      b5      c1      d1

In a variable $cd

You want colum1 and column2 in a new variable

Simplest way is probably

$new1 = $cd | select Column1, column2

The *-Variable cmdlets don’t get out much so I thought examples using them would be useful

You could also use the New-Variable cmdlet

New-Variable -Name new2 -Value ($cd | select Column1, column2)

Set-Variable also works

Set-Variable -Name new3 -Value ($cd | select Column1, column2)


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: