Description
This cmdlet is not always recognized after a certain windows update. Please push out a fix or add the fix to this page.
Error:
"
invoke-gpupdate : The term 'invoke-gpupdate' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify
that the path is correct and try again.
At line:1 char:1
- invoke-gpupdate
-
+ CategoryInfo : ObjectNotFound: (invoke-gpupdate:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
"
Fix:
Get-WindowsCapability -Name 'Rsat.GroupPolicy.*' -Online | Where-Object { $_.State -ne 'Installed' } | Add-WindowsCapability -Online
update-help -force
Site Reference:
https://stackoverflow.com/questions/69034061/gpudate-ps-commandlet
Powershell Version: 7.2.1.0-x64
Thanks, Lawrence
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 11fa75cc-dabf-9da5-ea0c-4a8042690531
- Version Independent ID: 37fb3294-2045-498b-0781-d3795825b8dc
- Content: Invoke-GPUpdate (GroupPolicy)
- Content Source: docset/winserver2022-ps/grouppolicy/Invoke-GPUpdate.md
- Product: w10
- Technology: windows
- GitHub Login: @JasonGerend
- Microsoft Alias: jgerend