Category: Command Line (Page 1 of 3)

Cove Backup Failures – MS SQL / File In Use Errors

Related Ticket: #6220

Overview

Cove backups may fail or complete with errors indicating that files (often SQL-related or tax software database/temp files) are “in use by another process.”

This is most commonly seen with accounting/tax applications (e.g., Accounting CS), where background database activity interferes with snapshot-based backups.


Symptoms

You may see the following in Cove:

  • Backup completes with errors
  • Repeated failures on specific files
  • Error message similar to:
    • “The process cannot access the file because it is being used by another process”

Common file types involved:

  • SQL database files (.mdf, .ldf)
  • Temp database files
  • Application-specific database components (Accounting CS, etc.)

Resolution

Step 1 – Restart Backup-Related Services

Reset the Windows Backup Engine and VSS services:

net stop wbengine
net stop vss
net stop swprv

net start swprv
net start vss
net start wbengine

Notes:

  • wbengine = Windows Backup Engine (key factor in this case)
  • vss = Volume Shadow Copy Service
  • swprv = Microsoft Software Shadow Copy Provider

Step 2 – Manually Run Backup

  • Trigger a manual backup
  • Confirm successful completion

Step 3 – Monitor Scheduled Backup

  • Leave auto-backup enabled
  • Verify next scheduled run completes successfully

When to Use This Fix

  • Backup errors reference “file in use”
  • Files are tied to SQL or database-driven applications
  • Issue repeats across multiple runs
  • Manual retries alone do not resolve it
  • Issue clears after service restart

Root Cause (Observed Behavior)

Based on troubleshooting from this case:

  • The issue is triggered when an application keeps a database file “active” during backup
  • Even though VSS is designed to handle open files, something in the backup chain can become unstable
  • When a disconnect or interruption occurs, related services (especially backup engine components) may get into a bad state
  • Once this happens, backups continue to fail until services are reset

There is no confirmed root cause from N-able, even after reviewing debug logs
→ Behavior is intermittent and not fully explained by vendor support


Key Takeaways

  • Often tied to database activity, not just simple file locks
  • The backup engine (not just VSS) can get stuck in a bad state
  • Restarting wbengine alongside VSS is the critical step
  • Issue is intermittent and not fully understood by N-able

Optional Preventative Considerations

  • Schedule backups outside business hours when possible
  • Ensure database-heavy applications are closed overnight
  • Watch for recurring patterns tied to specific software

Cove Backup Error – VSS Crypto Service error in System State Backup

If Cove Backup fails to backup System State because of Windows Cryptographic Service errors and Volume Shadow Copy service with the following errors or similar:

System State\ASR Writer\BCD\?\Volume{7ac063a6-0000-0000-0000-100000000000}\Boot\<VSSFileGroup>

System State\System Writer\System Files\C:\ProgramData\Microsoft\Crypto\<VSSFileGroup>\SystemKeys

System State\System Writer\System Files\C:\ProgramData\Microsoft\Crypto\<VSSFileGroup>\SystemKeys

Then the Windows Cryptographic Service needs restarted using the following powershell script or commands to allow the next backup to complete:

Powershell:

# Requires -RunAsAdministrator

Write-Host “Stopping Volume Shadow Copy…” -ForegroundColor Yellow
Stop-Service -Name “vss” -Force

Write-Host “Stopping Cryptographic Services…” -ForegroundColor Yellow
Stop-Service -Name “cryptsvc” -Force

# Small pause to allow services to completely release files

Start-Sleep -Seconds 3

Write-Host “Starting Cryptographic Services…” -ForegroundColor Green
Start-Service -Name “cryptsvc”

Write-Host “Starting Volume Shadow Copy…” -ForegroundColor Green
Start-Service -Name “vss”

Write-Host “Services successfully restarted!” -ForegroundColor Cyan

Then launch the Cove backup manager for the problem device and run a fresh backup to verify the script fixed what it needed to.

Command Prompt:

net stop cryptsvc
net start cryptsvc

If that doesn’t do it, may need to restart Volume Shadow Copy Service instead using:

net stop vss
net start vss

And if neither of those do it, start here since there may be a permissions issue for the Cryptographics service

https://me.n-able.com/s/article/Cove-System-State-backup-error-VSS-writer-System-Writer-is-missing-Please-ensure-that-Cryptographic-Services-service-has-enough-rights-because-of-incorrect-COM-Security-settings

More about the Cryptographic Service according to Gemini:

The Windows Cryptographic Services (CryptSvc) manages certificates, digital signatures, and system integrity in Windows. When a backup fails during Volume Shadow Copy (VSS), it is often because the VSS System Writer (which relies on CryptSvc) lacks the proper security rights or service permissions to query vital system files.

