I just experienced an issue that I have never seen before when displaying services in Win8.1 (with Powershell Core 6+). Running Get-Service
in an Admin shell, result in the following error:
$ Get-Service
...
Get-Service : Service 'NetTcpPortSharing (NetTcpPortSharing)' cannot be queried due to the following error:
At line:1 char:1
+ Get-Service
+ ~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (System.ServiceProcess.ServiceController:ServiceController) [Get-Service], ServiceCommandException
+ FullyQualifiedErrorId : CouldNotGetServiceInfo,Microsoft.PowerShell.Commands.GetServiceCommand
Stopped NetTcpPortSharing NetTcpPortSharing
...
Looking at the details of this Service I see:
Using net helpmsg 15101
I then got this:
The resource loader failed to load MUI file because the file fail to pass validation.
I have no idea what this means, of even if it's relevant as it was shown in the Description field.
So none of this info makes sense, and I have no idea what created this service, nor what it is doing or was using it. However I know that a few days ago I didn't have this problem, but I don't know if I had the service. I have been playing a lot with various Remoting features, but from this machine to another W10.
What is NetTcpPortSharing used for and can I safely delete it?
(Where does it typically come from?)
Possibly Related References:
- NetTcpPortSharing
- Access denied when using Net.Tcp Port Sharing Service
- Windows Service is giving Description: <Failed to read description error code 2>
UPDATE (according to magicandre1981)
# $key = 'HKLM:\SYSTEM\CurrentControlSet\Services\NetTcpPortSharing'
# Get-ItemProperty -Path $key
DisplayName : NetTcpPortSharing
ErrorControl : 1
ImagePath : C:\Windows\Microsoft.NET\Framework64\v4.0.30319\SMSvcHost.exe
Start : 4
Type : 32
Description : @%systemroot%\Microsoft.NET\Framework64\v4.0.30319\ServiceModelInstallRC.dll,-8200
ObjectName : NT AUTHORITY\LocalService
ServiceSidType : 3
RequiredPrivileges : {SeCreateGlobalPrivilege}
FailureActions : {132, 3, 0, 0...}
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetTcpPortSharing
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
PSChildName : NetTcpPortSharing
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
The config file for this is located here:
# find //c/Windows/Microsoft.NET/Framework*/ -iname "SMSvcHost.exe.config"
//c/Windows/Microsoft.NET/Framework/v4.0.30319/SMSvcHost.exe.config
//c/Windows/Microsoft.NET/Framework64/v4.0.30319/SMSvcHost.exe.config