Functions/Start-PlayingSilence.ps1
function Start-PlayingSilence { # 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() } |