r/PowerShell • • Sep 18 '19

Parenting Through PowerShell

My 8 year old decided to pretend to be sick so he would get sent home from school the other day. So after we finished all the work the teach gave us, I decided to make him some extra work. Since they are learning double digit addition I wrote a quick script that will generate a page with 25 problems on it. I kept printing him off new sheets until the end of the regular school day.

I thought I'd share it in case anyone else has a 2nd grader who likes to play hooky. https://www.dowst.dev/homework-double-digit-addition-without-carrying/

Does anyone else have any examples of parenting through PowerShell?

229 Upvotes

67 comments sorted by

View all comments

18

u/kreeef Sep 18 '19

My favorite is when they keep asking the same question, this little script comes in handy

while ($true){
Read-Host "Ask dad a question"
Write-Host "No"
}

17

u/Pooter_Guy Sep 18 '19 edited Sep 18 '19
$mercy = 0
Do{

Read-Host "Ask dad a question"
Write-Host "No" -foregroundcolor 'Red'
$mercy++

} Until ($mercy -eq 2)

If ($mercy -eq 2)
    {remove-localuser -name 'Johnny'}

3

u/kreeef Sep 18 '19

haha :D