Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

how to shut down computer using WMI??

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 09-04-2007   #1 (permalink)
Ryan
Guest


 

how to shut down computer using WMI??

(get-wmiobject win32_operatingsystem -computername .).win32shutdown(8)

it return me a message "Privilege not held"

could you guy tell me how do i get that privilege

My System SpecsSystem Spec
Old 09-04-2007   #2 (permalink)
Brandon Shell
Guest


 

Re: how to shut down computer using WMI??

You have to have the shutdown right on the machine. Can you shutdown the
machine locally?
Do you use a different account for WMI?

"Ryan" <Ryan@xxxxxx> wrote in message
news:BA85956A-7010-4A48-A5A3-C08254078856@xxxxxx
Quote:

> (get-wmiobject win32_operatingsystem -computername .).win32shutdown(8)
>
> it return me a message "Privilege not held"
>
> could you guy tell me how do i get that privilege
My System SpecsSystem Spec
Old 09-04-2007   #3 (permalink)
Jon
Guest


 

Re: how to shut down computer using WMI??

"Ryan" <Ryan@xxxxxx> wrote in message
news:BA85956A-7010-4A48-A5A3-C08254078856@xxxxxx
Quote:

> (get-wmiobject win32_operatingsystem -computername .).win32shutdown(8)
>
> it return me a message "Privilege not held"
>
> could you guy tell me how do i get that privilege

Try this......

$win32OS = get-wmiobject win32_operatingsystem -computername .
$win32OS.psbase.Scope.Options.EnablePrivileges = $true
$win32OS.win32shutdown(8)

--
Jon


My System SpecsSystem Spec
Old 09-05-2007   #4 (permalink)
°g»y¤H
Guest


 

Re: how to shut down computer using WMI??

yes, i only got one account on my machine
"Brandon Shell" <tshell.mask@xxxxxx> wrote in message
news:ut76Tlx7HHA.5160@xxxxxx
Quote:

> You have to have the shutdown right on the machine. Can you shutdown the
> machine locally?
> Do you use a different account for WMI?
>
> "Ryan" <Ryan@xxxxxx> wrote in message
> news:BA85956A-7010-4A48-A5A3-C08254078856@xxxxxx
Quote:

>> (get-wmiobject win32_operatingsystem -computername .).win32shutdown(8)
>>
>> it return me a message "Privilege not held"
>>
>> could you guy tell me how do i get that privilege
>

My System SpecsSystem Spec
Old 09-05-2007   #5 (permalink)
°g»y¤H
Guest


 

Re: how to shut down computer using WMI??

thank you
"Jon" <Email_Address@xxxxxx> wrote in message
news:eeA1Zwx7HHA.5980@xxxxxx
Quote:

> "Ryan" <Ryan@xxxxxx> wrote in message
> news:BA85956A-7010-4A48-A5A3-C08254078856@xxxxxx
Quote:

>> (get-wmiobject win32_operatingsystem -computername .).win32shutdown(8)
>>
>> it return me a message "Privilege not held"
>>
>> could you guy tell me how do i get that privilege
>
>
> Try this......
>
> $win32OS = get-wmiobject win32_operatingsystem -computername .
> $win32OS.psbase.Scope.Options.EnablePrivileges = $true
> $win32OS.win32shutdown(8)
>
> --
> Jon
>
>

My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Computer Won't shut down ryancr500 Vista performance & maintenance 0 06-01-2008 01:48 PM
Computer Shut Down guy Vista installation & setup 0 01-25-2008 02:37 PM
shut down computer Lilium Vista General 4 01-02-2008 09:05 AM
Computer will not shut down Carl2435 Vista General 2 11-19-2007 01:23 PM
Computer shut down Ken Sympson Vista performance & maintenance 2 11-12-2007 06:33 PM


Update your Vista Drivers Update Your Drivers Now!!

Vistax64.com 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 2005-2008