Table of Contents
Play a sound file from the console window
Pass the path of the sound file into this function to have it play using the following syntax:
PlaySound "C:\Users\User\AppData\Local\Temp\sound.wav"
function PlaySound {
[CmdletBinding()]
param (
[Parameter (Mandatory = $True, Position=0, ValueFromPipeline = $True)]
[string]$File
)
$PlaySound=New-Object System.Media.SoundPlayer;$PlaySound.SoundLocation=$File;$PlaySound.playsync()
}
Listed below are payloads that have used one of these functions: