1

Topic: [Batch-file] how to find services?

There is ten. Also there is a slow connection . The task to reduce  has been delivered to transmittable telemetry .
On many resources on the Internet created  for switch-off of all telemetry in one .
Some suspicious services generally I delete.
Only noted one singularity.
When you delete service for example - " CDPUserSvc ". There is a service - "CDPUserSvc_21fcd", delete this service, after reboot appears "CDPUserSvc_1c128"...
That is ten itself recreates parent service with a mask in the end.
Prompt  the code on  deleting such service with a mask.

2

Re: [Batch-file] how to find services?

To me can advise any next aaplet, one of them already killed the built in firewall yes so that it is necessary to recover Windows from . Thanks are not necessary such aaplets.
Also probably advise to disconnect such services simply. Only here at following update the Windows can include them again.
Therefore I also want to delete completely such services after system loading.

3

Re: [Batch-file] how to find services?

In what a problem to install enterprise edition, where telemetry switch-off - quite regular functional?
Why it is impossible to deliver any analyzer of the traffic to understand, what exactly occupies yours "the slow channel"?
There can be you struggle with windmills and stretch an owl on the globe.

4

Re: [Batch-file] how to find services?

Basil A. Sidorov;
Well... Generally specially installed Windows 10 LTSB. There there is no regular breaker of telemetry.
And even there with telemetry switch-off not all so is smooth. On Habre saw even if to add in a file hosts  where Windows sends telemetry, it will send all the same the telemetry bypassing this file .
One more example .
At me an output all the same through the USB-modem. Speed not all that well.
Happens even I am frequent I can not to open simply any site simply to read or find, how starts to brake terribly.
There and then I open the Manager of tasks and I stop some services responsible more or less for telemetry:

DiagTrack
SensrSvc
DcpSvc
SensorService
SensorDataService
diagnosticshub.standardcollector.service
dmwappushservice
OneSyncSvc
CDPUserSvc
MessagingService
OneSyncSvc
UserDataSvc
PimIndexMaintenanceSvc
UnistoreSvc

And here after removal and reboot precisely the system recreates these services anew changing a name of the service, can even check up:

CDPUserSvc
MessagingService
OneSyncSvc
UserDataSvc
PimIndexMaintenanceSvc
UnistoreSvc

And the Internet revives!
Truth it is necessary such to do often, therefore I want to automate.

5

Re: [Batch-file] how to find services?

CDPUserSvc_1c128 wrote:

Generally specially installed Windows 10 LTSB. There there is no regular breaker of telemetry.

One breaker - yes, no.
But there is a heap of pens in the interface, the scheduler of jobs and group politicians. It is necessary to view methodically everything that is.
P.S. Normally, to forbid start of service it is better, than to delete it.

6

Re: [Batch-file] how to find services?

Basil A. Sidorov wrote:

it is normal, to forbid start of service better, than to delete it.

Only here these services  that is to disconnect any more the system does not allow:

UnistoreSvc
PimIndexMaintenanceSvc
UserDataSvc
WpnUserService

I try a command sc config wscsvc start = disabled - refuses access.
Something I , was perverted as a result and did not understand why the system does not allow.
Spat and through the register disconnected :

reg add "HKLM\SYSTEM\CurrentControlSet\Services\WpnUserService_2f034"/v "Start"/t REG_DWORD/d 4/f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\UserDataSvc_2f034"/v "Start"/t REG_DWORD/d 4/f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\PimIndexMaintenanceSvc_2f034"/v "Start"/t REG_DWORD/d 4/f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\UnistoreSvc_2f034"/v "Start"/t REG_DWORD/d 4/f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\DiagTrack"/v "Start"/t REG_DWORD/d 4/f
reg add "HKLM\SYSTEM\CurrentControlSet\Services\dmwappushservice"/v "Start"/t REG_DWORD/d 4/f

7

Re: [Batch-file] how to find services?

CDPUserSvc_1c128;
it is necessary to work with other branch of the register, namely - HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CDPUserSvc.
Here here the help.

8

Re: [Batch-file] how to find services?

Andy_OLAP wrote:

CDPUserSvc_1c128;
it is necessary to work with other branch of the register, namely - HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CDPUserSvc.
Here here the help.

I.e. it is different branches
HKLM\SYSTEM\CurrentControlSet\Services\
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\

9

Re: [Batch-file] how to find services?

Synonyms it, synonyms.
And reg (edit) understands both.

10

Re: [Batch-file] how to find services?

Basil A. Sidorov wrote:

Synonyms it, synonyms.
And reg (edit) understands both.

yes. And it is necessary to search for a register branch on keyword CDPUserSvc.

11

Re: [Batch-file] how to find services?

