Functions/Play-Silence.ps1

function Play-Silence {
    
    # version 1
    
    #Add-Type -AssemblyName presentationCore
    #$MediaPlayer = New-Object system.windows.media.MediaPlayer
    #$MediaPlayer.open("C:\Users\Jaap\OneDrive - JaapTerlouw\Documents\Silent.wav")
    $MediaPlayer = New-Object System.Media.SoundPlayer
    $MediaPlayer.SoundLocation = "C:\Users\Jaap\OneDrive - JaapTerlouw\Documents\Silent.wav"
    $MediaPlayer.PlayLooping()

}