Is there anyway we can make speaker of the laptop controlled by power automate at any specific time/action ?

Is there anyway we can make speaker of the laptop controlled by power automate at any specific time/action ?
Hi @Saurav333 ,
I found this and tested it and it did change my volume. Please mark as a solution if this is helpful!
Function Set-SoundVolume
{
Param(
[Parameter(Mandatory=$true)]
[ValidateRange(0,100)]
[Int]
$volume
)
# Calculate number of key presses.
$keyPresses = [Math]::Ceiling( $volume / 2 )
# Create the Windows Shell object.
$obj = New-Object -ComObject WScript.Shell
# Set volume to zero.
1..50 | ForEach-Object { $obj.SendKeys( [char] 174 ) }
# Set volume to specified level.
for( $i = 0; $i -lt $keyPresses; $i++ )
{
$obj.SendKeys( [char] 175 )
}
}
New-Alias -Name "ssv" Set-SoundVolume
# Example usage
Set-SoundVolume 50
Use PowerShell to Change the Volume – My PowerShell Notes (wordpress.com)