Add a Windows User to Hyper-V Admin Group to allow co-Hyper-V Management

To add a user to the Hyper-V Administrators group, you must already have administrative privileges on the host machine. This process allows standard users to manage virtual machines without giving them full system administrator access.

Option 1: Use PowerShell (Fastest) 

Open Windows Terminal or PowerShell as an Administrator and run the following command: 

powershell

Add-LocalGroupMember -Group “Hyper-V Administrators” -Member “UserName”

Note: Use code with caution.

(Replace “UserName” with the actual account name or “Domain\UserName” for domain accounts).

Option 2: Use Command Prompt 

Run Command Prompt as an Administrator and use this syntax:

cmd

net localgroup “Hyper-V Administrators” “UserName” /add

Note: Group names are localized; if your Windows installation is not in English, use net localgroup to find the exact name of the Hyper-V group on your system.

Option 3: Use Computer Management (Graphical) 

This is the most common method for Windows 10, 11, and Windows Server users.

  1. Right-click the Start button and select Computer Management.
  2. Navigate to System Tools > Local Users and Groups > Groups.
  3. In the right pane, double-click Hyper-V Administrators.
  4. Click Add… and enter the username of the person you want to add.
  5. Click Check Names to verify, then click OK and Apply.
  6. Important: The user must log out and log back in for the changes to take effect.

How to block Copilot inside of MS365 installed apps

If you paste this into admin powershell, it disables copilot inside of MS365 installed apps. Doesn’t change apps online, or the ability to use other AI’s, even copilot website, BUT it does block the copilot add on items in all installed office apps (Being used for PCA here shortly)

$regPath = “HKCU:\Software\Policies\Microsoft\office\16.0\common\officeai”
if (!(Test-Path $regPath)) { New-Item -Path $regPath -Force }
Set-ItemProperty -Path $regPath -Name “TurnOffCallout” -Value 1

$privacyPath = “HKCU:\Software\Policies\Microsoft\office\16.0\common\privacy”
if (!(Test-Path $privacyPath)) { New-Item -Path $privacyPath -Force }
Set-ItemProperty -Path $privacyPath -Name “disconnectedstate” -Value 2

Renaming Device with command prompt in Atera

If you want to rename a device in Atera without opening the device through cmd

click Manage dropdown

Click run as System command prompt

Type: wmic computersystem where name=”%COMPUTERNAME%” call rename name=”NEWCOMPUTERNAME”

Hit return

Type in the console shutdown /r /t 0

Hit return

Reload Atera after the computer has restarted the computer should be renamed

How to uninstall the Atera agent by Powershell Script

How to uninstall the Atera agent by Powershell Script 

https://support.atera.com/hc/en-us/articles/5849002658844-How-do-I-remove-the-Atera-Agent-after-my-trial-has-expired

Regarding your query, what I would recommend, after you rename the PC, make sure to reboot it.  

After that, I would recommend to run the following script using PowerShell ISE as admin, locally :  

https://support.atera.com/hc/en-us/articles/5849002658844-How-do-I-remove-the-Atera-Agent-after-my-trial-has-expired

Once the script is finished, reboot the device again. In order for the registry keys to be removed / updated, reboot would be needed.  

After this, I would recommend using the CMD installation method instead of .MSI in order to install Atera Agent and assign it to the right customer. 

