PowerShell Exercises

Welcome Forums General PowerShell Q&A PowerShell Exercises

This topic contains 3 replies, has 3 voices, and was last updated by

2 years, 7 months ago.

  • Author
  • #43559

    Points: 0
    Rank: Member


    I am new here, so please bear with me. )

    I am trying to master my PS skills, and I think good way of achieving this goal is to do some exercises. Because simple reading a book, or watching lessons on youtube.com doesn't help much anymore.

    so my question is where can I find those exercises?

    Thank you.

  • #43569

    Points: 0
    Rank: Member

    A great place to start is the powershell scripting games. you can search this site https://powershell.org/?s=script+games an go through the archive of previous events and come up with your own answer and once you are done compare your result to other answers and the official answer. Periodically the powershell.org games master will post new challenges and you can post your own solution for it.

  • #43615

    Points: 0
    Rank: Member

    Hi All,

    I am gettting an error when i run the powercli command.this is something i have never seen before and i need someone help to fix the issue.

    PS C:\set-vm -vm MFRKNTCFISQD03 -Version v9
    Set-VM : Cannot bind parameter 'Version'. Cannot convert value "v9" to type
    "VMware.VimAutomation.ViCore.Types.V1.VM.VMVersion". Error: "Unable to match the identifier name v9 to a valid
    enumerator name. Specify one of the following enumerator names and try again: Unknown, v4, v7"
    At line:1 char:36
    + set-vm -vm MFRKNTCFISQD03 -Version v9
    + ~~
    + CategoryInfo : InvalidArgument: (:) [Set-VM], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,VMware.VimAutomation.ViCore.Cmdlets.Commands.SetVM

  • #43674

    Points: 0
    Rank: Member

    the error text is telling you that parameter -Version only supports values "Unknown, v4, v7"
    use one of those and or check the version of the powerci that is loaded and being called to ensure you have the correct version as the current documentation show the most recent version supports the following values " v4, v7, v8, v9, v10, and v11"

     get-command set-vm 

The topic ‘PowerShell Exercises’ is closed to new replies.