Developing with PowerShell Classes: Here be Dragons by Brandon Olin

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 พ.ย. 2024

ความคิดเห็น • 9

  • @JP-er5nh
    @JP-er5nh 6 ปีที่แล้ว +1

    I'm glad he got to the abstract class example. That's a great way to handle it.

  • @gareginasatryan6761
    @gareginasatryan6761 4 ปีที่แล้ว

    A few days ago my Powershell mentality was changed when I understood to actually think in OOP style to achieve code reuse.
    It was a simple example of file paths. Instead of copy pasting code, I used the built in class which derives properties automatically.

  • @michaelcook7389
    @michaelcook7389 4 ปีที่แล้ว

    @6:10 / Based on my observations, the reason why this happens is because loading the script AND, the execution of the class type, it has to be within the same execution context. So for instance, you're attempting to load a function/class, it doesn't stay in memory unless it is in the same scope. You're attempting to load the module to then access the class, and the loading of the module works..? But then, attempting to use a class based on that module won't because it is no longer within the same execution context.
    So if you were to make a script that loads the module AND, works with the class... then it would.
    I know this video is almost a couple years old, but I wanted to point out that this is probably the true answer.

  • @noam190
    @noam190 4 ปีที่แล้ว +1

    wait a minute if it was uploaded in 2018 how was tesla year 2020?

  • @msolomonbush
    @msolomonbush 6 ปีที่แล้ว

    Can you provide a link to the seminar he referenced on 'how-to create Powershell Classes'?

    • @gngrtech
      @gngrtech 6 ปีที่แล้ว +1

      I couldn't find it. I really like this blog though: xainey.github.io/2016/powershell-classes-and-concepts/

    • @msolomonbush
      @msolomonbush 6 ปีที่แล้ว +1

      Awesome! Thanks for the link!

    • @Broodaxe
      @Broodaxe 5 ปีที่แล้ว +1

      Hey I know this is like 9 months old, but this is the video he was talking about: th-cam.com/video/RgwrHpE0IK4/w-d-xo.html

    • @tinle4109
      @tinle4109 5 ปีที่แล้ว

      Yes, I found it here: github.com/devblackops/pssummit2018-classes
      You need to set Set-ExecutionPolicy to make it works and here is the link: www.opentechguides.com/how-to/article/powershell/105/powershel-security-error.html