Posted On April 2, 2019

PowerShell: How to Play a Sound

kimconnect 0 comments
blog.KimConnect.com >> Codes >> PowerShell: How to Play a Sound
$soundFile="C:\Windows\media\tada.wav"
$sound = new-Object System.Media.SoundPlayer
$sound.SoundLocation=$soundFile
$sound.Play()

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

PowerShell: Moving Guest VMs in Hyper-V in Conjunction with Microsoft Failover Cluster

This code is outdated. Refactor before reuse.. ############################################################################################################### # HyperV-MoveVM.ps1 # Assumption: Hyper-V has been…

Where to Put JavaScript Codes?

Most often, JavaScript is placed between the <head> and </head> section. However, that may not…

Basic CSS: Import a Google Font

<style>.red-text {color: red;}p {font-size: 16px;font-family: monospace;}</style><h2 class="red-text">CatPhotoApp</h2><main><p class="red-text">Click here to view more <a href="#">cat photos</a>.</p><a…