How to make get-service successfully accessing to another computer in homegroup in PowerShell?

Is there a way to retrieve a list of the services that are installed on a remote computer?

Sure, I think get-service will do it. So let's take a look at the details of the cmdlet first:
Parameter Set: Default
Get-Service [[-Name] <String[]> ] [-ComputerName <String[]> ] [-DependentServices] [-Exclude <String[]> ] [-Include <String[]> ] [-RequiredServices] [ <CommonParameters>]


Gets the services running on the specified computers. The default is the local computer. Type the NetBIOS name, an IP address, or a fully qualified domain name of a remote computer. To specify the local computer, type the computer name, a dot (.), or "localhost".
This parameter does not rely on Windows PowerShell remoting. You can use the ComputerName parameter of Get-Service even if your computer is not configured to run remote commands.
So I decide to create a homework with two computers to test this cmdlet. But I have encountered a couple of errors as below.

Problem 1 - Homegroup cannot be created due to an error: Microsoft Teredo Tunneling Adapter - Device cannot start code 10
Unfortunately, I encounter the following error when I try to establish the homegroup:

Microsoft Teredo Tunneling Adapter - Device cannot start code 10

Further investigation indicates that the problem is associated with the IPV6 disabled. A while ago, when I tested IP and DNS with Powershell, I found the address was for IPV6, not the conventional IPV4 address. So I decide to "Prefer IPv4 over IPv6 in prefix policies" (, which causes the problem.

Solution for Problem 1:

To fix it, enable IPV6 by setting the DisabledComponents value to 0 at: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters\

After IPV6 is fixed, the Microsoft Teredo Tunneling Adapter works fine, and a homegroup was successfully created between two local laptops: xu-acer (localhost) and xu_xps (acting as the remote pc).

Problem 2 Get-Service : Cannot open Service Control Manager on computer 'xu_xps'. This operation might require other privileges.

Solution for Problem 2 (based on the suggestion on

(a). Make the two PCs in the same homework

(b). Create the same user account with an administrator privilege on the two machines (the same user name and password. The prefix is different, of course. In my case, on the local host, the user is xu-acer\Charlie, the user on the remate PC is xu_xps\Charlie).

(c) Run powershell with the same user account on the two PCs

(d) On the remote PC, run the following :

Set-Item WSMan:\localhost\Client\TrustedHosts * #### to enable the server (localhost) to enter the current client (remote) machine.######

(e) Then re-run the cmdlet, it should work.