Last GPO refresh time

Routine User 6 Reputation points
2023-07-02T17:46:48.3133333+00:00

Which WMI class contains the information of last gpo application time in that computer? I checked RSOP_Session's CreationTime property, but it is showing some time in 2013 year (10 years old time). I checked in another machine, that is also showing time as 20130822145022.000000+000

Kindly assist me in getting the required info (Not interested in using gpresult command to get the last time the gpos applied on a computer).

Windows for business | Windows Client for IT Pros | Directory services | Active Directory
Windows for business | Windows Server | User experience | Other
Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,776 Reputation points
    2023-07-03T12:37:33.69+00:00

    Hello,

    The WMI class that contains the information about the last Group Policy Object (GPO) application time on a computer is the RSOP_PolicySettingStatus class. This class is available under the root\RSOP\Computer namespace in WMI.

    To retrieve the last GPO application time, you can use the LastTimePolicyApplied property of the RSOP_PolicySettingStatus class. Here's an example of how you can query this information using PowerShell:

    $namespace = "root\RSOP\Computer"

    $className = "RSOP_PolicySettingStatus"

    Connect to WMI

    $wmi = Get-WmiObject -Namespace $namespace -Class $className

    Retrieve the last GPO application time

    $lastGPOApplicationTime = $wmi | Select-Object -ExpandProperty LastTimePolicyApplied

    Display the last GPO application time

    $lastGPOApplicationTime

    Please note that this class provides information about the last GPO application time within the Resultant Set of Policy (RSOP) context, which includes both computer and user policies applied to the computer.

    I used AI provided by ChatGPT to formulate part of this response. I have verified that the information is accurate before sharing it with you.

    --If the reply is helpful, please Upvote and Accept as answer--


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.