Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Has anyone used the Beep or Alert console character `a

Reply
 
Old 03-27-2009   #1 (permalink)
Bob Landau


 
 

Has anyone used the Beep or Alert console character `a

I recently started exploring how to use jobs so that they can automate tasks.

One of the things I want to be able to do is to have have the job signal me
when its completed. While there no specific documenation on how to do this
for those interested this is how in an elevated shell

$job = Invoke-Command -ComputerName $computer -AsJob -Credential $cred
{sleep 5} ## simulate a long running job
Register-ObjectEvent $job -EventName "StateChanged" -SourceIdentifier
JobState -Action {write-host `a} ## Bell should sound when event is fired

The key is to subscribe to the event "StateChanged" which is part of the Job
Class

Trouble is I here no beep. Looking further I can't even get this to beep


PS> echo `a


I do hear Windows "Default Beep", Internet Radio, etc


Does or has this work for anyone? Is this a known bug or am I doing
something wrong?


bob

My System SpecsSystem Spec
Old 03-27-2009   #2 (permalink)
Vadims Podans


 
 

Re: Has anyone used the Beep or Alert console character `a

[char]7 - default beep.
--
WBR, Vadims Podans
PowerShell blog - www.sysadmins.lv

"Bob Landau" <BobLandau@xxxxxx> rakstīja ziņojumā
"news:BB5AB6A7-EED7-463B-8AE5-A6A729BA537B@xxxxxx"...
Quote:

> I recently started exploring how to use jobs so that they can automate
> tasks.
>
> One of the things I want to be able to do is to have have the job signal
> me
> when its completed. While there no specific documenation on how to do this
> for those interested this is how in an elevated shell
>
> $job = Invoke-Command -ComputerName $computer -AsJob -Credential $cred
> {sleep 5} ## simulate a long running job
> Register-ObjectEvent $job -EventName "StateChanged" -SourceIdentifier
> JobState -Action {write-host `a} ## Bell should sound when event is fired
>
> The key is to subscribe to the event "StateChanged" which is part of the
> Job
> Class
>
> Trouble is I here no beep. Looking further I can't even get this to beep
>
>
> PS> echo `a
>
>
> I do hear Windows "Default Beep", Internet Radio, etc
>
>
> Does or has this work for anyone? Is this a known bug or am I doing
> something wrong?
>
>
> bob
My System SpecsSystem Spec
Old 03-27-2009   #3 (permalink)
Vadims Podans


 
 

Re: Has anyone used the Beep or Alert console character `a

sorry, a misunderstand you. I don't sure that it is possible.
--
WBR, Vadims Podans
PowerShell blog - www.sysadmins.lv

"Vadims Podans" <vpodans> rakstīja ziņojumā
"news:eKL0nevrJHA.4592@xxxxxx"...
Quote:

> [char]7 - default beep.
> --
> WBR, Vadims Podans
> PowerShell blog - www.sysadmins.lv
>
> "Bob Landau" <BobLandau@xxxxxx> rakstīja ziņojumā
> "news:BB5AB6A7-EED7-463B-8AE5-A6A729BA537B@xxxxxx"...
Quote:

