ThePowerShellGuy.com

Did you do your PowerShelling today ?
Welcome to ThePowerShellGuy.com Sign in | Join | Help
in Search

Browse by Tags

All Tags » PowerShell » Scripting games
Showing page 1 of 6 (54 total posts)
  • Scripting Games 2008 Beginners Windows PowerShell Event 10

    And to end the series with solutions, Beginners event 10, this was a nice one, I started out with a straight loop but to handle 2 or 3 strikes in a row I considered that it might be easier to look back and forwards in the array. a Pro was that this would make scores per frame / round possible, a Con was that I needed to check for Strikes or ...
    Posted to The PowerShell Guy (Weblog) by MoW on March 3, 2008
  • Scripting Games 2008 Beginners Windows PowerShell Event 9

    My solution for Event 9 in the beginners competition, as Jaykul already noted here : 2008 Scripting Games - Solution for Advanced Event 2 , when working with ADO in PowerShell it's much better to use .NET to connect to a database as the COM objects shown in the Windows PowerShell, solution from the Scripting guy's. I used the same code as in last ...
    Posted to The PowerShell Guy (Weblog) by MoW on March 3, 2008
  • Scripting Games 2008 Advanced Windows PowerShell Event 9

    My solution for event 9 :  (gc c:\scripts\alice.txt |% {$_.split()}|% {$_[-1..(-$_.length)]-join ''})-join ' ' Enjoy, Greetings /\/\o\/\/
    Posted to The PowerShell Guy (Weblog) by MoW on March 3, 2008
  • Scripting Games 2008 Advanced Windows PowerShell Event 10

    My Windows PowerShell solution for event 10 is posted on the scriptcenter. By accident ( I did send a ''preview'' version to confuse the scripting guys check if format was right),  it was not the latest version that got posted, I made some small changes after : *update* the article on the scriptcenter is now also updated ...
    Posted to The PowerShell Guy (Weblog) by MoW on March 3, 2008
  • Scripting Games 2008 Sudden Death Challenge Event 9

    As the Scripting Guys note here Event 9 Solution , this was a simple event, biggest part of the code is the filename. (gc c:\scripts\Symbols.txt) -replace '[^\w\s]|_','' Only issue I had is as I use \w (word characters) and this also included the underscores I had to remove them also with an OR in the ...
    Posted to The PowerShell Guy (Weblog) by MoW on March 1, 2008
  • PowerShell out-random function

    Bruno left a comment on the post about my solution for Scripting Games 2008 Advanced Windows PowerShell Event 7 about my sort routine, using a scriptblock could make it even simpler, and so elegant I decided to make an extra post about it, a generic randomize function in PowerShell can be as easy as :   function out-random ...
    Posted to The PowerShell Guy (Weblog) by MoW on February 28, 2008
  • Scripting Games 2008 Sudden Death Challenge Event 8

    Event 8 was a Quiz again, asking for AD property names, to check this I simply made the user in AD Users and Computers and checked the properties that where set after  from PowerShell. But I had a problem with the Country / Region as USA as given in the example can not be set using the interface. Changing this Listbox changes 2 properties ...
    Posted to The PowerShell Guy (Weblog) by MoW on February 28, 2008
  • Scripting Games 2008 Advanced Windows PowerShell Event 8

    And for event 8, I cheated a bit here , I started out with sorting the files descending, thinking to fix big song first and then look for small ones to fit in, this already gave me more as 75 minutes, but then when testing I sorted them normally ( Small to Big ):PoSH> .\Event8.ps1 ...
    Posted to The PowerShell Guy (Weblog) by MoW on February 28, 2008
  • Scripting Games 2008 Sudden Death Challenge Event 6

    Altought the -replace operator does not support scriptblocks yet ( We keep on begging ;-) ) , the Switch -regex was a nice alternative in this case :   ([string[]][char[]](gc c:\scripts\Lettercase.txt)  |% {  Switch -regex -casesensitive ($_) {    '[A-Z]' {$_.tolower()}    '[a-z]' ...
    Posted to The PowerShell Guy (Weblog) by MoW on February 28, 2008
  • Scripting Games 2008 Sudden Death Challenge Event 7

    For Sudden death Event 7, I just post part of my history (get-history ) 18 100 * 219 100 * 2 /3020 [int](100 * 2 /30)21 pow([int](100 * 2 /30),5)22 [math]::pow([int](100 * 2 /30),5)23 [math]::pow([int](100 * 2 /30),5) * 424 [math]::Sqrt([math]::pow([int](100 * 2 /30),5) * 4)25 [math]::Sqrt([math]::pow([int](100 * 2 /30),5) * 4) / 4526 ''{0:2}'' ...
    Posted to The PowerShell Guy (Weblog) by MoW on February 28, 2008
1 2 3 4 5 Next > ... Last ยป
Powered by Community Server (Personal Edition), by Telligent Systems