MS VA PowerShell Scripting answers

This topic contains 3 replies, has 4 voices, and was last updated by  Dan Potter 2 years, 3 months ago.

  • Author
  • #35787

    Jeff Taylor

    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

    Don Jones

    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

    Dave Wyatt

    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

    Dan Potter

    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.