Get-WmiObject -Class "Win32GroupUser" -ComputerName $computer -Filter…
- User
Get-WmiObject -Class "Win32_GroupUser" -ComputerName computer"",Name=""$adminGroupName""'" why isn't this working (from domain controller with domain admin privileges)
- Assistant
There could be a few reasons why this command is not working as expected:
-
Ensure that the variable $computer is properly defined and contains the correct computer name.
-
Check if the variable $adminGroupName is correctly specified and matches the name of the group you are trying to query.
-
Verify that the domain controller has the necessary permissions to access the specified computer and group information.
-
Make sure that the syntax of the WMI query is correct and does not contain any typos or errors.
-
Check if the WinRM service is properly configured and running on the target computer.
If you have confirmed that the above points are correct and the issue persists, it might be helpful to provide more specific details or error messages to further troubleshoot the problem.
-