MS VA PowerShell Scripting answers

This topic contains 3 replies, has 4 voices, and was last updated by Profile photo of Dan Potter Dan Potter 9 months, 1 week ago.

  • Author
    Posts
  • #35787
    Profile photo of Jeff Taylor
    Jeff Taylor
    Participant

    Not sure why I got this wrong when there was heavy emphasis on DOT sourcing.

    5. You added a function called Get-DiskInfo to your script called DiskUtilities.ps1. What steps must take place in order to test your function outside of the PowerShell ISE? (Choose 2)

    A. Execute the DiskUtilities.ps1 script
    B. Execute the DiskUtilities.ps1 script in DOT Source mode
    C. Call the Get-Diskinfo
    D. Load your script as a module

    I chose B and C. both wrong

  • #35788
    Profile photo of Don Jones
    Don Jones
    Keymaster

    Hopefully someone will jump in who knows the specifics here – regrettably, we're not really a official support channel for the MVAs. Jason will have gotten this so we'll see if he can maybe chime in – he may have an idea what you're after. But I'm not sure he actually wrote or has even seen the quiz questions.

    Offhand, just reading this out of context, I'd agree with your B&C answer, although "DOT Source mode" is certainly not a way I've ever heard dot-sourcing referred to! Makes me curious who DID write the quiz questions.

  • #35794
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    They may have been going for B and D, which are essentially the same thing (and both will load your function into memory where it can be tested.)

  • #35819
    Profile photo of Dan Potter
    Dan Potter
    Participant

    A and C. I believe the question is focusing on the minimum requirements.

    In my own experience though, if I were in the process of "testing" it'd be copy and paste into the shell:-)

    edit: Wait... C is wrong? The question says 'must'

You must be logged in to reply to this topic.