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

Help deciphering a WMI return value

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 08-02-2007   #1 (permalink)
lawndart
Guest


 

Help deciphering a WMI return value

I have a script to do mass shutdowns of machines for when we have
planned outages, etc.
I use a wmi call to do an immediate shutdown as one of the options and
check the return value. Usually it's the easy to understand 1 or 0,
but for a few machines it comes back as 1271, which I can't figure
out. Here's the wmi call:

(gwmi win32_operatingSystem -ComputerName
$svr).Win32Shutdown(1).ReturnValue

It's not a permissions issue (as far as I can tell), and it seems to
be independent of server OS type, in that I have seen it on XP and
2003 x64.

I looked around in the ms docs on wmi return and error codes and found
nothing useful. Any ideas?

Lawndart


My System SpecsSystem Spec
Old 08-02-2007   #2 (permalink)
lawndart
Guest


 

Re: Help deciphering a WMI return value

On Aug 2, 2:01 pm, lawndart <lawnd...@gmail.com> wrote:
> I have a script to do mass shutdowns of machines for when we have
> planned outages, etc.
> I use a wmi call to do an immediate shutdown as one of the options and
> check the return value. Usually it's the easy to understand 1 or 0,
> but for a few machines it comes back as 1271, which I can't figure
> out. Here's the wmi call:
>
> (gwmi win32_operatingSystem -ComputerName
> $svr).Win32Shutdown(1).ReturnValue
>
> It's not a permissions issue (as far as I can tell), and it seems to
> be independent of server OS type, in that I have seen it on XP and
> 2003 x64.
>
> I looked around in the ms docs on wmi return and error codes and found
> nothing useful. Any ideas?
>
> Lawndart


Never mind, found it in the general Windows system errors:
ERROR_MACHINE_LOCKED 1271

My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Return by ref? Duncan Smith PowerShell 7 02-05-2008 10:51 AM
Return to XP? George W. Barrowcliff Vista General 17 10-02-2007 07:05 PM
Return to XP DP Vista General 3 04-05-2007 09:33 AM
Return of Vista James tindell Vista General 4 02-19-2007 06:59 PM
What echo has do with Return value? I really want to know PowerShell 1 12-21-2006 12:38 PM


Update your Vista Drivers Update Your Vista 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
Page generated in 0.47845 seconds with 10 queries