gpresult /s [ComputerName] /u [Domain\User] /p [Password] /r
gpresult /h report.html (creates a readable web report).
Launch your terminal as SYSTEM (rare) or ensure you’re an admin. For LGPO to write to C:\Windows\System32\GroupPolicy , admin rights are mandatory.
Note: This tool is only available by default in Windows Pro, Enterprise, and Education editions. Windows Home users will receive an error stating the command is not found. Key Group Policy Command Line Tools
(Computer Config > Admin Templates > Windows Components > Windows Update)
# Example: Set a policy (Disable Cortana) Set-PolicyFileEntry -Path "C:\Windows\System32\GroupPolicy\Machine\Registry.pol" ` -Key "Software\Policies\Microsoft\Windows\Windows Search" ` -ValueName "AllowCortana" ` -Data 0 -Type "DWord"
gpupdate
Not every policy is a direct registry key. Some policies (especially under Security Settings like Account Policies) require secedit (see Part 5). Always test changes first.
gpedit.msc