PowerShell for Windows Admins:

October, 2018


October 31, 2018  4:23 AM

Find a missing integer–alternative solution

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

In my recent post about finding a missing integer in an array of numbers I didn’t spell out the assumptions. In this post I’ll explain those assumptions and show you how to Find a missing integer–alternative solution. The assumptions were: The sequence of numbers in the array starts at...

October 29, 2018  8:49 AM

Finding and removing duplicates

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Continuing the thoughts about techniques for dealing with integer arrays – this is how to go about finding and removing duplicates from the array. First – to find any duplicates use Group-Object function get-duplicate { [CmdletBinding()] param ( [int[]]$iarray ) $iarray |...


October 25, 2018  5:32 AM

Find a missing integer

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

I stumbled across a set of programmer interview questions recently. They raised some interesting problems that I thought would be fun to show a PowerShell answer. This is the first of them – find a missing integer in an array. Consider an array of integers. It should have 10...


October 22, 2018  10:45 AM

Managing errors

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

If you try to do a directory listing through C:\Windows\system32 you’ll get some access denied errors. I’m going to show you how to do this while managing errors that arise. The code will also highlight a few of the PowerShell error handling techniques.   $epath2 =...


October 21, 2018  11:51 AM

Test-Connection cmdlet

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

The Test-Connection cmdlet wasn’t included in PowerShell v6.0 but did make a come back in v6.1. The v6.1 version of Test-Connection has some serious issues as I’ve described before. Work is being done at the moment to remedy those issues – hopefully for v6.2   This is your...


October 19, 2018  8:57 AM

DevOps team structures

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
DevOps

DevOps has never really excited me and I never understood why until I read about DevOps team structures - https://web.devopstopologies.com/ The article suggests 7 bad practices or ‘anti-types:

    ...


October 18, 2018  10:32 AM

PowerShell v6.2 preview 1

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

PowerShell v6.2 preview 1 quietly appeared yesterday - https://github.com/PowerShell/PowerShell/releases No major breaking changes. New features include:


October 18, 2018  6:27 AM

PowerShell v6.1 working directory

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

PowerShell v6.1 introduced a very annoying change in that a –workingdirectory parameter was added to pwsh.exe. When you install v6.1 working directory is automatically set to ~ which is your home folder. The workingdirectory doesn’t play nice with your profile. In my profile I set the location...


October 17, 2018  3:11 AM

PowerShell approved verbs

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

PowerShell uses a verb-noun style for naming cmdlets. The list of Powershell approved verbs is available at 0 Comments     RSS Feed     Email a friend


October 16, 2018  8:22 AM

Running ping tests

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

I’ve shown how to discover network information using the get-internetconnection function and how to construct simple Pester tests to ping the IP addresses returned by get-internetconnection. This time I’ll show you how to create a control function for running ping tests. In fact the control...


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: