PowerShell for Windows Admins:

December, 2018


December 31, 2018  11:11 AM

PowerShell articles

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Here’s some links for other PowerShell articles I’ve written recently

December 30, 2018  7:39 AM

Change file times

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

When a file is created, accessed or modified that time is recorded. This is how to change file times. There are three properties to consider: CreationTime LastAccessTime LastWriteTime   Just to add to the fun there are UTC (GMT in real world) times as...


December 29, 2018  3:58 PM

Get first non-repeating character in a string

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

How do you get first non-repeating character in a string. In Windows PowerShell v5.1 you could use Group-Object but as I showed last time that approach has been taken away in PowerShell v6.1. Instead you need to loop through the characters in the string and count them  


December 29, 2018  9:16 AM

Group-Object change in PowerShell v6.1

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

There’s a subtle Group-Object change in PowerShell v6.1. In PowerShell v5.1 if you do this: $ts = 'ffrluoluntlvxutxbdvbktgyyvsvcrkxoyfotzkzogcwuwycmnhuedk' $ts.ToCharArray() | group   You get this:

Count Name                  Group
----- ----         ...


December 28, 2018  1:50 PM

Counting vowels

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

If you’re given a string how would you go about counting vowels, consonants  and non-alphabet characters. My approach would be: 0 Comments     RSS Feed     Email a friend


December 27, 2018  7:11 AM

Create a random string

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

I often need to create a random string of characters. Here’s a simple function to achieve that: 0 Comments     RSS Feed     Email a friend


December 12, 2018  12:43 PM

Return of the missing PSDiagnostics

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Return of the missing PSDiagnostics members in PowerShell v6.2 preview 3. In Windows PowerShell v5.1 the PSDiagnostics module contains these...


December 12, 2018  7:42 AM

Find duplicate characters in a string

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Staying with our current theme of manipulating strings this is how you find duplicate characters in a string.   0 Comments     RSS Feed     Email a friend


December 11, 2018  10:42 AM

Join-String

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Join-String is a new cmdlet in PowerShell v6.2 preview 3. Join-String enables you to use the pipeline to join strings. We’ve had the –join operator for a long time: PS>  1..3 -join ',' 1,2,3   As an alternative you could do PS>  1..3 | Join-String -Separator...


December 11, 2018  5:23 AM

PowerShell v6.2 preview 3 install issue

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

PowerShell v6.2 preview 3 install issue - PowerShell v6.2 preview 3 is now available from https://github.com/PowerShell/PowerShell/releases but you may notice a probloem if you...


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: