Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > Re: DC - AC power plane switching.

Reply
Thread Tools Display Modes

Re: DC - AC power plane switching.

 
 
Pegasus [MVP]
Guest
Posts: n/a

 
      01-25-2010


"Andrzej W." <awa_wp.a_to_wytnij.@wp.pl> said this in news item
news:hjjlht$2ge$...
> Hi,
>
> How to activate DC power plan on desktop computer without a battery and
> how to switch between AC and DC power plane?
>
> --
> Best regards,
> Andrzej


Is this an electrical or a scripting question? If it is a scripting question
then please elaborate.

 
Reply With Quote
 
 
 
 
Pegasus [MVP]
Guest
Posts: n/a

 
      01-25-2010


"Andrzej W." <awa_wp.a_to_wytnij.@wp.pl> said this in news item
news:hjkpi4$c9k$...
> W dniu 2010-01-25 11:55, Pegasus [MVP] pisze:
>>
>>
>> "Andrzej W." <awa_wp.a_to_wytnij.@wp.pl> said this in news item
>> news:hjjlht$2ge$...
>>> Hi,
>>>
>>> How to activate DC power plan on desktop computer without a battery
>>> and how to switch between AC and DC power plane?

>>
>> Is this an electrical or a scripting question? If it is a scripting
>> question then please elaborate.

>
> Sorry for my English...
>
> I would like to convince a Windows (server 2008) that it work on DC power
> not AC.
> Switching from AC to DC stops automatically selected programs started from
> task scheduler and hold down some programs which support power management.
> If I can't switch power plane from AC to DC I have to stop each of this
> program separately.
>
>
> --
> Best regards,
> Andrzej


I do not know if Server 2008 has a facility to switch between mains and
battery power under software control. If it has then it would be included in
WMI. The following WMI script does the opposite: It tells you if a machine
runs on mains or battery power.

Set oWMIService = GetObject("winmgmts:\\.\root\CIMV2")
Set cItems = oWMIService.ExecQuery( _
"SELECT * FROM Win32_Battery",,48)
For Each oItem in cItems
if oItem.BatteryStatus = 1 then
wscript.echo "Server runs on battery power"
else
wscript.echo "Server runs on mains power"
end if
Next

 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Windows 7 Professional Automated Power Options Issue - Won't enter Sleep Mode Richard Windows 64 Bit 0 12-13-2009 04:22 PM
Re: Windows 7 Professional Automated Power Options Issue - Won't enter Sleep Mode Dennis Pack Windows 64 Bit 0 12-11-2009 04:46 AM
Re: Windows 7 Professional Automated Power Options Issue - Won't enter Sleep Mode Lanwench [MVP - Exchange] Windows 64 Bit 0 12-11-2009 04:07 AM
Re: no sleep recovery after power down John Hanley Windows Vista Performance 3 06-28-2007 08:18 AM
Stop Error 0x0000007b Louis LeBrun Windows Vista Installation 17 07-05-2006 09:00 AM



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 47 48 49 50 51 52 53 54 55 56 57 58 59