PowerShell Exercises


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.

A great place to start is the powershell scripting games. you can search this site Search Results for “script games” – PowerShell.org 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.

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: (:slight_smile: [Set-VM], ParameterBindingException
    • FullyQualifiedErrorId : CannotConvertArgumentNoMessage,VMware.VimAutomation.ViCore.Cmdlets.Commands.SetVM

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