Jump to content

Recommended Posts

Posted (edited)

Yeah, that's where I found it. I had to fix it for using a proxy though. I'm also tinkering with a variation called 'Get-Pooh-Bother'. It doesn't work reliably yet due to the nature of the source web page.

 

function Get-Pooh-Bother {
   (Invoke-WebRequest http://www.goofy.narod.ru/pooh/trash/18.html -OutVariable excuses).content.split([Environment]::NewLine)[(get-random $excuses.content.split([Environment]::NewLine).count)]
}

 

Here's the output (I've trimmed the blank lines).

 

PS H:\> Get-Pooh-Bother
"Bother!" said Pooh, as he felt Vader's presence.

PS H:\> Get-Pooh-Bother
Bother, said Pooh, as he reached for the reset button.

PS H:\> Get-Pooh-Bother
Bother, said Pooh, as his starship disintegrated.

PS H:\> Get-Pooh-Bother
"Bother", Said Pooh, I need a sauce for piglet.

PS H:\> Get-Pooh-Bother
Bother, said Pooh, and called in an air strike.

Edited by Geoff

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...