>> I recently started exploring how to use jobs so that they can automate
>> tasks.
>>
>> One of the things I want to be able to do is to have have the job signal
>> me
>> when its completed. While there no specific documenation on how to do
>> this
>> for those interested this is how in an elevated shell
>>
>> $job = Invoke-Command -ComputerName $computer -AsJob -Credential $cred
>> {sleep 5} ## simulate a long running job
>> Register-ObjectEvent $job -EventName "StateChanged" -SourceIdentifier
>> JobState -Action {write-host `a} ## Bell should sound when event is
>> fired
>>
>> The key is to subscribe to the event "StateChanged" which is part of the
>> Job
>> Class
>>
>> Trouble is I here no beep. Looking further I can't even get this to beep
>>
>>
>> PS> echo `a
>>
>>
>> I do hear Windows "Default Beep", Internet Radio, etc
>>
>>
>> Does or has this work for anyone? Is this a known bug or am I doing
>> something wrong?
>>
>>
>> bob
>
My System SpecsSystem Spec
Old 03-27-2009   #4 (permalink)
Matt Williamson


 
 

Re: Has anyone used the Beep or Alert console character `a

Bob Landau wrote:
Quote:

> I recently started exploring how to use jobs so that they can automate tasks.
>
> One of the things I want to be able to do is to have have the job signal me
> when its completed. While there no specific documenation on how to do this
> for those interested this is how in an elevated shell
>
> $job = Invoke-Command -ComputerName $computer -AsJob -Credential $cred
> {sleep 5} ## simulate a long running job
> Register-ObjectEvent $job -EventName "StateChanged" -SourceIdentifier
> JobState -Action {write-host `a} ## Bell should sound when event is fired
>
> The key is to subscribe to the event "StateChanged" which is part of the Job
> Class
>
> Trouble is I here no beep. Looking further I can't even get this to beep
>
>
> PS> echo `a
>
>
> I do hear Windows "Default Beep", Internet Radio, etc
>
>
> Does or has this work for anyone? Is this a known bug or am I doing
> something wrong?
>
>
> bob
echo `a from the PS prompt causes my internal speaker to beep. So I can
confirm that it does work. The only thing that I can think of is that
you don't have an internal PC speaker. The "Default Beep" and internet
radio use your PC speakers. Take a look at your motherboard and see if
there is anything connected to the PC speaker header. I've come across
motherboards that have a built in (as in soldered to the PCB) speaker
and you can disable/enable it in BIOS.

HTH

Matt
My System SpecsSystem Spec
Old 03-27-2009   #5 (permalink)
Bob Landau


 
 

Re: Has anyone used the Beep or Alert console character `a

I suspect you're correct I did "update" my machine with an new motherboard.
Perhaps I just didn't connect it up or like you said the speaker's disabled.

Thanks for confirming it works. I thought this was just to basic not to work.

"Matt Williamson" wrote:
Quote:

> Bob Landau wrote:
Quote:

> > I recently started exploring how to use jobs so that they can automate tasks.
> >
> > One of the things I want to be able to do is to have have the job signal me
> > when its completed. While there no specific documenation on how to do this
> > for those interested this is how in an elevated shell
> >
> > $job = Invoke-Command -ComputerName $computer -AsJob -Credential $cred
> > {sleep 5} ## simulate a long running job
> > Register-ObjectEvent $job -EventName "StateChanged" -SourceIdentifier
> > JobState -Action {write-host `a} ## Bell should sound when event is fired
> >
> > The key is to subscribe to the event "StateChanged" which is part of the Job
> > Class
> >
> > Trouble is I here no beep. Looking further I can't even get this to beep
> >
> >
> > PS> echo `a
> >
> >
> > I do hear Windows "Default Beep", Internet Radio, etc
> >
> >
> > Does or has this work for anyone? Is this a known bug or am I doing
> > something wrong?
> >
> >
> > bob
>
> echo `a from the PS prompt causes my internal speaker to beep. So I can
> confirm that it does work. The only thing that I can think of is that
> you don't have an internal PC speaker. The "Default Beep" and internet
> radio use your PC speakers. Take a look at your motherboard and see if
> there is anything connected to the PC speaker header. I've come across
> motherboards that have a built in (as in soldered to the PCB) speaker
> and you can disable/enable it in BIOS.
>
> HTH
>
> Matt
>
My System SpecsSystem Spec
Old 03-27-2009   #6 (permalink)
Kiron


 
 

Re: Has anyone used the Beep or Alert console character `a

If you're OS is Vista, check your Audio device levels, there is one dedicated to the Beep, could be too low or muted...

# Properties > Levels > Beep
C:\Windows\System32\mmsys.cpl

--
Kiron
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Toggle keys beep alert Tutorials
beep-beep Vista performance & maintenance
Clicking in AOL Mail results in loud alert "beep"... help? Vista General
Beep? Vista General
Clicking in AOL Mail results in loud alert "beep"... help? Vista performance & maintenance


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46