Manipulating Objects in Microsoft PowerShell - Video 2

414,019
0
Published 2016-09-13
This is part 2 of a series on using PowerShell. In this video we cover how to work with Objects in PowerShell. We do that by breaking down this script.

Get-PSDrive | ?{$_.Free -gt 1} | %{$Count = 0; Write-Host "";} { $_.Name + ": Used: " + "{0:N2}" -f ($_.Used/1gb) + " Free: " + "{0:N2}" -f ($_.free/1gb) + " Total: " + "{0:N2}" -f (($_.Used/1gb)+($_.Free/1gb)); $Count = $Count + $_.Free;}{Write-Host"";Write-Host "Total Free Space " ("{0:N2}" -f ($Count/1gb)) -backgroundcolor magenta}

So if you have ever wanted to understand what all of that is and how to write your own crazy script this is the video for you.

Here is a link to better understanding the .NET formatting method. {0:N2}
technet.microsoft.com/en-us/library/ee692795.aspx?…

For support or more information about PowerShell check out www.boldzebras.com/

Edit notes: None. :)

All Comments (21)
  • @AmitSingh-xh3gn
    First time writing a comment for any technical video, just to let everyone know, "Shane Young" is a magician, while watching this video, I didn't realized when 20+ minutes were done. Thank you so much for these videos, I had tried learning power shell earlier but ended up sleeping within 5 minutes of watching those videos. Teaching is an art and you know it very well.
  • Never in my life i have written or commented anywhere else...i have been prime customer on Amazon never gave a review for any product in 15 years...my first time and i am delighted to say this Guy know how to teach...I have Powershell books took a class 3 days i didnt learn a word...just 2 session i feel like i have learned a lot. Thank you!!
  • your video has such explanations that i was looking for months on you tube but never found. thankyou so much for explaining the "$_. " thing specifically.
  • Terrific, Shane !! The way of explanation. You made the PowerShell learning very easy, clear and understandable. We appreciate you and your knowledge.
  • @jonmaxx
    EXTREMELY helpful series of videos! Thank you!
  • @roodmack5791
    Thank you Shane for make it so easy to learn.... Even 6 Years Later Still the Best Learning Power Shell Content i ever find on Youtube
  • @PatrickLibby
    Great! One of the best tutorials I've found so far.
  • @Leoninmiami
    this is great stuff Shane!! and not just the content. The delivery keeps one interested!
  • @corywarren1194
    Great videos. I'm excited to see more. I've just picked up PS myself, due to a coworker leaving our company. I've had to dig into PS and take control of MDT, so I've been looking at a lot of videos. Yours has been the best that I've seen in a while.
  • @ChenMakesVids
    You are really good at explaining. Best tutorials I've seen in a while
  • @divya5863
    Excellent Shane!! You are making it more easy to understand.
  • @udh001
    This is what I was looking for. Excellent video series for the PowerShell beginners like me. I now have the confident to start writing my own scrips and better understand other's scripts. Thank you very much Shane.
  • @geeprak7
    Fantastic. Coming from way different background, Shane's video series on PowerShell is providing me a great confident and strength to move on. Thank you Shane. :)
  • @paulwilson406
    Another great video Shane, very cool stuff, just shows me how powerful this stuff is! Cheers.
  • I love the way you show your thought process as you go through the script, it really shows how easy it can be to make a simple script that looks complex. What I always used to do when I was learning would do pseudocode in comments on each step and fill in the step under each one. It gives you a foundational thought process on what information you need as you go. Love the content and so happy I found you.
  • @garrettmccleary
    Really great video and easy to understand. He really puts everything in basic terminology. I like the piece by piece explanations as well, really helps understand the basics of the language and not just seeing what all cool stuff you can do. Can't wait for the rest of the videos!
  • @Bule2805
    Great second video from these series. You make it all so simple to understand, even if there's a long road ahead before we (I, at least) can master Powershell. Keep up the good work!
  • Hi Shane, Great video. You explained things at a perfect pace. Would love to see videos of powerShell with AD
  • @brianlori5197
    very helpful. I am going to watch all your videos on powershell. I am a noob but this is helping me a great deal. Keep it up!