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

Simple Active Directory & DNS Synchronization Script

@echo offGOTO push_or_pull:push_or_pullset /p action="Type in Push, Pull, or Quit. Press Enter for default action…

Use PowerShell to Set Microsoft SQL Database Owner

$owner='CAP\SQL Admins' $databaseName='TestDb' $sqlServer=$env:computername function setDbOwner{ param( $principle=$env:USERDOMAIN+'\Domain Admins', $databaseName='TestDB', $sqlServer ) function includeSqlTools{ $ErrorActionPreference='stop'…

Basic CSS: Set the id of an Element

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css"><style> .red-text { color: red; } h2 { font-family: Lobster, monospace; }…