header image

Archive for December, 2016

PowerShell in 2017

Posted by: | December 31, 2016 Comments Off on PowerShell in 2017 |

As 2016 winds down what do we have to look forward to from PowerShell?   In January WMF 5.1 should become available for down level clients. This brings PowerShell 5.1 to Windows 7 SP1, 8.1, 2008 R2 SP1, 2012, 2012 R2   Notice that Windows 8 and 2008 aren’t on that list   If you’re […]

under: PowerShell

2016–a PowerShell perspective

Posted by: | December 31, 2016 Comments Off on 2016–a PowerShell perspective |

2016 was important as the 10th anniversary of PowerShell being released as a web download – announced November 2006 at TechEd/IT Forum in Barcelona. The PowerShell team organised a 8 hour web cast on Channel 9 that I was privileged to be part of.   We also saw PowerShell 5.1 become available on Windows 10 […]

under: PowerShell

Summit 2017 Registration still open

Posted by: | December 30, 2016 Comments Off on Summit 2017 Registration still open |

Just a quick reminder that the registration for the 2017 PowerShell and DevOps Summit is still open – details from https://powershell.org/summit/

under: PowerShell, Summit

Preserving property order

Posted by: | December 30, 2016 Comments Off on Preserving property order |

This is a very common pattern:   $os = Get-CimInstance -ClassName Win32_OperatingSystem $comp = Get-CimInstance -ClassName Win32_ComputerSystem $props = @{ OS = $os.Caption InstallDate = $os.InstallDate LastBoot = $os.LastBootUpTime Make = $comp.Manufacturer Model = $comp.Model } New-Object -TypeName PSObject -Property $props   Get some data – in this case a couple of WMI classes and […]

under: PowerShell Basics

Linux on the desktop

Posted by: | December 29, 2016 Comments Off on Linux on the desktop |

My sense of humour has some quirky moments – as my friends will tell you. Last night I had a lot of time to sit and think (why is a story for another time and place) and it one point a thought about Linux on the desktop struck me.   Back in the 1980s when […]

under: Linux, Windows 10

Inertia rules

Posted by: | December 27, 2016 Comments Off on Inertia rules |

In this article https://powershell.org/2016/12/15/the-key-to-understanding-powershell-on-windows-or-linux/ Don Jones explains Windows administrators have difficulty explaining, and “selling” PowerShell to Linux admins.   I’ve known Don for quite a long time and He’ll be the first to tel we don’t agree on everything so It’ll be no surprise to learn that I disagree with parts of his argument.   […]

under: Opinion, PowerShell

Applying updates through WSUS

Posted by: | December 22, 2016 Comments Off on Applying updates through WSUS |

I like to keep the virtual machines in my test lab up to date so have a WSUS server to download and manage updates. The difficulty is applying the updates. With Windows 2012 R2 I used a module that would contact the WSUS server and apply the updates – the was especially useful on server […]

under: PowerShell and CIM, PowerShell and WMI, Windows Server 2016, WSUS

Calculating Standard Deviation – the class

Posted by: | December 20, 2016 Comments Off on Calculating Standard Deviation – the class |

You’ve seen how to calculate standard deviation and how to turn that calculation into a PowerShell function. This time we’ll use the calculation to create a class: class stats { static [double] StandardDeviation ([double[]]$numbers) { $mean = $numbers | Measure-Object -Average | select -ExpandProperty Average $sqdiffs = $numbers | foreach {[math]::Pow(($psitem – $mean), 2)} $sigma […]

under: PowerShell Basics

Calculating Standard Deviation – the function

Posted by: | December 20, 2016 Comments Off on Calculating Standard Deviation – the function |

Last time I showed how to calculate the standard deviation of a set of numbers and said the code could easily be turned into a function function Measure-StandardDeviation { [CmdletBinding()] param ( [double[]]$numbers ) $mean = $numbers | Measure-Object -Average | select -ExpandProperty Average $sqdiffs = $numbers | foreach {[math]::Pow(($psitem – $mean), 2)} $sigma = […]

under: PowerShell Basics

Calculating Standard Deviations–the calculation

Posted by: | December 19, 2016 Comments Off on Calculating Standard Deviations–the calculation |

A while ago I saw something asking about calculating standard deviations for a set of numbers in PowerShell. You can calculate the the mean (average) of a set of numbers using Measure-Object   $numbers = 1..10 $mean = $numbers | Measure-Object -Average | select -ExpandProperty Average $mean 5.5   To calculate the standard deviation you: […]

under: PowerShell Basics

Older Posts »

Categories