none
GPRESULT Access Denied from Elevated CMD Prompt

    Question

  • Hi,

    trying to run GPRESULT on a server 2012 box.  Am logged on as a Domain Admin, right click CMD and Run as Administrator, so its definitely an elevated command prompt but its stick at gathering OS information and then stops with Access Denied, nothing in the event logs?

    Anyone know what going on?


    Wednesday, February 18, 2015 4:26 PM

All replies

  • what OS?
    Wednesday, February 18, 2015 7:59 PM
  • server 2012.



    Wednesday, February 18, 2015 8:03 PM

  • from admin cmd shell

    winmgmt /salvagerepository

    winmgmt /verifyrepository

    Wednesday, February 18, 2015 8:21 PM
  • Cheers for the info... but before I just go ahead and run some random command from the internet on my production server any chance you could explain what the issue is and why the above fixes it etc?

    Cheers

    Patrick

    Wednesday, February 18, 2015 8:25 PM
  • potentially you have an issue with the wmi repository

    all the cmds do is an integrity check

    verifyrepository<path>

    Performs a consistency check on the WMI repository. When you add the /verifyrepository switch without the <path>argument, then the live repository currently used by WMI is verified. When you specify the  path argument, you can verify any saved copy of the repository. In this case, the path argument should contain the full path to the saved repository copy. The saved repository should be a copy of the entire repository folder. For more information about errors returned by this command, see the Remarks section.

    Windows Server 2003:  This switch is not available. 

    /salvagerepository

    Performs a consistency check on the WMI repository, and if an inconsistency is detected, rebuilds the repository. The content of the inconsistent repository is merged into the rebuilt repository, if it can be read. The salvage operation always works with the repository that the WMI service is currently using. For more information about errors returned by this command, see the Remarks section.

    % MOF files that contain the #pragma autorecover preprocessor statement are restored to the repository.

    Windows Server 2003:  This switch is not available.

    Wednesday, February 18, 2015 8:30 PM
  • Ah ok thanks...

    Is there any danger that this would effect anything else? I.e break my server, I should mention its an exchange 2013 server.

    Cheers

    Patrick

    Wednesday, February 18, 2015 8:33 PM
  • i haven't ran this on an exchange server but the above cmds perform a consistency check first and foremost so would imagine no issue, however you may want to google wmi repair and exchange server to allay your concerns. obviously whatever you do is your choice but i understand your concern. 
    Wednesday, February 18, 2015 8:37 PM
  • Ok cool... thanks for the info!

    Its given me something to investigate and work with.  If it solves the issue I'll remember to come back and mark as the answer.

    Thanks again

    Patrick

    Wednesday, February 18, 2015 8:39 PM
  • is there is an identified wmi issue you will need to repair this

    /resetrepository

    The repository is reset to the initial state when the operating system is first installed. MOF files that contain the #pragma autorecover preprocessor statement are restored to the repository.

    Windows Server 2003:  This switch is not available.

    Wednesday, February 18, 2015 8:43 PM
  • It hardly seems reasonable that the operating system would give a false security error to a program in response to the drive being in a not-ready state.  That could be viewed as a "Security Flaw" were I a security auditor. A more appropriate response would be to hold the I/O while the connection was reestablished and then if it times out, give a "request timed out" status back to the user program so they can do error recovery.  The Operating system has mechanisms to handle such conditions without giving a user status that results in chasing false errors and raising false alarms.
    Friday, April 14, 2017 9:58 PM