PowerShell for Windows Admins:

Powershell


December 20, 2016  2:20 PM

Calculating Standard Deviation – the class

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

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...

December 20, 2016  10:00 AM

Calculating Standard Deviation – the function

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

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 |...


December 19, 2016  3:08 PM

Calculating Standard Deviations–the calculation

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

A while ago I saw something asking about calculating standard deviations for a set of numbers in PowerShell. You can calculate the mean (average) of a set of numbers using Measure-Object

 $numbers = 1..10

$mean = $numbers | Measure-Object -Average | select -ExpandProperty...


December 14, 2016  5:38 AM

Active Directory Schema Versions

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Active Directory, Powershell

With the release of Windows Server 2016 its time to update my schema versions script

$sch = [System.DirectoryServices.ActiveDirectory.ActiveDirectorySchema]::GetCurrentSchema()
$de = $sch.GetDirectoryEntry()
switch ($de.ObjectVersion) {
    13{"{0,25} " -f "Schema Version...


November 30, 2016  3:52 PM

Conference–time to book

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Registration is open for the PowerShell Summit (USA) and PowerShell Conference (Europe). Now is an excellent time to decide which one you’re going to attend next year. If you’re serious about PowerSHell you should be at one of these events. PowerShell Summit -


November 18, 2016  6:55 AM

PowerShell finally the de facto shell

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell, Windows 10

After 10 years PowerShell has become the de facto shell for Windows! Windows Insider Preview build 14971 released yesterday uses PowerShell instead of cmd.exe as the default shell in Start Menu or File Explorer. See


November 18, 2016  5:14 AM

Changing the samAccountName

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Active Directory, Powershell

I was recently asked how the samAccountName – also referred to as the login id – could be changed. First lets look at an account: PS C:\Scripts> Get-ADUser -Identity 'FredFox' DistinguishedName : CN=FOX...


November 17, 2016  10:16 AM

New PowerShell console on Server Core

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

Server Core is great for reducing the footprint of your VMs – Nano server is smaller but it can’t be a domain controller One draw back to server core is that you only get a single console. If you hang that for any reason you have to either try and open another one (Hyper-V console greys out...


November 17, 2016  8:18 AM

Creating test accounts in Active Directory

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Active Directory, Powershell

There’s often a need to create test accounts in AD. You may want to create a a set of test accounts or if you have a demo/test lab you may need accounts in that. Creating the names for the accounts is a pain unless you go down the test1, test2 etc route. One way to real looking names is I use...


November 16, 2016  11:22 AM

Exploring PowerShell automation

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Books, Powershell

My PowerShell books have all been published by Manning, A while back they asked me to put together a selection of extracts that show the depth and breadth of PowerShell. Its now available – for free - 0 Comments     RSS Feed     Email a friend


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: