![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Turn Off Computer What command would I issue from VBScript to turn off my computer? -- Gary''s Student - gsnu2007xx |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Turn Off Computer "Gary''s Student" <GarysStudent@xxxxxx> wrote in message news:4CD7F646-2B92-4834-857A-C71937CDF7E9@xxxxxx Quote: > What command would I issue from VBScript to turn off my computer? > -- > Gary''s Student - gsnu2007xx for all Possible parameters.. (BTW: You must have Shutdown Privileges to run this script..) '----Code Start---- Set oWmi=GetObject("winmgmts:{(shutdown)}") For Each oPC In oWmi.ExecQuery("Select * from Win32_OperatingSystem") oPC.Win32Shutdown 6 Next '----Code End---- |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Turn Off Computer "Gary''s Student" <GarysStudent@xxxxxx> wrote in message news:4CD7F646-2B92-4834-857A-C71937CDF7E9@xxxxxx Quote: > What command would I issue from VBScript to turn off my computer? > -- > Gary''s Student - gsnu2007xx http://www.microsoft.com/technet/scr.../dmstvb08.mspx If the computer supports it, you can power off. See this link: http://www.microsoft.com/technet/scr..._cpm_jleo.mspx Navigate in the TOC to the left in the page to code examples: -- Richard Mueller MVP Directory Services Hilltop Lab - http://www.rlmueller.net -- |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Turn Off Computer Thank you -- Gary''s Student - gsnu200829 "Richard Mueller [MVP]" wrote: Quote: > > "Gary''s Student" <GarysStudent@xxxxxx> wrote in message > news:4CD7F646-2B92-4834-857A-C71937CDF7E9@xxxxxx Quote: > > What command would I issue from VBScript to turn off my computer? > > -- > > Gary''s Student - gsnu2007xx > This example from the Script Center shows how to shutdown: > > http://www.microsoft.com/technet/scr.../dmstvb08.mspx > > If the computer supports it, you can power off. See this link: > > http://www.microsoft.com/technet/scr..._cpm_jleo.mspx > > Navigate in the TOC to the left in the page to code examples: > > -- > Richard Mueller > MVP Directory Services > Hilltop Lab - http://www.rlmueller.net > -- > > > |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Turn Off Computer apparently richard and mycow have more recent versions of wmi than I have, jw |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| How can I turn on my computer? | Vista hardware & devices | |||
| Cannot turn my computer on | Vista General | |||
| Turn your Computer into a Super TV | PowerShell | |||
| cant turn off computer | Vista hardware & devices | |||
| Help! Computer will not turn on... | Vista General | |||