Windows Vista Forums

Help deciphering a WMI return value

  1. #1


    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

  2. #2


    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

Help deciphering a WMI return value

Similar Threads
Thread Thread Starter Forum Replies Last Post
deciphering bluescreen message - BCCode: d1 freekie Vista General 5 21 Mar 2009
Carraige return Lance Richmond .NET General 0 01 Apr 2008
Return by ref? Duncan Smith PowerShell 7 05 Feb 2008
Return to XP? George W. Barrowcliff Vista General 17 02 Oct 2007
Return to XP DP Vista General 3 05 Apr 2007