Found on open spaces of the Network small  on PS.
It is necessary to correct only services for switch-off to whom what it is necessary.
By the way this  is intended for switch-off of superfluous services on Server2016
[spoiler PowerShell:]

function DisablingServicesOnServer2016wDE {
[CmdletBinding ()]
param (
[String] $ComputerName = $env:COMPUTERNAME;
[ValidateSet (' ShouldBeDisabledOnly ', ' ShouldBeDisabledAndDefaultOnly ', ' OKToDisable ', ' OKToDisablePrinter ', ' OKToDisableDC ')]
[String] $Level = ' OKToDisablePrinter ';
[string] $PathFolder = $env:USERPROFILE + '\DisabledServices \'
)
Begin {
$filename = "DisabledServices _" + $ComputerName
Write-Verbose $PathFolder
if (! (Test-Path-Path $PathFolder-PathType Container)) {
New-Item-Path $PathFolder-ItemType directory
Write-Host-ForegroundColor Green "Create a new folder"
}
$filepath = $PathFolder + $filename + '.log'
$stream = [System. IO.StreamWriter] $filepath
#Set-Service: Service ' Contact Data (PimIndexMaintenanceSvc) ' cannot be configured due to the following error: Access is denied. I need modify registry.
[String []] $Regedit_services = (
"CDPUserSvc";
"PimIndexMaintenanceSvc";
"OneSyncSvc";
"UnistoreSvc";
"UserDataSvc";
"WpnUserService";
"NgcSvc";
"NgcCtnrSvc"
)
[String []] $DisabledByDefault = (
"tzautoupdate";
"Browser";
"AppVClient";
"NetTcpPortSharing";
"CscService";
"RemoteAccess";
"SCardSvr";
"UevAgentService";
"WSearch"
)
[String []] $ShouldBeDisabled = (
"XblAuthManager";
"XblGameSave"
)
[String []] $OKToDisable = (
"AxInstSV";
"bthserv";
"dmwappushservice";
"MapsBroker";
"lfsvc";
"SharedAccess";
"lltdsvc";
"wlidsvc";
"NcbService";
"PhoneSvc";
"PcaSvc";
"QWAVE";
"RmSvc";
"SensorDataService";
"SensrSvc";
"SensorService";
"ShellHWDetection";
"ScDeviceEnum";
"SSDPSRV";
"WiaRpc";
"TabletInputService";
"upnphost";
"WalletService";
"FrameServer";
"stisvc";
"wisvc";
"icssvc";
"TermService";
"WpnService"
)
[String []] $OKToDisableNotDCorPrint = (' Spooler ')
[String []] $OKToDisableNotPrint = (' PrintNotify ')
[String []] $ServicesToDisable = ()
switch ($Level)
{
' ShouldBeDisabledOnly ' {$ServicesToDisable + = $ShouldBeDisabled}
' ShouldBeDisabledAndDefaultOnly ' {$ServicesToDisable + = $ShouldBeDisabled + $DisabledByDefault}
' OKToDisablePrinter ' {$ServicesToDisable + = $ShouldBeDisabled + $DisabledByDefault + $OKToDisable + $Regedit_services}
' OKToDisableDC ' {$ServicesToDisable + = $ShouldBeDisabled + $DisabledByDefault + $OKToDisable + $OKToDisableNotDCorPrint + $Regedit_services}
' OKToDisable ' {$ServicesToDisable + = $ShouldBeDisabled + $DisabledByDefault + $OKToDisable + $OKToDisableNotDCorPrint + $OKToDisableNotPrint + $Regedit_services}
}
}
Process {
$InstalledServices = Get-Service-ComputerName $ComputerName
foreach ($Service in $ServicesToDisable)
{
if ($Regedit_services-contains $Service) {
#Set-ItemProperty not ComputerName parameter
if ($ComputerName-eq $env:COMPUTERNAME) {
#localhost
Set-ItemProperty-Path "HKLM:\SYSTEM\CurrentControlSet\Services \$ Service"-Name "Start"-value 4
$stream. WriteLine ("Disabled service: $Service")
}
else {
#remote server
Invoke-Command-ScriptBlock {Set-ItemProperty-Path "HKLM:\SYSTEM\CurrentControlSet\Services \$ ($ args [0])"-Name "Start"-value 4}-ArgumentList $Service-ComputerName $ComputerName
$stream. WriteLine ("Disabled service: $Service")
}
}
elseif ($InstalledServices. Name-contains $Service) {
Set-Service-Name $Service-ComputerName $ComputerName-StartupType Disabled
$stream. WriteLine ("Disabled service: $Service")
}
}
}
End {
$stream.close ()
}
}
DisablingServicesOnServer2016wDE-PathFolder C:\DisabledServices\

[/spoiler]