PowerShell for Windows Admins:

April, 2018


April 30, 2018  1:53 PM

PowerShell v6.1 Range Operator

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

The PowerShell v6.1 Rang Operator has been enhanced to deal with letters as well as numbers. The range operator has always been available in PowerShell. It can be used to generate a range of integers for example: PS>  (1..10) -join ',' 1,2,3,4,5,6,7,8,9,10 PS>  (10..1) -join...

April 30, 2018  7:29 AM

-Contains or -In

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

PowerShell has two operators that do very similar jobs –contains and –in. So which should you use –contains or –in. From the help file. -Contains: Tells whether a collection of reference values includes a single test value. -In: Tells whether a test value appears in a collection of...


April 28, 2018  1:38 PM

Installing PowerShell v6.1 preview 2

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

The MSI for installing PowerShell v6.1 preview 2 has a screen for optional actions: Add PowerShell to Path environment variable Register Windows Event Logging Manifest Enable PowerShell remoting Add 'open here' context menus to Explorer The 6.1 preview installs side by side with PowerShell...


April 28, 2018  8:16 AM

Access module and functions

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

A long time ago I wrote a module for working with Access databases. I also added a couple of independent functions. The  Access module and functions are now available on github. People have asked about getting the module and while its had a number of temporary homes its permanent home is now...


April 28, 2018  4:06 AM

PowerShell v6.1 preview 2

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

PowerShell v6.1 preview 2 is now available for download from https://github.com/PowerShell/PowerShell/releases The breaking changes shouldn’t affect your code as they’re...


April 28, 2018  3:37 AM

ScriptBlocks Decoded

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

My second talk at the PowerShell Summit 2018 was ScriptBlocks Decoded. Starting from the basic explanation of what is a scriptblock and why they’re important it progressed through to proxy functions at the end. The slides and code are available at


April 27, 2018  4:46 AM

Troubleshooting #2

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Last time I covered the PowerShell Troubleshooting pack. This time in Troubleshooting #2 I want to show you how to use Pester when troubleshooting. When you’re troubleshooting you ideally want to follow a repeatable process so that you can do it again if necessary and teach others to do the...


April 26, 2018  1:47 PM

Troubleshooting #1

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

How do you go about troubleshooting a problem? There are two ends to the spectrum of solutions to troubleshooting a problem. At one end you have the click and pray brigade who will manically click round all the menus on all the tools they can think of using to try and find something that will...


April 24, 2018  1:09 PM

CIM references and associations

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
CIM, Powershell

Way back in 2011, when I were just a young lad, I wrote about WMI or CIM references and associations - https://wordpress.com/read/blogs/16267735/posts/1673 ASSOCIATORS...


April 23, 2018  4:53 AM

Change a function definition

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Functions in PowerShell are based on scriptblocks and as I showed in my session at the recent PowerShell Summit its possible to change a function definition. Let’s start with a simple function: PS> function f1 { >> $x = 1 >> $y = 2 >> $x + $y >> } PS>...


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: