Hi,
According to the help file of the Get-NetFirewallRule, the local GPOs can be specified with the hostname. Please see if the command works with the hostname.
Get-NetFirewallRule -PolicyStore $hostname -Name $name
https://learn.microsoft.com/en-us/powershell/module/netsecurity/get-netfirewallrule
Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.