Internet-radio built in powershell

SRLast weekend I had an hour or two over after my kids gone to sleep, to do some scripting at home. I got an idea of building an internet radio in powershell with the four nationwide Swedish public service channels.  I used the .NET framework class System.Windows.Media.MediaPlayer to play the streams and then some variables to feed it. First of you could only choose channel when you ran the function and the only option was quit, but I built in a meny so you will be able to change channel without quiting the function. When I proudly showed the internet radio player to my girlfriend she told me it looked like crap and asked why I just don´t go to the site…

function SR-Play{

 $P1 = ""
 $P2 = ""
 $P3 = ""
 $P4 = ""
$MediaPlayer = New-Object System.Windows.Media.MediaPlayer 

switch ($Radiostation)
    "P1" {$MediaPlayer.Open([uri]$p1)}
    "P2" {$MediaPlayer.Open([uri]$p2)}
    "P3" {$MediaPlayer.Open([uri]$p3)}
    "P4" {$MediaPlayer.Open([uri]$p4)}
Start-Sleep -Seconds 1

    do {
    [int]$meny = 0

    while ( $meny -lt 1 -or $meny -gt 9) {
    write-host "Kanalmeny, välj kanal eller avsluta."
    Write-Host "1. P1"
    Write-Host "2. P2"
    Write-Host "3. P3"
    Write-Host "4. P4"
    Write-Host "9. Avsluta"

    [int]$meny = Read-Host "Välj en kanal"

    switch ($meny) {
      1{Write-Host "P1"
      2{Write-Host "p2"
      3{Write-Host "p3"
      4{Write-host "p4"
      9{Write-Host "Hejdå"}
      default {Write-Host "Fel val"}
until ("9" -ccontains $meny
 if ($meny -eq "9")

Monitor solresor and notify when hotel is available

Last friday me and my girlfriend finally decided a hotel and date for the summer holiday. She had found a hotel to reasonable price at the travel-agent solresor. I told her I just had to eat and would book the trip right after lunch. When I came back the hotel was sold-out at the date we had planned for. I called the travel-agent and asked if they had any notification-service, if someone would cancel their trip, unfortunate they had no such service and they told me to check their website manually to see if the hotel would reappear. Since I am lazy and didn´t want to manually check their website a built a script to do it for me.
I found out that on step 4 in their booking the website created an unique URL with hotel short-name and departure date, if I used that URL I would get an answer with body if the hotel and date were available and I would get an empty answer if the date was sold-out.
So I made a script that checked the URL once every minute and would send me an email if the URL existed. Unfortunately the hotel never showed up, but it was fun to create the monitor.

#NAME: Checksolresor.ps1
#AUTHOR: Viktor Lindström
#COMMENTS: Check if hotel is available an a certain date

$cred = Get-Credential -Credential [user with acl to use SMTP]

while ($true)
$question = $null 
$question = Invoke-WebRequest -uri ",4&departuredate=20140609&campaigncode=&campaignnumber=&lastminute=0"
($question -eq $null)
write-host "finns inte"
{Send-MailMessage -to viktor.lindstr*m@xxxxxxxxx -Subject Resa -Body "Resa finns nu"-SmtpServer xxxxxxxxxxxxxx -From viktor.lindstr*m@xxxxxxxxxxx -Credential $cred -UseSsl
   Start-Sleep -Seconds 60