PowerShell: LEAP Motion PowerShell Lottery Script @ Danish PowerShell User Group

In our geek club aka The Danish PowerShell user group, we always do a lottery in the end, for books or similar.

To draw the correct winner we have been using a script that I have developed.

I have for a long time, promised to release the script so that other user groups or other interested people can use it for fun!

It has amazing ascii graphics and colors!!! It will take you straight back to your C64 loading screen!

The script is a lottery script that takes a file from www.eventbrite.com containing all attendees.

The script need a LEAP Motion device for actually triggering the lottery, for this I have developed a few .NET DLL’s based on a sample from leapmotion.com

You can download the package with Script and files here:

Download “PSUG.DK-LEAP-Lottery-v7.zip” PSUG.DK-LEAP-Lottery-v7.zip – Downloaded 180 times – 727 KB

How to use:

1. Export at list of your users from eventbrite, use the sample file or edit the sample file to contain your users

2. Save the file as names.csv in same directory as this script (and the other files)

3. Connect your LEAP Motion

4. Start script using the shortcut (you might need to edit the shortcut for the location of your script

5. When it was “connected”. Press enter to start the lottery

6. To “turn the dail” use your hand and swipe over the LEAP Motion. The speed of your hand will have influence in how long the “wheel” turns.

Here is the content of the script:

I know that not everyone owns a LEAP motion, this script could be easily edited to be used only using the keyboard and a random “wheel run time”

If you edit the script for this, please post it in the comments.

Otherwise if there is enough requests, I will do it myself! 😉

Go Lottery Go!!

By |2015-06-22T14:59:47+00:00June 22nd, 2015|Powershell, Scripting & Development|0 Comments

About the Author:

Jakob Gottlieb Svendsen

Twitter: @JakobGSvendsen

Jakob Gottlieb Svendsen is a Microsoft Cloud and Data Center Management MVP (http://mvp.microsoft.com/en-us/default.aspx), Working as Global Lead Developer, Senior Consultant and Trainer at CTGlobal, where he is one of the driving forces in keeping CTGlobal a System Center Gold Partner and member of the System Center Alliance.

Since he started at Coretech in 2007, he has focused on Scripting and Development, primarily developing tools, extensions and scripts for the System Center Suite. His main area is Automation (including OMS/Azure Automation, Service Management Automation, PowerShell and Orchestrator). Another area is Windows Azure Pack / Azure Stack, where he does implementation, development, workshops and presentations. He is a world-wide renowned voice in the Automation field.

He is passionately devoted to the community, to which he contributes by being a moderator at TechNet and sharing his knowledge at https://blog.ctglobalservices.com/jgs

  • Co-founder: PowerShell User Group Denmark
  • Speaker at MMS 2016, Minneapolis (www.mmsmoa.com)
  • SCU Europe 2014, 2015, 2016 (www.systemcenteruniverse.ch)
  • Microsoft TechEd North America 2014, Houston
  • NIC 2012,2013,2014,2015, Oslo (www.nic.com)
  • Microsoft CampusDays 2011, 2013, Copenhagen
  • Microsoft TechDays 2015, Sweden (www.techdays.se)
  • Microsoft Partner Event: New in SC2012 SP1
  • User group meetings (PSUG.DK , SCUG.DK/BE/NO, AZMUG + more)
  • Microsoft Certified Trainer.
  • Microsoft Scripting Guys Forum Moderator

Main working areas:

  • Automation (Azure Automation, SMA, SCO)
  • Windows Azure Pack / Azure Stack
  • System CenterVisual Studio Team Services / Team Foundation Server
  • Development:C#.Net, VB.NET, VBScript, PowerShell, Service Manager, OpsMgr, ConfigMgr
  • Orchestrator
  • Windows Azure Pack / Azure Stack


  • Azure Automation
  • Service Management Automation
  • System Center Orchestrator
  • PowerShell, VBScript, C#.Net, VB.Net
  • Windows Azure Pack / Azure Stack Development Workshops

Leave A Comment