Function Get-UninstallCodes ([string]$DisplayName) { 

‘HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall’, ‘HKLM:SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall’ | ForEach-Object { 

Get-ChildItem -Path $_ -ErrorAction SilentlyContinue | ForEach-Object { 

If ( $(Get-ItemProperty -Path $_.PSPath -Name ‘DisplayName’ -ErrorAction SilentlyContinue) -and ($(Get-ItemPropertyValue -Path $_.PSPath -Name ‘DisplayName’ -ErrorAction SilentlyContinue) -eq $DisplayName) ) { 

$str = (Get-ItemPropertyValue -Path $_.PSPath -Name ‘UninstallString’) 

$UninstallCodes.Add($str.Substring(($str.Length – 37),36)) | Out-Null 

Function Get-ProductKeys ([string]$ProductName) { 

Get-ChildItem -Path ‘HKCR:Installer\Products’ | ForEach-Object { 

If ( $(Get-ItemProperty -Path $_.PSPath -Name ‘ProductName’ -ErrorAction SilentlyContinue) -and ($(Get-ItemPropertyValue -Path $_.PSPath -Name ‘ProductName’ -ErrorAction SilentlyContinue) -eq $ProductName) ) { 

$ProductKeys.Add($_.PSPath.Substring(($_.PSPath.Length – 32))) | Out-Null 

Function Get-ServiceStatus ([string]$Name) { (Get-Service -Name $Name -ErrorAction SilentlyContinue).Status } 

Function Stop-RunningService ([string]$Name) { 

If ( $(Get-ServiceStatus -Name $Name) -eq “Running” ) { Write-Output “Stopping : ${Name} service” ; Stop-Service -Name $Name -Force } 

Function Remove-StoppedService ([string]$Name) { 

$s = (Get-ServiceStatus -Name $Name) 

If ( $s ) { 

If ( $s -eq “Stopped” ) { 

Write-Output “Deleting : ${Name} service” 

Start-Process “sc.exe” -ArgumentList “delete ${Name}” -Wait 

} Else { Write-Output “Not Found: ${Name} service” } 

Function Stop-RunningProcess ([string]$Name) { 

$p = (Get-Process -Name $_ -ErrorAction SilentlyContinue) 

If ( $p ) { Write-Output “Stopping : ${Name}.exe” ; $p | Stop-Process -Force } 

Else { Write-Output “Not Found: ${Name}.exe is not running”} 

Function Remove-Path ([string]$Path) { 

If ( Test-Path $Path ) { 

Write-Output “Deleting : ${Path}” 

Remove-Item $Path -Recurse -Force 

} Else { Write-Output “Not Found: ${Path}” } 

Function Get-AllExeFiles ([string]$Path) { 

If ( Test-Path $Path ) { 

Get-ChildItem -Path $Path -Filter *.exe -Recurse | ForEach-Object { $ExeFiles.Add($_.BaseName) | Out-Null } 

# Mount HKEY_CLASSES_ROOT registry hive 

New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT | Out-Null 

####### 

# START: Information gathering 

####### 

# Get MSI package codes from the uninstall key 

$UninstallCodes = New-Object System.Collections.ArrayList 

‘AteraAgent’, ‘Splashtop for RMM’, ‘Splashtop Streamer’ | ForEach-Object { Get-UninstallCodes -DisplayName $_ } 

# Get product keys from the list of installed products 

$ProductKeys = New-Object System.Collections.ArrayList 

‘AteraAgent’, ‘Splashtop for RMM’, ‘Splashtop Streamer’ | ForEach-Object { Get-ProductKeys -ProductName $_ } 

# Define all the directories we’ll need to cleanup at the end of this script 

$Directories = @( 

“${Env:ProgramFiles}\ATERA Networks”, 

“${Env:ProgramFiles(x86)}\ATERA Networks”, 

“${Env:ProgramFiles}\Splashtop\Splashtop Remote\Server”, 

“${Env:ProgramFiles(x86)}\Splashtop\Splashtop Remote\Server”, 

“${Env:ProgramFiles}\Splashtop\Splashtop Software Updater”, 

“${Env:ProgramFiles(x86)}\Splashtop\Splashtop Software Updater”, 

“${Env:ProgramData}\Splashtop\Splashtop Software Updater” 

# Get all possible relevant exe files so we can make sure they’re closed later on 

$ExeFiles = New-Object System.Collections.ArrayList 

“${Env:ProgramFiles}\ATERA Networks” | ForEach-Object { Get-AllExeFiles -Path $_ } 

# Define a list of services we need to stop and delete (if necessary) 

$ServiceList = @( 

‘AteraAgent’, 

‘SplashtopRemoteService’, 

‘SSUService’ 

# Define a list of registry keys we’ll delete 

$RegistryKeys = @( 

‘HKLM:SOFTWARE\ATERA Networks’, 

‘HKLM:SOFTWARE\Splashtop Inc.’, 

‘HKLM:SOFTWARE\WOW6432Node\Splashtop Inc.’ 

####### 

# END: Information gathering 

####### 

# Uninstall each MSI package code in $UninstallCodes 

$UninstallCodes | ForEach-Object { Write-Output “Uninstall: ${_}” ; Start-Process “msiexec.exe” -ArgumentList “/X{${_}} /qn” -Wait } 

# Stop services if they’re still running 

$ServiceList | ForEach-Object { Stop-RunningService -Name $_ } 

# Terminate all relevant processes that may still be running 

$ExeFiles.Add(‘reg’) | Out-Null 

$ExeFiles | ForEach-Object { Stop-RunningProcess $_ } 

# Delete services if they’re still present 

$ServiceList | ForEach-Object { Remove-StoppedService -Name $_ } 

# Delete products from MSI installer registry 

$ProductKeys | ForEach-Object { Remove-Path -Path “HKCR:Installer\Products\${_}” } 

# Unmount HKEY_CLASSES_ROOT registry hive 

Remove-PSDrive -Name HKCR 

# Delete registry keys 

$RegistryKeys | ForEach-Object { Remove-Path -Path $_ } 

# Delete remaining directories 

#Write-Host “Waiting for file locks to be freed” ; Start-Sleep -Seconds 4 

$Directories | ForEach-Object { Remove-Path -Path $_ } 

Human Google Interface

HGI – Human-Google Interface

This includes more than most people will use often, but

here’s my list for the next batch of Windows admins to

save and pass around:

sysdm.cpl System Properties (to rename computer and

join domain)

dssite.msc Active Directory sites and services

dsa.msc Active Directory users and computers

appwiz.cpl Add/Remove programs

compmgmt.msc Computer management

timedate.cpl Date/Time management

devmgmt.msc Device Manager

dhcpmgmt.msc DHCP Management

cleanmgr Disk Cleanup Utility

diskmgmt.msc Disk Management

desk.cpl Display Settings

dnsmgmt.msc DNS Server Management

eventvwr.msc Event Viewer

lusrmgr.msc Local user and groups manager

mmc.exe Microsoft Management Console

main.cpl Mouse settings

ncpa.cpl Network adapter settings

powercfg.cpl Power Configuration

intl.cpl Regional Settings

services.msc Services

fsmgmt.msc Shared Folder Management

firewall.cpl Windows Firewall

wf.msc Windows Firewall Advanced

compmgmt.msc

Control + Win + Shift + B to “restart” your GPU driver.

Crtl windows key + v you get clipboard with a gui

.cpl and .msc shortcuts.

Man my life changed with those lol.

appwiz.cpl – Add or Remove Programsncpa.cpl – Network Connections

secpol.msc – Local Security Policy

sysdm.cpl – System Properties

If you are looking at a folder in Windows Explorer, click

into the path box, type cmd and hit enter. Command

prompt opens in that folder.

(Also, it finds an unfixed bug where you can’t access the

path box until you go to another folder and come back)

NEVER SLEEP AGAIN – Keep machine awake, kill all power saving/sleep/hibernate

To keep a machine awake forever, turning off all power saving/sleep settings, just paste this into command line.

powercfg /change monitor-timeout-ac 0 & powercfg /change monitor-timeout-dc 0 & powercfg /change standby-timeout-ac 0 & powercfg /change standby-timeout-dc 0 & powercfg /change hibernate-timeout-ac 0 & powercfg /change hibernate-timeout-dc 0

Tested in powershell, doesn’t work

Tested/verified working on windows 11, both local command line, and atera remote command line. 

Or just download and run caffeine

OOBE Command

%WINDIR%\system32\sysprep\sysprep.exe

That’s what you run on a machine once it’s been prepped, software installed etc, to bring it back to oobe (so the next reboot can ask about account setup etc.

Specifically helpful if you prepped a machine, but had to upgrade from home to pro.

PowerShell and Command Power settings itemized


Command Prompt

1.    Open an elevated Command Prompt:

·      Search for “cmd” in the Start menu.

·      Right-click on “Command Prompt” and select “Run as Administrator”.

Disable hibernation:
powercfg.exe /hibernate off

Disable all sleep states (including standby):
powercfg -change -standby-timeout-ac 0

powercfg -change -standby-timeout-dc 0

PowerShell

2.    Open an elevated PowerShell window:

·      Search for “PowerShell” in the Start menu.

·      Right-click on “Windows PowerShell” and select “Run as Administrator”.

3.        Disable hibernation:
PowerShell
Powercfg -Hibernate Off

4.       

5.        Disable all sleep states (including standby):
PowerShell
Powercfg -Change -Standby-Timeout-AC 0

6.        Powercfg -Change -Standby-Timeout-DC 0

7.       

Key Points:

·      AC vs. DC: The “-ac” and “-dc” options in the powercfg command distinguish between when the computer is plugged in (AC power) and when it’s running on battery (DC power).

·      Permanent change: These commands will permanently disable sleep and hibernation until you re-enable them.

·      Elevated permissions: You need to run Command Prompt or PowerShell as an administrator for these commands to work.

To Re-Enable Sleep and Hibernation

·      To re-enable hibernation, use:

·      powercfg.exe /hibernate on (Command Prompt)

·      Powercfg -Hibernate On (PowerShell)

·      To set specific timeouts for sleep modes, use the powercfg command with the desired timeouts in seconds.

Let me know if you’d like help customizing your timeout settings!

« Older posts

© 2026 Ultrex Staff

Theme by Anders NorenUp ↑