Learning - Don Jones

I am new to PowerShell and have attended a Microsoft online course. It was OK, but not what I was expecting. I am now going to purchase some materials on my own and would like suggestions as I am not quite sure on which editions of PowerShell books to purchase yet or which training videos would be best. My background is as a Windows and Unix engineer, but never as a programmer or coder as I have never pushed myself to learn it which is my own fault.
Can someone please advise me on what to get and also aside from this site I have done research and found other sites. But I am interested in any free/online learning materials, e-books, web videos and so forth that are done well and would benefit me.

Best Regards,

If you’re looking for free resources (other than PowerShell.org), the TechNet Script Center will be near the top of the list. Lots of articles, blog posts, and the Gallery / Script Repository which has all kinds of stuff (both Microsoft and community-submitted content). http://technet.microsoft.com/en-us/scriptcenter/dd742419.aspx

I can speak for what I’ve done. “Learn PowerShell 3 in a Month of Lunches” is in fact valid for PowerShell 3 and 4 as a starting point (a revision of the book cover will be removing the “3” and making the 3/4 usefulness clear). My “Ultimate PowerShell v2/3/4” video series with CBT Nuggets is also current (and just completed). PowerShell In Depth is a reference, and is being revised to a 2nd edition to correspond with PowerShell v4, and remains useful for v3. My YouTube page (youtube.com/powershelldon) has a number of useful videos, including multi-hour workshops, and is free - but it is not specifically structured video learning.

I’ll recommend Don’s book (with cohort Jeffrey Hicks) “Learn PowerShell 3 in a Month of Lunches”. That’s how I got my start in PowerShell, although it took me more than a month of lunches to actually get through it. :slight_smile: Right now, it’s my go to recommendation for anyone wanting to learn PowerShell. “Learn PowerShell Toolmaking in a Month of Lunches” has been great too, although I still haven’t finished it, and it’s been something like three or four months now.

Thank you All - I ordered the book Lunch Books both today! I am going to try to get at CBT Nuggets subscription if the budget will allow. I have seen the PowerShell in Depth book as well but it is far over my head at this time.

I did watch some of the videos on the YouTube site, thank you much Don!

I would like to learn how to create some nice HTML reports as that is what is driving my learning at the moment along with many requests to provide csv files of AD user attributes. What are the best resources for these, I’m sure the lunch book will work well, but is there anything that would help me do some of these simple reports? I know how to get the AD attributes for the users, but I do not know how to export them nicely to a csv or html, and send an email.

I also have an odd request to export users phone number and remove the area code. This is a big challenge based on what I have searched for already.

Kind Regards,

There’s a free ebook on this site on the topic of HTML reports (see https://powershell.org/ebooks/ ), complete with a module you can download and use.

As for extracting a phone number without its area code, that can be a little tricky if your source data isn’t formatted consistently. Here’s how I’d probably do that as a start, using a regular expression:

$testPhoneNumbers = @(
    '(555) 123-4567'
    '555 123 4567'
    '555 123-4567'

foreach ($phoneNumber in $testPhoneNumbers)
    $phoneNumber -replace '.*(?=\d{3}[- ]?\d{4}$)'

Of course, this assumes that a valid phone number is 7 digits long, and will be in a group of 3 and group of 4 (optionally separated by a space or -). That’s fine for the US and Canada, but may not be true of international numbers. If you have to make this work in a global environment, it’s going to be even more of a pain.

Don’t forget his youtube channel. . .


Expanding on Dave’s solution above, if you wanted to reinsert the dash you could add one line:

$PhoneNumbers = @(
    "714 555 1212"
    "(714) 555-1212"
ForEach ($Num in $PhoneNumbers)
    $Num = $Num -replace "\(|\)|-|\.| ",""   # remove punctuation
    $Num = $Num.Substring($Num.Length - 7,7) -replace "(\d{3})(\d{4})",'$1-$2'