PoshCode Archive  Artifact [c213468559]

Artifact c213468559f4963a2430f704b8b8652e188d49557366bcb49df2e833801ca2a5:

  • File Invoke-RickRoll.ps1 — part of check-in [8a3036260b] at 2018-06-10 13:32:23 on branch trunk — Script to open IE to a video of Rick Astley (or any specified URL) (user: obscuresec size: 1027)

# encoding: ascii
# api: powershell
# title: Invoke-RickRoll
# description: Script to open IE to a video of Rick Astley (or any specified URL)
# version: 0.1
# type: function
# author: obscuresec
# license: CC0
# function: Invoke-RickRoll
# x-poshcode-id: 3863
# x-archived: 2013-01-09T07:24:08
# x-published: 2013-01-05T10:17:00
#
#
function Invoke-RickRoll {
<#
.SYNOPSIS

    Invoke-RickRoll

    A RickRoll PowerShell Script :)

    Authors: Chris Campbell (@obscuresec)
    License: BSD 3-Clause

.DESCRIPTION

    A script to call IE and send it to a URL.

.PARAMETER VideoURL

    Specifies a URL to send IE to.

.EXAMPLE

    PS C:\>Invoke-RickRoll -VideoURL http://www.obscuresec.com
#>

    [CmdletBinding()] Param(
    [string] $VideoURL = 'http://www.youtube.com/watch?v=dQw4w9WgXcQ'
    )
    
    [string] $CmdString = "$env:SystemDrive\PROGRA~1\INTERN~1\iexplore.exe $VideoURL"
    Write-Verbose "I am now opening IE to $VideoUrl"
    Invoke-Expression $CmdString
}