Answer the question
In order to leave comments, you need to log in
Telemetry Windows Server 2016. How to change the startup type or turn it off?
A lot of time has passed, but on the Internet it is still not clear how to turn off this dregs.
There are about 4-5 similar services hanging in services on WinServ 2016. How can I disable them or change the startup status to "Disabled" or "Manual"?
When you try to change, the error "Invalid parameter specified" is issued, although nothing except the startup type changes.
By the way, I noticed that after each update, the numbers in the name of the services change, which makes it very difficult when Zabbix finds a new service and you have to reconfigure ignoring this type of error in a new way.
UPD: Question: How to put out services in the "Manual" or "Disabled" state.
Answer the question
In order to leave comments, you need to log in
The names change depending on the user.
I decided using Powershell DSC to save as Hardening.ps1 and run:
Configuration Hardening{
Node localhost {
Script CDPUserSvc {
GetScript = {
$Service = Get-Service -Name "CDPUserSvc*"
return @{ result = "$( $Service.Name) $( $Service.Status )" }
}
TestScript = {
$Service = Get-Service -Name "CDPUserSvc*"
if ( $Service -and ( $Service.StartType -ne 'Disabled' )) {
Write-Verbose "Service $( $Service.Name ) is NOT in disable state."
return $false
} else {
Write-Verbose "Service $( $Service.Name ) is in disable state."
return $true
}
}
SetScript = {
$Service = Get-Service -Name "CDPUserSvc*"
Write-Verbose "Applying settings to service $( $Service.Name )."
Stop-Service -Name $Service.Name
Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\CDPUserSvc -Name Start -Value 4 -Type DWord
}
}
Script OneSyncSvc {
GetScript = {
$Service = Get-Service -Name "OneSyncSvc*"
return @{ result = "$( $Service.Name) $( $Service.Status )" }
}
TestScript = {
$Service = Get-Service -Name "OneSyncSvc*"
if ( $Service -and ( $Service.StartType -ne 'Disabled' )) {
Write-Verbose "Service $( $Service.Name ) is NOT in disable state."
return $false
} else {
Write-Verbose "Service $( $Service.Name ) is in disable state."
return $true
}
}
SetScript = {
$Service = Get-Service -Name "OneSyncSvc*"
Write-Verbose "Applying settings to service $( $Service.Name )."
Stop-Service -Name $Service.Name
Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\OneSyncSvc -Name Start -Value 4 -Type DWord
}
}
Script PimIndexMaintenanceSvc {
GetScript = {
$Service = Get-Service -Name "PimIndexMaintenanceSvc*"
return @{ result = "$( $Service.Name) $( $Service.Status )" }
}
TestScript = {
$Service = Get-Service -Name "PimIndexMaintenanceSvc*"
if ( $Service -and ( $Service.StartType -ne 'Disabled' )) {
Write-Verbose "Service $( $Service.Name ) is NOT in disable state."
return $false
} else {
Write-Verbose "Service $( $Service.Name ) is in disable state."
return $true
}
}
SetScript = {
$Service = Get-Service -Name "PimIndexMaintenanceSvc*"
Write-Verbose "Applying settings to service $( $Service.Name )."
Stop-Service -Name $Service.Name
Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\PimIndexMaintenanceSvc -Name Start -Value 4 -Type DWord
}
}
Script UserDataSvc {
GetScript = {
$Service = Get-Service -Name "UserDataSvc*"
return @{ result = "$( $Service.Name) $( $Service.Status )" }
}
TestScript = {
$Service = Get-Service -Name "UserDataSvc*"
if ( $Service -and ( $Service.StartType -ne 'Disabled' )) {
Write-Verbose "Service $( $Service.Name ) is NOT in disable state."
return $false
} else {
Write-Verbose "Service $( $Service.Name ) is in disable state."
return $true
}
}
SetScript = {
$Service = Get-Service -Name "UserDataSvc*"
Write-Verbose "Applying settings to service $( $Service.Name )."
Stop-Service -Name $Service.Name
Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\UserDataSvc -Name Start -Value 4 -Type DWord
}
}
Script UnistoreSvc {
GetScript = {
$Service = Get-Service -Name "UnistoreSvc*"
return @{ result = "$( $Service.Name) $( $Service.Status )" }
}
TestScript = {
$Service = Get-Service -Name "UnistoreSvc*"
if ( $Service -and ( $Service.StartType -ne 'Disabled' )) {
Write-Verbose "Service $( $Service.Name ) is NOT in disable state."
return $false
} else {
Write-Verbose "Service $( $Service.Name ) is in disable state."
return $true
}
}
SetScript = {
$Service = Get-Service -Name "UnistoreSvc*"
Write-Verbose "Applying settings to service $( $Service.Name )."
Stop-Service -Name $Service.Name
Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\UnistoreSvc -Name Start -Value 4 -Type DWord
}
}
Script WpnUserService {
GetScript = {
$Service = Get-Service -Name "WpnUserService*"
return @{ result = "$( $Service.Name) $( $Service.Status )" }
}
TestScript = {
$Service = Get-Service -Name "WpnUserService*"
if ( $Service -and ( $Service.StartType -ne 'Disabled' )) {
Write-Verbose "Service $( $Service.Name ) is NOT in disable state."
return $false
} else {
Write-Verbose "Service $( $Service.Name ) is in disable state."
return $true
}
}
SetScript = {
$Service = Get-Service -Name "WpnUserService*"
Write-Verbose "Applying settings to service $( $Service.Name )."
Stop-Service -Name $Service.Name
Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\WpnUserService -Name Start -Value 4 -Type DWord
}
}
}
}
Push-Location $PSScriptRoot
Enable-PSRemoting -Force -Confirm:$false
. $PSScriptRoot\Hardening.ps1
Hardening
Start-DscConfiguration -Path $PSScriptRoot\Hardening -Verbose -Wait -Force
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question